예제 #1
0
 public function mainAction()
 {
     if (authModel::is_Authorized()) {
         // go to main page in admin
         header("Location: " . $this->makeURI(array("controller" => "archive")));
     } else {
         // go to authorize form
         header("Location: " . $this->makeURI(array("controller" => "auth")));
     }
     exit;
 }
예제 #2
0
 function __construct()
 {
     // clear messages and errors
     classModel::$errors = classModel::$messages = array();
     // set logout link
     authModel::$logoutLink = $this->makeURI(array("controller" => "auth", "action" => "logout"));
     // check logining
     if (!authModel::is_Authorized()) {
         header("Location: " . $this->makeURI(array("controller" => "auth")));
     } else {
         authModel::$userData = classModel::getSession("userData");
     }
     // create top menu
     self::createTopMenu();
 }