"; // 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'] = "
$zone[title]
".$zone['content']; else $zone['title']="$zone[title]"; } $content=$zone['content']; }else { $zonepath="zones/$zone[file].php"; if (file_exists($zonepath)) { ob_start(); include($zonepath); $content=ob_get_contents(); ob_end_clean(); }else $content="zone $zone[file] not found!"; if ($AUSER['logged_in'] AND $zone['zone_id']) { if ($zone['file']=='news_scrooll') $zone['file']='news'; $zone['title']="$zone[title]"; } } if ($zone['frame'] AND !$no_zone_table) $content = theme_zone($zone['title'], $content, $zone['position']); $HTML[$zone['position']].= $content; } } } unset($BLOCKS, $content); } if ( $app=='admin/backup_db' AND $call=='backup' ) $DIRECT_OUT=1; //——— Set Apps —————————————————————————————————————————————————————————————————————— if ($app) { if (!$DIRECT_OUT) ob_start(); if ($app AND file_exists("apps/$app.php")) include_once("apps/$app.php"); elseif ($app AND is_dir("apps/$app") && file_exists("apps/$app/".basename($app).".php")) include_once("apps/$app/".basename($app).".php"); if (!$DIRECT_OUT) { $HTML['center'].= ob_get_contents(); ob_end_clean(); }else exit; } if (!$DIRECT_OUT AND $NO_SKIN) { if (!$NO_HEADERS) send_headers(); die($HTML['center']); } //———— OUT ——————————————————————————————————————————————————————————————————————— if (!$NO_HEADERS) send_headers(); # enable gzip compression if (!headers_sent() AND extension_loaded('zlib') AND function_exists('ob_gzhandler')) ob_start('ob_gzhandler'); # HTML Out # OUT(); ?>