Ejemplo n.º 1
0
 public function postLogin()
 {
     if (isset($_POST["password"]) && sha1($_POST["password"]) == Paladin::config("server")->get("password")) {
         $_SESSION["logged"] = true;
         return new RedirectResponse("../panel/home");
     } else {
         return Paladin::view("login.twig", array("error" => true, "serverActivated" => Paladin::config("server")->get("enabled")));
     }
 }
Ejemplo n.º 2
0
 public function getPanel($request)
 {
     if ($request == "home") {
         return Paladin::view("home.twig", array("paladinVersion" => Paladin::VERSION, "server" => SUpdateServer::SERVER_VERSION, "base" => SUpdateServer::BASE_VERSION, "panel" => SUpdateServer::PANEL_VERSION, "internal" => SUpdateServer::INTERNAL_VERSION, "serverEnabled" => Paladin::config("server")->get("enabled")));
     } else {
         if ($request == "about") {
             return Paladin::view("about.twig");
         } else {
             if ($request == "settings") {
                 return Paladin::view("settings.twig");
             } else {
                 if ($request == "statistics") {
                     return Paladin::view("stats.twig", array("connections" => Paladin::config("stats")->get("connections"), "ips" => (array) Paladin::config("stats")->get("ips")));
                 } else {
                     return new RedirectResponse("home");
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 public function getInstall()
 {
     return Paladin::view('install.twig', array());
 }