示例#1
0
 $operation = http_request("Operation", "s", null);
 $federation = http_request("Federation", "i", -1);
 // -1 defaults to all federations
 $idjuez = http_request("ID", "i", 0);
 $jueces = new Jueces("juezFunctions", $federation);
 if ($operation === null) {
     throw new Exception("Call to juezFunctions without 'Operation' requested");
 }
 switch ($operation) {
     case "insert":
         $am->access(PERMS_OPERATOR);
         $result = $jueces->insert();
         break;
     case "update":
         $am->access(PERMS_OPERATOR);
         $result = $jueces->update($idjuez);
         break;
     case "delete":
         $am->access(PERMS_OPERATOR);
         $result = $jueces->delete($idjuez);
         break;
     case "selectbyid":
         $result = $jueces->selectByID($idjuez);
         break;
     case "select":
         $result = $jueces->select();
         break;
         // list with order, index, count and where
     // list with order, index, count and where
     case "enumerate":
         $result = $jueces->enumerate();