コード例 #1
0
ファイル: actualizar.blade.php プロジェクト: nosiliw/SCDW
                            </div>
							{{ Form::close() }}
							</div>

					</div>
				</div>
			</div>
        </div>
    @endif
    <?php 
$fechaexiste = Fechas::where('nroFecha', '=', $nrofecha)->where('codRueda', '=', $torneo->codRueda)->first();
?>

    @if(  $fechaexiste = Fechas::where('nroFecha', '=',$nrofecha )->where('codRueda','=',$torneo->codRueda)->first())
        <?php 
$fixturefecha = Fixture::where('nroFecha', '=', $nrofecha)->where('codRueda', '=', $torneo->codRueda)->get();
?>
        <div class="row row-no-gutter col-no-gutter-container" id="fecha">
            <div class="col-md-12 col-no-gutter ">
                <div class="panel panel-default">
                    <div class="panel-heading">PROGRAMAR PARTIDOS DE LA FECHA {{$nrofecha}}
                    </div>
                    <!-- BEGIN PARA MANEJO DE ERRORES -->
                    @include('alerts.allerrors')
                    @include('alerts.errors')
                    <!-- END PARA MANEJO DE ERRORES -->
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-6">

                                <table data-toggle="table" data-url="tables/data2.json">
コード例 #2
0
ファイル: detail.blade.php プロジェクト: nosiliw/SCDW
                        <th class="text-center">{{$fecha->diaFecha}}</th>
                        <th>Accion</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($fixture as $val)
                        <tr>
                            <td>{{$val->nroPartido}}</td>
                            <td>{{$val->hora}}</td>
                            <td class="text-center">{{Equipo::find($val->codEquipo1)->nombre.' <----> '.Equipo::find($val->codEquipo2)->nombre}}</td>
                            <td>
                                <!--- encontrar cod de partido   -->
                                <?php 
$programacion = Programacion::where('idFecha', '=', $fecha->idFecha)->where('nroPartido', '=', $val->nroPartido)->first();
$partido = Partido::where('codProgramacion', '=', $programacion->codProgramacion)->first();
$fixture = Fixture::where('codRueda', '=', $torneo->codRueda)->where('nroFecha', '=', $fecha->nroFecha)->where('nroPartido', '=', $val->nroPartido)->first();
?>

                                <br>
                                <a class="label label-primary" href="{{$partido->codPartido}}/partido.html" >
                                    <span class="glyphicon glyphicon-list"></span> &nbsp;Partido
                                </a><br>
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
            <div class="panel-footer">
                @if($equipoquedescansa !='')
                    Descansa: {{$equipoquedescansa->nombre}}
