예제 #1
0
 $jornadaid = http_request("ID", "i", 0);
 $perms = http_request("Perms", "i", 0);
 $allowClosed = http_request("AllowClosed", "i", 0);
 $hideUnassigned = http_request("HideUnassigned", "i", 0);
 if ($operation === null) {
     throw new Exception("Call to jornadaFunctions without 'Operation' requested");
 }
 switch ($operation) {
     // there is no need of "insert" method: every prueba has 8 "hard-linked" jornadas
     case "delete":
         $am->access(PERMS_OPERATOR);
         $result = $jornadas->delete($jornadaid);
         break;
     case "close":
         $am->access(PERMS_OPERATOR);
         $result = $jornadas->close($jornadaid);
         break;
     case "update":
         $am->access(PERMS_OPERATOR);
         $result = $jornadas->update($jornadaid);
         break;
     case "select":
         $result = $jornadas->selectByPrueba();
         break;
     case "getbyid":
         $result = $jornadas->selectByID($jornadaid);
         break;
     case "enumerate":
         $result = $jornadas->searchByPrueba($allowClosed, $hideUnassigned);
         break;
     case "rounds":