示例#1
0
 // begin
 // if current account is guest account, redirect it to no-permission page
 if ($_GET[KEY_TARGET] != "login" && $_GET[KEY_TARGET] != "signout") {
     if ($_SESSION[KEY_SESSION][Account::KEY_USERNAME] == "guest") {
         Utils::showNoPermissionPage();
         die;
     }
 }
 // end
 include CONTROLLER_PATH . "account.php";
 // path = account
 if (empty($_GET[KEY_TARGET])) {
     AccountController::show();
 } else {
     if ($_GET[KEY_TARGET] == "edit") {
         AccountController::edit();
     } else {
         if ($_GET[KEY_TARGET] == "login") {
             AccountController::login();
         } else {
             if ($_GET[KEY_TARGET] == "signout") {
                 AccountController::signout();
             } else {
                 if ($_GET[KEY_TARGET] == "passwordedit") {
                     AccountController::passwordEdit();
                 } else {
                     if ($_GET[KEY_TARGET] == "create") {
                         AccountController::create();
                     } else {
                         if ($_GET[KEY_TARGET] == "verifyplease") {
                             AccountController::verifyPlease();
示例#2
0
     break;
 case 'auth.store':
     $controller = new AuthenticationController();
     $controller->store();
     break;
 case 'auth.attempt':
     $controller = new AuthenticationController();
     $controller->attempt();
     break;
 case 'login':
     $controller = new AuthenticationController();
     $controller->login();
     break;
 case 'account.edit':
     $controller = new AccountController();
     $controller->edit();
 case 'upload':
     $controller = new AccountController();
     $controller->upload();
     break;
 case 'logout':
     $controller = new AuthenticationController();
     $controller->logout();
     break;
 case 'comment.create':
     $controller = new CommentController();
     $controller->create();
     break;
 default:
     echo "404";
     break;