Пример #1
0
 protected function get_index()
 {
     $conf = Config::getInstance();
     if (Session::isLogged()) {
         Output::redirect(WWW_PATH);
     }
     $conf = Config::getInstance();
     $tpt = new TemplateRes(array("title" => $conf->get("title"), "description" => $conf->get("description"), "favicon" => $conf->get("favicon", null)));
     $tpt->output("login.php");
 }
Пример #2
0
 protected function error($r)
 {
     if (array_key_exists("code", $r)) {
         $code = $r["code"];
     } else {
         $code = $_SERVER["REDIRECT_STATUS"];
     }
     if (array_key_exists($code, ErrorHandler::$messagecode)) {
         $message = ErrorHandler::$messagecode[$code];
     } else {
         $message = "";
     }
     $tpt = new TemplateRes(array("code" => $code, "message" => $message, "body" => DEBUG ? CorePlugin::info() : "", "baseline" => CorePlugin::getBaseline()));
     $tpt->output(ERROR_TEMPLATE);
 }