public static function load($module_name, array $params = NULL, $route_name = NULL) { $module = new module($module_name, $params, $route_name); return $module->render(); }
//============================================================= require_once "{$app_logic_path}/security/login.class.php"; $login = new login(); //============================================================= // If login.inc.php exists include it //============================================================= if (file_exists("{$_SESSION['file_path']}/login.inc.php")) { require_once "{$_SESSION['file_path']}/login.inc.php"; } //============================================================= // If previous URL given go there after login //============================================================= if (isset($_SESSION['login_url'])) { $url_prefix = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://'; header("Location: {$url_prefix}" . $_SESSION['login_url']); unset($_SESSION['login_url']); die; } $page = new module(); break; } } else { $page = new module(); } break; } //============================================================ // Render Page //============================================================ $page->render();