static function Run() { EClassApi::CheckDir(PAGE_CACHE_DIR); if (isset($_REQUEST['page']) && $_REQUEST['page'] != '') { if ($_REQUEST['page'] == "home") { Url::redirect_url(WEB_DIR, 301); } $page_name = strtolower($_REQUEST['page']); } else { //echo $_COOKIE['lang'];die(); $page_name = 'home'; } EClass::$page_cache_file = PAGE_CACHE_DIR . $page_name . '.php'; if (Url::get('refresh_page') == 1) { self::del_page_cache($page_name); } if (Url::get('refresh_page') != 1 && PAGE_CACHE_ON && file_exists(EClass::$page_cache_file)) { require_once EClass::$page_cache_file; } else { $re = DB::query('SELECT id, name, title, layout FROM page WHERE name="' . addslashes($page_name) . '"', __LINE__ . __FILE__); if ($re) { EClass::$page = mysql_fetch_assoc($re); } if (!EClass::$page) { Url::redirect_url(WEB_DIR, 301); } require_once ROOT_PATH . 'core/EClassGen.php'; EClassGen::PageGenerate(); } }
<? EClass::$page = array ( 'id' => '7271', 'name' => 'signin', 'title' => 'Đăng nhập', 'layout' => 'layouts/default.html',); $blocks = array(48798=>array('id'=>'48798','module_id'=>'5557','region'=>'header','module'=>array('id'=>'5557','name'=>'Header',),),48582=>array('id'=>'48582','module_id'=>'5524','region'=>'footer','module'=>array('id'=>'5524','name'=>'Footer',),),49974=>array('id'=>'49974','module_id'=>'1704','region'=>'center','module'=>array('id'=>'1704','name'=>'SignIn',),),); foreach($blocks as &$block){ if(file_exists(DIR_MODULE.$block['module']['name'].'/class.php')){ require_once DIR_MODULE.$block['module']['name'].'/class.php'; $block['object'] = new $block['module']['name']($block); if(isset($_POST['form_block_id']) && $_POST['form_block_id'] == $block['id']){ $block['object']->submit(); } } } require_once ROOT_PATH."core/PageBegin.php" ?> <? if(isset($blocks[48798]['object'])) $blocks[48798]['object']->on_draw();?> <!--end: #header --> <div class="site-body"> <? if(isset($blocks[49974]['object'])) $blocks[49974]['object']->on_draw();?> <!--end: main body--> </div> <? if(isset($blocks[48582]['object'])) $blocks[48582]['object']->on_draw();?> <!--end: mod-footer--> <? require_once ROOT_PATH.'core/PageEnd.php' ?>
<? EClass::$page = array ( 'id' => '150', 'name' => 'sign_out', 'title' => 'Kết thúc phiên làm việc', 'layout' => 'layouts/blank.html',); $blocks = array(49026=>array('id'=>'49026','module_id'=>'148','region'=>'center','module'=>array('id'=>'148','name'=>'SignOut',),),); foreach($blocks as &$block){ if(file_exists(DIR_MODULE.$block['module']['name'].'/class.php')){ require_once DIR_MODULE.$block['module']['name'].'/class.php'; $block['object'] = new $block['module']['name']($block); if(isset($_POST['form_block_id']) && $_POST['form_block_id'] == $block['id']){ $block['object']->submit(); } } } require_once ROOT_PATH."core/PageBegin.php" ?> <? if(isset($blocks[49026]['object'])) $blocks[49026]['object']->on_draw();?> <? require_once ROOT_PATH.'core/PageEnd.php' ?>
<? EClass::$page = array ( 'id' => '6957', 'name' => 'register', 'title' => '', 'layout' => 'layouts/default.html',); $blocks = array(50108=>array('id'=>'50108','module_id'=>'5557','region'=>'header','module'=>array('id'=>'5557','name'=>'Header',),),49867=>array('id'=>'49867','module_id'=>'45','region'=>'center','module'=>array('id'=>'45','name'=>'Register',),),50150=>array('id'=>'50150','module_id'=>'5524','region'=>'footer','module'=>array('id'=>'5524','name'=>'Footer',),),); foreach($blocks as &$block){ if(file_exists(DIR_MODULE.$block['module']['name'].'/class.php')){ require_once DIR_MODULE.$block['module']['name'].'/class.php'; $block['object'] = new $block['module']['name']($block); if(isset($_POST['form_block_id']) && $_POST['form_block_id'] == $block['id']){ $block['object']->submit(); } } } require_once ROOT_PATH."core/PageBegin.php" ?> <? if(isset($blocks[50108]['object'])) $blocks[50108]['object']->on_draw();?> <!--end: #header --> <div class="site-body"> <? if(isset($blocks[49867]['object'])) $blocks[49867]['object']->on_draw();?> <!--end: main body--> </div> <? if(isset($blocks[50150]['object'])) $blocks[50150]['object']->on_draw();?> <!--end: mod-footer--> <? require_once ROOT_PATH.'core/PageEnd.php' ?>
<? EClass::$page = array ( 'id' => '7764', 'name' => 'personal', 'title' => 'Trang cá nhân', 'layout' => 'layouts/default.html',); $blocks = array(50148=>array('id'=>'50148','module_id'=>'5524','region'=>'footer','module'=>array('id'=>'5524','name'=>'Footer',),),50147=>array('id'=>'50147','module_id'=>'5557','region'=>'header','module'=>array('id'=>'5557','name'=>'Header',),),50149=>array('id'=>'50149','module_id'=>'5743','region'=>'center','module'=>array('id'=>'5743','name'=>'Personal',),),); foreach($blocks as &$block){ if(file_exists(DIR_MODULE.$block['module']['name'].'/class.php')){ require_once DIR_MODULE.$block['module']['name'].'/class.php'; $block['object'] = new $block['module']['name']($block); if(isset($_POST['form_block_id']) && $_POST['form_block_id'] == $block['id']){ $block['object']->submit(); } } } require_once ROOT_PATH."core/PageBegin.php" ?> <? if(isset($blocks[50147]['object'])) $blocks[50147]['object']->on_draw();?> <!--end: #header --> <div class="site-body"> <? if(isset($blocks[50149]['object'])) $blocks[50149]['object']->on_draw();?> <!--end: main body--> </div> <? if(isset($blocks[50148]['object'])) $blocks[50148]['object']->on_draw();?> <!--end: mod-footer--> <? require_once ROOT_PATH.'core/PageEnd.php' ?>
<? EClass::$page = array ( 'id' => '3009', 'name' => 'home', 'title' => 'Trang chủ', 'layout' => 'layouts/default.html',); $blocks = array(50125=>array('id'=>'50125','module_id'=>'5524','region'=>'footer','module'=>array('id'=>'5524','name'=>'Footer',),),50146=>array('id'=>'50146','module_id'=>'5735','region'=>'center','module'=>array('id'=>'5735','name'=>'Home',),),48878=>array('id'=>'48878','module_id'=>'5557','region'=>'header','module'=>array('id'=>'5557','name'=>'Header',),),); foreach($blocks as &$block){ if(file_exists(DIR_MODULE.$block['module']['name'].'/class.php')){ require_once DIR_MODULE.$block['module']['name'].'/class.php'; $block['object'] = new $block['module']['name']($block); if(isset($_POST['form_block_id']) && $_POST['form_block_id'] == $block['id']){ $block['object']->submit(); } } } require_once ROOT_PATH."core/PageBegin.php" ?> <? if(isset($blocks[48878]['object'])) $blocks[48878]['object']->on_draw();?> <!--end: #header --> <div class="site-body"> <? if(isset($blocks[50146]['object'])) $blocks[50146]['object']->on_draw();?> <!--end: main body--> </div> <? if(isset($blocks[50125]['object'])) $blocks[50125]['object']->on_draw();?> <!--end: mod-footer--> <? require_once ROOT_PATH.'core/PageEnd.php' ?>