calendar.blade.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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" style="margin-bottom:10!important;">
  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 style="margin-top:30px;">Andata</h3>
  41. <span style="margin-top:-45px;float:right;margin-right:15px;"><a style="color:red;" href="/archivio">ARCHIVIO STATISTICO</a></span>
  42. <div class="row" style="margin-top:20px";>
  43. <div class="col-sm-12">
  44. @foreach($games as $idx => $g)
  45. @if(strtoupper(trim($g[0]->type)) == 'ANDATA')
  46. <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>
  47. @endif
  48. @endforeach
  49. </div>
  50. </div>
  51. <h3>Ritorno</h3>
  52. <div class="row" style="margin-top:20px";>
  53. <div class="col-sm-12">
  54. @foreach($games as $idx => $g)
  55. @if(strtoupper(trim($g[0]->type)) == 'RITORNO')
  56. <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>
  57. @endif
  58. @endforeach
  59. </div>
  60. </div>
  61. @if(isset($_GET["all"]))
  62. @foreach($games as $idx => $g)
  63. <h3>{{$idx}}</h3>
  64. <div class="row" style="margin-top:50px";>
  65. <div class="col-sm-12">
  66. <table class="table calendari">
  67. <tr style="background-color:#434343;color:white">
  68. <th>Data</th>
  69. <th colspan="2">Partita</th>
  70. <th>Risultato</th>
  71. </tr>
  72. @foreach($g as $idx => $gg)
  73. <tr style="background-color:{{$idx % 2 == 0 ? '#e5eae4' : '#d2b272'}}">
  74. <td>{{date("d/m/Y", strtotime($gg->date))}}</td>
  75. <td>{!!$gg->getHomeTeam()->name!!}</td>
  76. <td>{!!$gg->getAwayTeam()->name!!}</td>
  77. <td>{!!$gg->getResult()!!}</td>
  78. </tr>
  79. @endforeach
  80. </table>
  81. </div>
  82. </div>
  83. @endforeach
  84. @else
  85. @if(isset($_GET["day"]))
  86. <div class="row" style="margin-top:50px";>
  87. <div class="col-sm-12">
  88. <table class="table calendari">
  89. <tr style="background-color:#434343;color:white">
  90. <th>Data</th>
  91. <th colspan="2">Partita</th>
  92. <th>Risultato</th>
  93. </tr>
  94. @foreach($games[$_GET["day"] . $_GET["type"]] as $idx => $gg)
  95. <tr style="background-color:{{$idx % 2 == 0 ? '#e5eae4' : '#d2b272'}}">
  96. <td>{{date("d/m/Y", strtotime($gg->date))}}</td>
  97. <td>{!!$gg->getHomeTeam()->name!!}</td>
  98. <td>{!!$gg->getAwayTeam()->name!!}</td>
  99. <td>{!!$gg->getResult()!!}</td>
  100. </tr>
  101. @endforeach
  102. </table>
  103. </div>
  104. </div>
  105. @endif
  106. @endif
  107. <div class="row" style="margin-top:50px";>
  108. <div class="col-sm-12">
  109. <table class="table calendari">
  110. <tr style="background-color:#434343;color:white">
  111. <th>Squadra</th>
  112. <th style="width:50px;">Punti</th>
  113. <th style="width:50px;">PG</th>
  114. <th style="width:50px;">V</th>
  115. <th style="width:50px;">N</th>
  116. <th style="width:50px;">P</th>
  117. <th style="width:50px;">GF</th>
  118. <th style="width:50px;">GS</th>
  119. <th style="width:50px;">DR</th>
  120. </tr>
  121. @foreach($aRates as $idx => $r)
  122. <tr style="background-color:{{$idx % 2 == 0 ? '#e5eae4' : '#d2b272'}}">
  123. <td>{{$r["team"]}}</td>
  124. <td>{{$r["POINTS"]}}</td>
  125. <td>{{$r["PG"]}}</td>
  126. <td>{{$r["V"]}}</td>
  127. <td>{{$r["N"]}}</td>
  128. <td>{{$r["P"]}}</td>
  129. <td>{{$r["GF"]}}</td>
  130. <td>{{$r["GS"]}}</td>
  131. <td>{{$r["DR"]}}</td>
  132. </tr>
  133. @endforeach
  134. </table>
  135. </div>
  136. </div>
  137. @foreach($aRates as $idx => $r)
  138. @if($r["penality"] != '')
  139. {{$r["penality"]}}<br>
  140. @endif
  141. @endforeach
  142. </div>
  143. </div>
  144. </div>
  145. @stop