コード例 #3
0
ファイル: PartidoController.php プロジェクト: nosiliw/SCDW
 public function partido($codcampeonato, $codrueda, $idfecha, $codpartido)
 {
     //$todoConclusion = Cambio::all();
     //elementos
     $fecha = Fechas::find($idfecha);
     $partido = Partido::find($codpartido);
     $programacion = Programacion::find($partido->codProgramacion);
     $torneo = Torneo::where('codRueda', '=', $codrueda)->first();
     $arbitros = Arbitro::all();
     $arbixPart = ArbitroPorPartido::where('codPartido', '=', $codpartido)->count();
     $todosArbitros = ArbitroPorPartido::where('codPartido', '=', $codpartido)->get();
     //end elementos
     $nroPartido = $programacion->nroPartido;
     $fixture = Fixture::where('codRueda', '=', $torneo->codRueda)->where('nroFecha', '=', $fecha->nroFecha)->where('nroPartido', '=', $nroPartido)->first();
     //elementos
     $equipo1 = Equipo::find($fixture->codEquipo1);
     $equipo2 = Equipo::find($fixture->codEquipo2);
     $activarPlanilla = Planilla::where('codPartido', '=', $codpartido)->first();
     $fechaactual = DB::select("select curdate() as fecha");
     $fechasiguiente = DB::select("select  adddate(curdate(),1) as fecha");
     $fechaAnterior = DB::select("select  subdate(curdate(),1) as fecha");
     $hora = DB::select("select  curtime() as hora");
     $horaAsistencia = DB::select("select  subtime(?,3000) as fecha", array($partido->horaInicio));
     foreach ($fechaactual as $value) {
         $Factual = $value->fecha;
     }
     foreach ($fechasiguiente as $value) {
         $Fsiguiente = $value->fecha;
     }
     foreach ($hora as $value) {
         $horaA = $value->hora;
     }
     foreach ($fechaAnterior as $value) {
         $Fantes = $value->fecha;
     }
     foreach ($horaAsistencia as $value) {
         $HrAistencia = $value->fecha;
     }
     ///===== es la dia de programacion
     $HH = DB::select("select  if(?=?,1,0) as fecha", array($fecha->diaFecha, $Factual));
     foreach ($HH as $value) {
         $esdiaProgramacion = $value->fecha;
     }
     //end fechaf
     // mañena es dia de programacion
     $HH = DB::select("select  if(?<?,1,0) as fecha", array($fecha->diaFecha, $Fsiguiente));
     foreach ($HH as $value) {
         $manenaProgramacion = $value->fecha;
     }
     // ayer fue dia de programacion
     $HH = DB::select("select  if(?=?,1,0) as fecha", array($fecha->diaFecha, $Fantes));
     foreach ($HH as $value) {
         $ayerFProgramacion = $value->fecha;
     }
     // si la  hora es mayor 23:50
     $HH = DB::select("select  if(?=?,1,0) as fecha", array(substr($horaA, 0, 5), "23:50"));
     foreach ($HH as $value) {
         $esHora = $value->fecha;
     }
     // es hora de inicio
     $HH = DB::select("select  if(curtime()>=? and curtime()<?,1,0) as fecha", array($partido->horaInicio, "23:50:00"));
     foreach ($HH as $value) {
         $HoraI = $value->fecha;
     }
     //hora de tomo asistencia 30 min
     $HH = DB::select("select  if(curtime()>=? and curtime()<=?,1,0) as fecha", array($HrAistencia, $partido->horaInicio));
     foreach ($HH as $value) {
         $AH = $value->fecha;
     }
     $jugadoresequipo1 = "";
     $jugadoresequipo2 = "";
     $activarPlanilla = Planilla::where('codPartido', '=', $codpartido)->first();
     if ($activarPlanilla != "") {
         $Planilla1 = Planilla::where('codPartido', '=', $codpartido)->where('nroPlantilla', '=', 1)->first();
         $Planilla2 = Planilla::where('codPartido', '=', $codpartido)->where('nroPlantilla', '=', 2)->first();
         //$fixture->codEquipo1
         //$Jequipo1 = Jugador::where('codequipo', '=', $fixture->equipo1)->get();
         //$Jequipo2 = Jugador::where('codequipo', '=', $fixture->equipo2)->get();
         //$arbitros = Arbitro::all();
         //todos los jugadores de este partido  $torneo $idtorneo,$idfecha,$idfixture)
     }
     /*
          $Delanteros1 = '';
          $Mediocampistas1 = '';
          $Defensas1 = '';
          $Guardameta1 = '';
          $suplentes1 = '';
          $jugadoresdeunpartido2 = '';
          //recuperamos los arbitros del partido
          $arbitrosdelpartido = '';
          //verificamos si el partido ya se jugó
              //recuperar los datos del partido jugado
              $arbitrosdelpartido = ArbitroPorPartido::where('codPartido','=',$partido->codPartido)->first();
     
              //resuperamos todos los jugadores de este partido  ... un rato
     /*
              $Delanteros1 = DB::table('tjugadorenjuego')
                  ->join('tjugador','tjugadorenjuego.idjugador','=','tjugador.idjugador')
                  ->join('tdocente','tdocente.coddocente','=','tjugador.coddocente')
                  ->join('tequipo','tequipo.codequipo','=','tjugador.codequipo')
                  ->where('tjugadorenjuego.codpartido','=',$partido->codpartido)
                  ->where('tjugador.codequipo','=',$fixture->equipo1)
                  ->where('tjugadorenjuego.condicionenpartido','=','delantero')
                  ->get();
              $Mediocampistas1 = DB::table('tjugadorenjuego')
                  ->join('tjugador','tjugadorenjuego.idjugador','=','tjugador.idjugador')
                  ->join('tdocente','tdocente.coddocente','=','tjugador.coddocente')
                  ->join('tequipo','tequipo.codequipo','=','tjugador.codequipo')
                  ->where('tjugadorenjuego.codpartido','=',$partido->codpartido)
                  ->where('tjugador.codequipo','=',$fixture->equipo1)
                  ->where('tjugadorenjuego.condicionenpartido','=','mediocampista')
                  ->get();
              $Defensas1 = DB::table('tjugadorenjuego')
                  ->join('tjugador','tjugadorenjuego.idjugador','=','tjugador.idjugador')
                  ->join('tdocente','tdocente.coddocente','=','tjugador.coddocente')
                  ->join('tequipo','tequipo.codequipo','=','tjugador.codequipo')
                  ->where('tjugadorenjuego.codpartido','=',$partido->codpartido)
                  ->where('tjugador.codequipo','=',$fixture->equipo1)
                  ->where('tjugadorenjuego.condicionenpartido','=','defensa')
                  ->get();
              $Guardameta1 = DB::table('tjugadorenjuego')
              ->join('tjugador','tjugadorenjuego.idjugador','=','tjugador.idjugador')
              ->join('tdocente','tdocente.coddocente','=','tjugador.coddocente')
              ->join('tequipo','tequipo.codequipo','=','tjugador.codequipo')
              ->where('tjugadorenjuego.codpartido','=',$partido->codpartido)
              ->where('tjugador.codequipo','=',$fixture->equipo1)
              ->where('tjugadorenjuego.condicionenpartido','=','guardameta')
              ->get();
              $suplentes1 = DB::table('tjugadorenjuego')
                  ->join('tjugador','tjugadorenjuego.idjugador','=','tjugador.idjugador')
                  ->join('tdocente','tdocente.coddocente','=','tjugador.coddocente')
                  ->join('tequipo','tequipo.codequipo','=','tjugador.codequipo')
                  ->where('tjugadorenjuego.codpartido','=',$partido->codpartido)
                  ->where('tjugador.codequipo','=',$fixture->equipo1)
                  ->where('tjugadorenjuego.condicionenpartido','=','suplente')
                  ->get();
              $jugadoresdeunpartido2 = DB::table('tjugadorenjuego')
                  ->join('tjugador','tjugadorenjuego.idjugador','=','tjugador.idjugador')
                  ->where('tjugadorenjuego.codpartido','=',$partido->codpartido)
                  ->where('tjugador.codequipo','=',$fixture->equipo2)
                  ->get();
     */
     $activarPlanilla = Planilla::where('codPartido', '=', $codpartido)->first();
     return View::make('user_com_organizing.fecha.partido.index', compact('fixture'))->with('idfecha', $idfecha)->with('torneo', $torneo)->with('programacion', $programacion)->with('codcampeonato', $codcampeonato)->with('arbitros', $arbitros)->with('partido', $partido)->with('arbixPart', $arbixPart)->with('todosArbitros', $todosArbitros)->with('equipo1', $equipo1)->with('equipo2', $equipo2)->with('activarPlanilla', $activarPlanilla)->with('esdiaProgramacion', $esdiaProgramacion)->with('manenaProgramacion', $manenaProgramacion)->with('ayerFProgramacion', $ayerFProgramacion)->with('esHora', $esHora)->with('HoraI', $HoraI)->with('AH', $AH);
     //->with('todoConclusion', $todoConclusion);
 }
