$am->access(PERMS_OPERATOR);
         $result = $ot->delete($id);
         break;
         /* DO NOT CALL These functions from client side
         		case "populateJornada":
         		case "deleteJornada":
         		*/
     /* DO NOT CALL These functions from client side
     		case "populateJornada":
     		case "deleteJornada":
     		*/
     case "getTandas":
         $result = $ot->getTandas($s);
         break;
     case "getData":
         $result = $ot->getData($s, $id, $p);
         break;
     case "getDataByTanda":
         $result = $ot->getDataByTanda($s, $id);
         break;
     case "getDataByDorsal":
         $result = $ot->getDataByDorsal($s, $id, $d);
         break;
     case "swap":
         $result = $ot->swap($f, $t);
         break;
     case "dnd":
         $am->access(PERMS_ASSISTANT);
         $result = $ot->dragAndDrop($f, $t, $w);
         break;
 }
Exemple #2
0
 function videowall_llamada($pendientes)
 {
     // array ("Orden","Logo","Dorsal","Licencia","Nombre","Raza","Categoria","Grado","NombreGuia","NombreClub","Celo");
     $lastTanda = "";
     $lastTeam = 0;
     $otmgr = new Tandas("Llamada a pista", $this->prueba['ID'], $this->jornada['ID']);
     $lista = $otmgr->getData($this->sessionid, $this->tanda['ID'], $pendientes)['rows'];
     // obtiene los $pendientes primeros perros
     $orden = 0;
     $data = array();
     foreach ($lista as $participante) {
         if ($lastTanda !== $participante['Tanda']) {
             $lastTanda = $participante['Tanda'];
             $lastTeam = 0;
             // make sure team's name is shown
             // Orden=-1 means Tanda info
             $item = array("Orden" => -1, "Logo" => "empty.png", "Dorsal" => "&nbsp", "Licencia" => " ", "Nombre" => " ", "Raza", "Categoria" => "&nbsp", "Grado" => "---", "NombreGuia" => $lastTanda, "NombreClub" => "---", "Celo" => 0);
             array_push($data, $item);
         }
         if ($this->isTeam() && $lastTeam !== $participante['Equipo']) {
             $lastTeam = $participante['Equipo'];
             $team = $this->myDBObject->__getObject("Equipos", $lastTeam);
             // orden 0 means new team
             $item = array("Orden" => 0, "Logo" => "empty.png", "Dorsal" => "&nbsp", "Licencia" => "Equipo:", "Nombre" => $team->Nombre, "Raza", "Categoria" => "&nbsp", "Grado" => " ", "NombreGuia" => " ", "NombreClub" => " ", "Celo" => 0);
             array_push($data, $item);
         }
         $orden++;
         $item = array("Orden" => $orden, "Logo" => $participante['Logo'], "Dorsal" => $participante['Dorsal'], "Licencia" => $participante['Licencia'], "Nombre" => $participante['Nombre'], "Raza" => $participante['Raza'], "Categoria" => $participante['Categoria'], "Grado" => $participante['Grado'], "NombreGuia" => $participante['NombreGuia'], "NombreClub" => $participante['NombreClub'], "Celo" => $participante['Celo'], "Observaciones" => $participante['Observaciones']);
         array_push($data, $item);
     }
     //
     $res = array('rows' => $data, 'total' => count($data));
     echo json_encode($res);
     return 0;
 }