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 $execute_app = new MAjax(); $execute_app->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; } }
<!-- styles --> <body class="login-layout"> <div class="main-container container-fluid"> <div class="main-content"> <div class="row-fluid"> <div class="span12"> <div class="login-container"> <div class="row-fluid"> <div class="center"> <!-- ==== load app here==== --> <?php $execute_app = new MAjax(); $execute_app->is_appli = true; $execute_app->default_app = Mreq::tg('_tsk') != "0" ? Mreq::tg('_tsk') : 'login'; $execute_app->load(); //applic::load(1,0); ?> </div><!--/position-relative--> </div> </div> </div><!--/.span--> </div><!--/.row-fluid--> </div> </div><!--/.main-container--> <!-- ======== --> </body> </html>