示例#1
0
        array_push($dontGo, $jug);
    }
    //Recorro los que no saben si van
    for ($i = 0; $i < count($aux3); $i++) {
        $j->xId($aux3[$i]);
        $jug = array($j->getId(), $j->getNombre() . " " . $j->getApellido());
        array_push($dontKnow, $jug);
    }
    //Recorro los invitados titulares
    for ($i = 0; $i < count($aux4); $i++) {
        $g = new Invitado();
        $g->xId($aux4[$i]);
        $guest = array($g->getId(), $g->getNombre());
        array_push($go, $guest);
    }
    //Recorro los jugadores Suplentes
    for ($i = 0; $i < count($aux5); $i++) {
        $j->xId($aux5[$i]);
        $jug = array($j->getId(), $j->getNombre() . " " . $j->getApellido());
        array_push($alternates, $jug);
    }
    //Recorro los invitados suplentes
    for ($i = 0; $i < count($aux6); $i++) {
        $g = new Invitado();
        $g->xId($aux6[$i]);
        $guest = array($g->getId(), $g->getNombre());
        array_push($alternates, $guest);
    }
    //Traigo la vista
    include_once "../view/viewEvent.php";
}
        if ($e->getCantidad() <= $totalGo) {
            $estado = 3;
        }
    } else {
        if ($estado == 2) {
            //Actualizo tambien el primer suplente y lo paso a los titulares
            //Guardo el id, la fecha y el flag Jug/Guest del primer suplente disponible
            $alt = $e->firstALternate();
            //Si hay algun suplente
            if ($alt) {
                if ($alt[2] == 'j') {
                    //Si es un jugador de AEE
                    //Creo un jugador
                    $alternate = new jugador();
                } else {
                    if ($alt[2] == 'g') {
                        //Si es un invitado
                        //Creo un invitado
                        $alternate = new Invitado();
                    }
                }
                //Le asigno el primer suplente
                $alternate->xId($alt[0]);
                $alternate->updateStatusEvent(1, $evento);
            }
        }
    }
    $j = new jugador();
    $j->xId($jugador);
    $j->updateStatusEvent($estado, $evento);
}