This repository has been archived on 2023-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
web/app/view/pages/race/configure/teams/index.php
2022-03-20 22:02:26 +01:00

39 lines
1.5 KiB
PHP

<h1>Endre lagtabell</h1>
<span class="float-right">[&nbsp;<a class="success" href="update.php">Opprett lag</a>&nbsp;]</span>
<span class="float-right">[&nbsp;<a class="danger" href="../reset.php">Nullstill runder</a>&nbsp;]&nbsp;</span>
<br>
<table>
<tr>
<th>#</th>
<th>Navn</th>
<th>Bedrift</th>
<th>Kortnummer</th>
<th>Leder</th>
<th>Telefon</th>
<th>Deltagere</th>
<th>Runder</th>
<th>Bestetid</th>
<th>Handling</th>
</tr>
<?php
$i = 0;
foreach ($teams as $team) {
$i++;
echo '<tr>';
echo "<td>" . $i . "</td>";
echo "<td>" . htmlspecialchars($team->name) . "</td>";
echo "<td>" . htmlspecialchars($team->company) . "</td>";
echo "<td>" . htmlspecialchars($team->cardnumber) . "</td>";
echo "<td>" . htmlspecialchars($team->leader) . "</td>";
echo "<td>" . htmlspecialchars($team->phone) . "</td>";
echo "<td>" . htmlspecialchars($team->participants) . "</td>";
echo "<td>" . htmlspecialchars($team->rounds) . "</td>";
echo "<td>" . htmlspecialchars(($team->bestTime === NULL) ? "Ukjent" : $team->bestTime) . "</td>";
echo "<td>";
echo "<span>[&nbsp;<a class='danger' href='delete.php?item={$team->id}'>Slett</a>&nbsp;]&nbsp;</span>";
echo "<span>[&nbsp;<a class='info' href='update.php?item={$team->id}'>Endre</a>&nbsp;]</span>";
echo "</td>";
echo '</tr>';
}
?>
</table>