Exemplo n.º 1
0
 $user = NULL;
 if (isset($_GET['p_id'])) {
     $p_id = $_GET['p_id'];
     $project_controller->selectProject($user_profile_id, $p_id);
 }
 if (isset($_SESSION['user_hash'])) {
     $user = $_SESSION['user_hash'];
 }
 switch ($user_profile_id) {
     case $user:
         if ($_SESSION['user_type'] == "organization") {
             if (isset($_GET['m'])) {
                 $method = $_GET['m'];
                 switch ($method) {
                     case 'add':
                         $project_controller->add();
                         break;
                     case 'save':
                         $project_controller->save();
                         header("Location: index.php?id={$user}");
                         break;
                     default:
                         $project_controller->error_page();
                         break;
                 }
             } else {
                 $project_controller->index($user_profile_id);
             }
         } else {
             $project_controller->error_page();
         }