require_once PATH_CLASSES . 'Basic.class.php'; require_once PATH_CLASSES . 'Page.class.php'; require_once PATH_CLASSES . 'Lang.class.php'; require_once PATH_CLASSES . 'FStable.class.php'; /******************* Load Page (DB, Func, conf, page) *************************/ Trace::add_step(__FILE__, "Create DB object"); $Page = new Page($conf); /************************* Load User Pref Lang ********************************/ Trace::add_step(__FILE__, "Load Language Dictionary"); if (isset($Page::$conf["general"]["uselang"]) && is_string($Page::$conf["general"]["uselang"])) { require_once PATH_LANG . $Page::$conf["general"]["uselang"] . '.php'; } Lang::load($Lang); /*********************** Set global shared variables ***************************/ $vglob = array("req_secure" => false); Trace::reg_var('Load VGlobals', $vglob); /****************************** Page Target ***********************************/ $Page->target(); Trace::add_step(__FILE__, "Set page target", $Page->target); /****************************** Page Loader ***********************************/ switch ($Page->target) { case "api": Trace::add_step(__FILE__, "Load secure api"); if ($vglob["req_secure"]) { } break; case "home": default: Trace::add_step(__FILE__, "Load page home"); $Page->template = "pages/home.css"; include_once PATH_PAGES . "home.php";
$Page->description = Lang::P("home_desc", false); $Page->keywords = Lang::P("home_keys", false); //Set Page Variables: $_view = $Page->Func->synth($_GET, array("view"))["view"]; $Page->variable("load-view", !empty($_view) && ($_view === "debugger" || $_view === "process" || $_view === "settings" || $_view === "server") ? $_view : "settings"); //Load some data: $Page->variable("all-plans", $Page::$conn->get("settingsplan")); //Set additional end body JS import and Conditional JS: Trace::add_step(__FILE__, "Define conditional js libs for end body section"); $Page->include_js(array(GPATH_LIB_JS . "jQuery/jquery-1.11.1.min.js", GPATH_LIB_JS . "jQueryUI/jquery-ui.min.js", GPATH_LIB_JS . "switch/jquery.switchButton.js", GPATH_LIB_JS . "App/app.js"), false); //Set header: Trace::add_step(__FILE__, "Load page header"); require_once PATH_STRUCT . 'head.php'; //Page Markup: Trace::reg_var("onload view", $Page->variable("load-view")); Trace::reg_var("all plans", $Page->variable("all-plans")); Trace::add_step(__FILE__, "Load page HTML"); ?> <nav class="navbar"> <div class="logo"><?php Lang::P("gen_title_for_display"); ?> <em><?php echo "v" . $Page::$conf["general"]["app_version"]; ?> </em></div> <ul> <li class="<?php echo $Page->variable("load-view") === "settings" ? "active" : ""; ?>