Example #1
0
 }
 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();
         }
         break;
     default:
         if (isset($_GET['m'])) {
             $project_controller->error_page();
             exit;
         }
         $project_controller->index($user_profile_id);