Exemplo n.º 1
0
 public function auth()
 {
     if (isset($_COOKIE["masterpw"]) && $_COOKIE["masterpw"] == Config::MASTERPWD) {
         SessionController::setAuth();
     }
     if (isset($_POST["password"]) && $_POST["password"] == Config::MASTERPWD) {
         SessionController::setAuth();
         setcookie("masterpw", $_POST["password"], time() + 86400 * 30);
     } else {
         SessionController::addMsg("access denied");
     }
 }