// echo "Hello
";
// die();
$startTime=array_sum(explode(' ',microtime()));
define('INCMS', true);
set_time_limit(60);
session_start();
include_once 'content/cfg.php';
include_once 'include/config.php';
include_once 'include/functions.php';
include_once 'theme/theme.php';
ini_set('display_errors', ($CFG['debug']?'On':'Off') );
$ln='he';
if ($ln) include_once "include/lang/$ln.php";
remove_magic_quotes();
$app = $_REQUEST['app'];
$call = $_REQUEST['call'];
$p = $_REQUEST['p'];
if (!preg_match('#^[a-z_][0-9a-z_-]+(/[a-z_][0-9a-z_-]+)?$#i', $app)) $app='';
$App = $app;
if (!$App) $App='home';
# clear common keywords and description if not on homepage
if ($app) unset($CFG['meta_keywords'], $CFG['meta_description']);
check_login();
if (eregi("^admin(/|$)", $app) AND !$SVARS['is_admin']) $app='';
# Load zones
$BLOCKS=sql2array("SELECT * FROM $CFG[prefix]zones WHERE active='1' AND (date_begin='0000-00-00' OR date_begin<='".date('Y-m-d')."') AND (date_expire='0000-00-00' OR date_expire>='".date('Y-m-d')."') ORDER BY sort", 'zone_id');
//print_ar($App,'$App');
// print_ar($CFG,'$CFG');
//——— Set Zones ——————————————————————————————————————————————————————————————————————
if (is_array($BLOCKS)) {
foreach ($BLOCKS as $zone) {
if ($zone[$App]){
if ($zone['position']=='left' OR $zone['position']=='right' OR $zone['position']=='center' OR !$app) {
unset ($content, $no_zone_table);
// print_ar($zone,'$zone');
if (!$zone['file']) {
if ($AUSER['logged_in'] AND $zone['zone_id']) {
if ($zone['position']=='center') $zone['content'] = "