Exemple #1
0
}
//echo "Control: $control <br>";
switch ($control) {
    case "results":
        MasterView::showHeader();
        ResultsController::add();
        MasterView::showFooter();
        break;
    case "viewResults":
        MasterView::showHeader();
        ResultsController::view();
        MasterView::showFooter();
        break;
    case "writeResults":
        MasterView::showHeader();
        ResultsController::write();
        MasterView::showFooter();
        break;
    case "HowTo":
        MasterView::showHeader();
        ResultsController::howto();
        MasterView::showFooter();
        break;
    default:
        MasterView::showHeader();
        HomeController::show();
        MasterView::showFooter();
}
?>
	
         } else {
             if ($request[0] == 'passers') {
                 if (isset($request) && !empty($request) && isset($request[1])) {
                     $course_id = $request[1];
                     $year = $request[2];
                     ResultsController::getPassersByCourse($course_id, $year);
                 }
             } else {
                 if ($request[0] == 'passers2') {
                     if (isset($request) && !empty($request) && isset($request[1])) {
                         $year = $request[1];
                         ResultsController::getPassers($year);
                     }
                 } else {
                     if ($request[0] == 'year') {
                         ResultsController::getResultsYear();
                     } else {
                         return print json_encode('ENTRANCE EXAM API v.0.1 developed by: Philip Cesar B. Garay');
                         die;
                     }
                 }
             }
         }
     } else {
         return print json_encode('ENTRANCE EXAM API v.0.1 developed by: Philip Cesar B. Garay');
         die;
     }
     break;
 default:
     print json_encode('ENTRANCE EXAM API v.0.1 developed by: Philip Cesar B. Garay');
     break;