run('canvas'); //settingRedirectScan(); foreach(dirM() as $count) loadM($count, true); if(isset($GLOBALS['modules'])) foreach($GLOBALS['modules'] as $key => $count){ if(method_exists($count, 'system_start')) $count->system_start(); }; global $module, $url; $module = makeSafeUrl($_GET['module']); if(empty($module))$module="index"; //$file = DIR_ROOT.'cms_admin/template/'.$module.'_'.$case.'.php'; //$method='admin_'.$case; $url = $module; /*Jeżeli strona to PA*/ if($url=="cms_admin")header("Location: /cms_admin/"); $searchPage=true; //Szukam dokładnie pliku o nazwie w templates $file = DIR_TEMPLATE.$url.'.php'; if ($searchPage && ($file != '') && (file_exists($file)) && (is_readable($file)) ){ include_once($file); $searchPage=false; } $searchModule = urlSet($url, lurl()); if($searchPage && $searchModule != false ){ if(method_exists($GLOBALS['modules'][$searchModule], 'default_view')){ $GLOBALS['modules'][$searchModule]->default_view(); $searchPage=false; } // Szukam w module Page w funkcji searchPageModule // if(method_exists($GLOBALS['module']['page'], 'searchPageModule')){ // if($module['module']['page']->searchPageModule($url)){ // $searchPage=false; // } // } } //exit; // 404 if($searchPage){ include_once(DIR_TEMPLATE.'index.php'); $searchPage=false; } if(isset($GLOBALS['modules'])) foreach($GLOBALS['modules'] as $key => $count){ if(method_exists($count, 'system_stop')) $count->system_stop(); }; echo $GLOBALS['htmlC']->view(); ?>