<?php $fecha = $i + 1; ?> <div class="panel-info"> <div class="panel-heading"> FECHA {{$fecha}} <div class="pull-right"> <?php $fechaexiste = Fechas::where('nroFecha', '=', $fecha)->where('codRueda', '=', $torneo->codRueda)->first(); ?> @if($fechaexiste != '') <?php $programacionexiste = Programacion::where('idFecha', '=', $fechaexiste->idFecha)->first(); $programacionro = Programacion::where('idFecha', '=', $fechaexiste->idFecha)->count(); ?> @if($programacionexiste != '' && $programacionro==$nroPartido) <a class="btn btn-success" href="{{URL::to( 'fechas/'.$codcampeonato.'/'.$torneo->codRueda.'/'.$fechaexiste->idFecha.'/detail.html');}}">detalle</a> @else <a class="btn btn-warning" href="{{ URL::to('fecha/edit/'.$codcampeonato.'/'.$torneo->codRueda.'/'.$fecha);}}">programacion</a> @endif @else <a class="btn btn-success" href="{{ URL::to('fecha/edit/'.$codcampeonato.'/'.$torneo->codRueda.'/'.$fecha);}}">Programar dia y hora de la Fecha</a> @endif
<th>partido</th> <th>hora</th> <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> Partido </a><br> </td> </tr> @endforeach </tbody> </table> </div> <div class="panel-footer">
foreach ($partidoActual as $value) { $codEquipo1 = $value->id_equipo1; $codEquipo2 = $value->id_equipo2; $idfixture = $value->id_fixture; } $nroPlantilla = 0; $nro1 = strcmp($codEquipo1, $equipo->codEquipo); $nro2 = strcmp($codEquipo2, $equipo->codEquipo); if ($nro1 == 0) { $nroPlantilla = 1; } if ($nro2 == 0) { $nroPlantilla = 2; } $nroPartido = Fixture::find($idfixture)->nroPartido; $programacion = Programacion::where('idFecha', '=', $idfecha)->where('nroPartido', '=', $nroPartido)->first(); $partidoA = Partido::where('codProgramacion', '=', $programacion->codProgramacion)->first(); $Plantilla = Planilla::where('codPartido', '=', $partidoA->codPartido)->where('nroPlantilla', '=', $nroPlantilla)->first(); $codPla = $Plantilla->codPantilla; echo "<br>" . $partidoA->codPartido . "<br>" . $nroPlantilla . " " . $codPla; } else { $descansa = 1; } } ?> <!-- BEGIN PAR MANEJO DE ERRORES --> @include('alerts.allsuccess') @include('alerts.success') <!-- END PARA MANEJO DE ERRORES --> <div class="container"> <div class="row-margin-top ">