2024-04-07 22:40:57 +02:00
|
|
|
<?php
|
|
|
|
use App\Models\CarsModel;
|
|
|
|
$carsModel = new CarsModel();
|
|
|
|
?>
|
2022-03-14 19:13:10 +01:00
|
|
|
<div class="container">
|
|
|
|
<h1><?= $track->name; ?></h1>
|
|
|
|
<div class="ct-info">
|
|
|
|
<div class="ct-img">
|
2024-04-07 22:40:57 +02:00
|
|
|
<?= imgTagFull($track->img, 'track-img', $track->name) ?>
|
2022-03-14 19:13:10 +01:00
|
|
|
</div>
|
|
|
|
<div class="ct-info-body">
|
|
|
|
<div class="ct-info-row">
|
|
|
|
<div class="ct-info-title">
|
|
|
|
Author:
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<?= $track->author; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ct-info-row">
|
|
|
|
<div class="ct-info-title">
|
|
|
|
Description:
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<?= $track->description; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h3>Bests laps:</h3>
|
|
|
|
<table class="fullPage responsive">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Racer</th>
|
|
|
|
<th>Time</th>
|
|
|
|
<th>Car</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($bestLaps as $bl): ?>
|
2024-04-07 22:40:57 +02:00
|
|
|
<?php $car = $carsModel->data($bl->car_id) ?>
|
2022-03-14 19:13:10 +01:00
|
|
|
<tr>
|
|
|
|
<td data-title="Racer">
|
|
|
|
<?= $bl->username ?>
|
|
|
|
</td>
|
|
|
|
<td data-title="Time">
|
|
|
|
<?= formatLaptime($bl->laptime) ?>
|
|
|
|
</td>
|
|
|
|
<td data-title="Car">
|
2024-04-07 22:40:57 +02:00
|
|
|
<?= clickableName($car->id, 'car', $car->name) ?>
|
2022-03-14 19:13:10 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|