コード例 #4
0
ファイル: FechasController.php プロジェクト: nosiliw/SCDW
 public function detail($codcampeonato, $idtorneo, $idfecha)
 {
     $torneo = Torneo::where('codRueda', '=', $idtorneo)->first();
     $fecha = Fechas::where('idFecha', '=', $idfecha)->first();
     $fixture = Fixture::where('nroFecha', '=', $fecha->nroFecha)->where('codRueda', '=', $idtorneo)->get();
     $fixturedeequipoqueescansa = Fixtureaux::where('nroFecha', '=', $fecha->nroFecha)->where('codRueda', '=', $idtorneo)->first();
     $equipoquedescansa = '';
     // $todoConclusion = Cambio::all();
     if ($fixturedeequipoqueescansa != '') {
         if ($fixturedeequipoqueescansa->codEquipo1 == '') {
             $equipoquedescansa = Equipo::where('codEquipo', '=', $fixturedeequipoqueescansa->codEquipo2)->first();
         } else {
             $equipoquedescansa = Equipo::where('codEquipo', '=', $fixturedeequipoqueescansa->codEquipo1)->first();
         }
     }
     return View::make('user_com_organizing.fecha.detail', compact('fecha'))->with('fixture', $fixture)->with('torneo', $torneo)->with('equipoquedescansa', $equipoquedescansa)->with('codcampeonato', $codcampeonato);
 }
コード例 #5
0
ファイル: TorneoController.php プロジェクト: nosiliw/SCDW
 public function detail($codcampeonato, $idtorneo)
 {
     //$tabla = DB::select('call TABLAPOSICIONES');
     $fixture = Fixture::where('codRueda', '=', $idtorneo)->get();
     $fechas = Fechas::where('codRueda', '=', $idtorneo)->get();
     //$equipos = Equipoxtorneo::where('codRueda', '=', $idtorneo)->get();
     $fechasdeltorneo = Fechas::where('codRueda', '=', $idtorneo)->get();
     $campeonato = Campeonato::where('codCampeonato', '=', $codcampeonato)->first();
     $torneo = Torneo::where('codRueda', '=', $idtorneo)->first();
     $nroequipos = $this->nroequipos($codcampeonato);
     return View::make('user_com_organizing.torneo.detail', compact('fechasdeltorneo'))->with('codcampeonato', $codcampeonato)->with('torneo', $torneo)->with('nroequipos', $nroequipos);
 }