File: /home/u435929562/domains/butanking.com/public_html/resources/views/result-chart.blade.php
@php
use Carbon\Carbon;
use Carbon\CarbonPeriod;
@endphp
@extends('front')
@section('content')
<section class="bredcrumb-section">
<div class="fancy-title-head">
<h1 class="fancy-title entry-title start-animation-done start-animation">Result Chart</h1>
</div>
</section>
<section class="derby-bg-section">
<div>
<div class="calender-year" style="text-align: center;">
<label for="sel1" style="color: white;">Select Year:</label>
<select class="form-control" id="year" style="width: 150px;">
{{-- <option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option> --}}
<option value="2022" selected="">2022</option>
</select>
</div>
<div class="table-responsive gold-calender content">
@if($drawList && $month != 0)
<table class="table">
@foreach ($drawList as $k=>$d)
<tr>
<td align="left" colspan="32" style="border-top:none"><b class="t-main-header">{{ ucfirst($d->draw_name) }} ( {{ date('h:i A', strtotime($d->draw_time)) }} )</b>
</td>
</tr>
<tr>
<td align="left" valign="bottom"><b>MONTH/DATE</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>1</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>2</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>3</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>4</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>5</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>6</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>7</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>8</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>9</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>10</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>11</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>12</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>13</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>14</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>15</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>16</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>17</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>18</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>19</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>20</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>21</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>22</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>23</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>24</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>25</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>26</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>27</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>28</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>29</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>30</b></td>
<td align="right" valign="bottom" sdval="1" sdnum="1033;"><b>31</b></td>
</tr>
@if($month != 0)
@foreach ($month as $j=>$m)
<tr class="data">
<td align="right" valign="bottom"><b>{{ date("M y", mktime(0, 0, 0, $m, 1)) }} </b></td>
<?php
$priceList = getDataByMonth($m,$d->id);
$today = Carbon::now();
$date = $today->format('Y-m-d');
$mon = $today->format('m');
$utc = $today->format('H:i:s');
$time = date("H:i", strtotime($utc));
?>
@foreach ($priceList as $price)
@if ($date == $price->draw_date && $price->draw_time > $time)
<td valign="bottom" align="right"><b></b></td>
@else
<td valign="bottom" align="right"><b>{{ $price->first_price ?? "" }}</b></td>
@endif
{{-- <td valign="bottom" align="right"><b>{{ $price->first_price ?? "" }}</b></td> --}}
@endforeach
@php
$diff = 31 - count($priceList);
@endphp
@if ( $diff != 0 && $m != $mon)
@for ($i = 0; $i < $diff; $i++)
<td valign="bottom" align="right"><b>Nil</b></td>
@endfor
@endif
</tr>
@endforeach
@endif
@endforeach
</table>
@else
<div class="error" id="error">
<div class="alert alert-danger"> <strong>Sorry </strong> No Draws found.</div>
</div>
@endif
</div>
</div>
</section>
<footer id="footer" class="footer solid-bg empty-footer">
<div id="bottom-bar" class="full-width-line logo-left" role="contentinfo">
<div class="wf-wrap">
<div class="wf-container-bottom">
</div>
</div>
</div>
</footer>
<a id="button" class="hvr-float-shadow" href=""><i class="fas fa-arrow-up"></i></i></a>
@endsection
@section('js')
<script>
var btn = $('#button');
$(window).scroll(function() {
if ($(window).scrollTop() > 300) {
btn.addClass('show');
} else {
btn.removeClass('show');
}
});
</script>
@endsection