calendar.blade.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. @extends('layouts.frontend')
  2. @section('content')
  3. <style>
  4. .table {
  5. border-top-style: ridge;
  6. border-bottom-style: ridge;
  7. border-left-style: ridge;
  8. border-right-style: ridge;
  9. border-color: #989894;
  10. border-width: 1px;
  11. }
  12. .table td {
  13. border-right: solid 1px #989894;
  14. border-bottom: 1px solid#989894;
  15. }
  16. .table th {
  17. border-right: solid 1px #989894;
  18. border-bottom: 1px solid#989894;
  19. }
  20. </style>
  21. @php
  22. if(!isset($_GET["day"]) && $d != '')
  23. {
  24. $_GET["day"] = $d . " ";
  25. $_GET["type"] = $t;
  26. }
  27. if (isset($_GET["day"]))
  28. {
  29. $sel = $_GET["day"] . $_GET["type"];
  30. }
  31. @endphp
  32. <div class="container">
  33. <div class="row">
  34. <div class="col-sm-12" style="margin-top:30px;">
  35. <div class="title-section">
  36. <h1 style="width: 90%"><span>{{$c->category->name}}{{isset($c->group) ? ' - ' . $c->group->name : ''}}</span></h1>
  37. <span style="margin-top:-30px;float:right"><a style="color:red" href="/calendario/{{$c->category->name}}{{isset($c->group) ? '-' . $c->group->name : ''}}/{{$c->id}}?all=1">CALENDARIO COMPLETO</a></span>
  38. </div>
  39. </div>
  40. <h3>Andata</h3>
  41. <div class="row" style="margin-top:20px";>
  42. <div class="col-sm-12">
  43. @foreach($games as $idx => $g)
  44. @if(strtoupper(trim($g[0]->type)) == 'ANDATA')
  45. <a class="box-day" href="/calendario/{{$c->category->name}}{{isset($c->group) ? '-' . $c->group->name : ''}}/{{$c->id}}?day={{str_replace('ANDATA', '', str_replace('RITORNO', '', $idx))}}&type=ANDATA" style="{{$idx == $sel ? 'background-color:red;color:white' : 'color:black'}};padding:10px;border:1px solid black;font-weight:bold;">{{str_replace('ANDATA', '', str_replace('RITORNO', '', $idx))}}&ordf;</a>
  46. @endif
  47. @endforeach
  48. </div>
  49. </div>
  50. <h3>Ritorno</h3>
  51. <div class="row" style="margin-top:20px";>
  52. <div class="col-sm-12">
  53. @foreach($games as $idx => $g)
  54. @if(strtoupper(trim($g[0]->type)) == 'RITORNO')
  55. <a class="box-day" href="/calendario/{{$c->category->name}}{{isset($c->group) ? '-' . $c->group->name : ''}}/{{$c->id}}?day={{str_replace('ANDATA', '', str_replace('RITORNO', '', $idx))}}&type=RITORNO" style="{{$idx == $sel ? 'background-color:red;color:white' : 'color:black'}};padding:10px;border:1px solid black;font-weight:bold;">{{str_replace('ANDATA', '', str_replace('RITORNO', '', $idx))}}&ordf;</a>
  56. @endif
  57. @endforeach
  58. </div>
  59. </div>
  60. @if(isset($_GET["all"]))
  61. @foreach($games as $idx => $g)
  62. <h3>{{$idx}}</h3>
  63. <div class="row" style="margin-top:50px";>
  64. <div class="col-sm-12">
  65. <table class="table calendari">
  66. <tr style="background-color:#434343;color:white">
  67. <th>Data</th>
  68. <th colspan="2">Partita</th>
  69. <th>Risultato</th>
  70. </tr>
  71. @foreach($g as $idx => $gg)
  72. <tr style="background-color:{{$idx % 2 == 0 ? '#e5eae4' : '#d2b272'}}">
  73. <td>{{date("d/m/Y", strtotime($gg->date))}}</td>
  74. <td>{!!$gg->getHomeTeam()->name!!}</td>
  75. <td>{!!$gg->getAwayTeam()->name!!}</td>
  76. <td>{!!$gg->getResult()!!}</td>
  77. </tr>
  78. @endforeach
  79. </table>
  80. </div>
  81. </div>
  82. @endforeach
  83. @else
  84. @if(isset($_GET["day"]))
  85. <div class="row" style="margin-top:50px";>
  86. <div class="col-sm-12">
  87. <table class="table calendari">
  88. <tr style="background-color:#434343;color:white">
  89. <th>Data</th>
  90. <th colspan="2">Partita</th>
  91. <th>Risultato</th>
  92. </tr>
  93. @foreach($games[$_GET["day"] . $_GET["type"]] as $idx => $gg)
  94. <tr style="background-color:{{$idx % 2 == 0 ? '#e5eae4' : '#d2b272'}}">
  95. <td>{{date("d/m/Y", strtotime($gg->date))}}</td>
  96. <td>{!!$gg->getHomeTeam()->name!!}</td>
  97. <td>{!!$gg->getAwayTeam()->name!!}</td>
  98. <td>{!!$gg->getResult()!!}</td>
  99. </tr>
  100. @endforeach
  101. </table>
  102. </div>
  103. </div>
  104. @endif
  105. @endif
  106. <div class="row" style="margin-top:50px";>
  107. <div class="col-sm-12">
  108. <table class="table calendari">
  109. <tr style="background-color:#434343;color:white">
  110. <th>Squadra</th>
  111. <th style="width:50px;">Punti</th>
  112. <th style="width:50px;">PG</th>
  113. <th style="width:50px;">V</th>
  114. <th style="width:50px;">N</th>
  115. <th style="width:50px;">P</th>
  116. <th style="width:50px;">GF</th>
  117. <th style="width:50px;">GS</th>
  118. <th style="width:50px;">DR</th>
  119. </tr>
  120. @foreach($aRates as $idx => $r)
  121. <tr style="background-color:{{$idx % 2 == 0 ? '#e5eae4' : '#d2b272'}}">
  122. <td>{{$r["team"]}}</td>
  123. <td>{{$r["POINTS"]}}</td>
  124. <td>{{$r["PG"]}}</td>
  125. <td>{{$r["V"]}}</td>
  126. <td>{{$r["N"]}}</td>
  127. <td>{{$r["P"]}}</td>
  128. <td>{{$r["GF"]}}</td>
  129. <td>{{$r["GS"]}}</td>
  130. <td>{{$r["DR"]}}</td>
  131. </tr>
  132. @endforeach
  133. </table>
  134. </div>
  135. </div>
  136. @foreach($aRates as $idx => $r)
  137. @if($r["penality"] != '')
  138. {{$r["penality"]}}<br>
  139. @endif
  140. @endforeach
  141. </div>
  142. </div>
  143. </div>
  144. @stop