public static function load() { //Define Theme depend to session define('THEME_PATH', MPATH_THEMES . Mcfg::get('theme')); //exit(THEME_PATH); $ajax = MReq::tg('ajax') == 1 ? 1 : 0; if ($ajax == 1) { //Excute app on ajax ajax::load(); } else { //Excute app on theme $theme_path = THEME_PATH; $theme = session::get('userid') == FALSE ? $theme_path . '/mainns.php' : $theme_path . '/main.php'; include $theme; } }
<?php ajax::load(); ?>
<?php $ajaxappli = new ajax(); $ajaxappli->load(); ?>