<?php
$show_events_ext_side = false;
$must_cache = false;
$module_dir = "eventsmodule";

$module_css_path = ($line_domain['theme'] != "" && $line_domain['theme'] != "default") ? ($path . ('assets/themes/' . $line_domain['theme'] . '/')) : $path;

include(dirname(__FILE__) . "/eventsmodule_init.php");

require_once(dirname(__FILE__) . "/../common/tool_functions.php");
require_once(dirname(__FILE__) . "/events_config.php");

//echo '<pre>$_REQUEST = ', var_export($_REQUEST, true), '</pre>';
/*if(isset($_REQUEST['filter'])) {
    echo '<pre>$_REQUEST[filter] = ', var_export(base64_decode($_REQUEST['filter']), true), '</pre>';
}*/

$include_file = dirname(__FILE__) . "/events_main.php";




$def_breadcrumbs = array();
if(!isset($module_params['def_breadcrumbs'])) {
    $q = "SELECT l.* FROM left_content l, module m WHERE l.module_id=m.module_id AND l.catdom_id='$domain_id' AND l.type='module' AND m.url='eventsmodule'  ;";
    $r = @mysql_query($q);
    if($r && mysql_num_rows($r) == 1) {
        $row = mysql_fetch_assoc($r);
        $module_params = unserialize(base64_decode($row['module_params']));
        if(isset($module_params['def_breadcrumbs'])) {
            $def_breadcrumbs = $module_params['def_breadcrumbs'];
        }
    }
}
else {
    $def_breadcrumbs = $module_params['def_breadcrumbs'];
}

if(isset($_REQUEST['events_debug'])) {
    echo '<pre>$def_breadcrumbs = ' , var_export($def_breadcrumbs, true), '</pre>';
}
//echo '<pre>', var_export($def_breadcrumbs, true), '</pre>';


$events_dcode = '';
$events_town = '';
$events_category_group = '';
$events_category = '';

$events_type = 'events';


if(!isset($send404) || $send404 == false) {
    include($include_file);
    ?>
    <div class="alert alert-info">
        <p class="no-padding text-primary text-bold">
            <i class="fa fa-info-circle fa-lg"></i> The content is taken from the Cyprus Tourism Organisation's website.
        </p>
    </div>
    <?php
}
else {
    include(dirname(__FILE__) . "/../404/404.php");
}
?>
