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/teamtable/edit/index.php
2022-03-14 11:36:45 +01:00

38 lines
1.4 KiB
PHP

<h1>Endre lagtabell</h1>
<span class="float-right">[&nbsp;<a class="success" href="update.php">Opprett lag</a>&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}&confirm=1'>Slett</a>&nbsp;]</span>";
echo "<span>[&nbsp;<a class='info' href='update.php?item={$team->id}'>Endre</a>&nbsp;]</span>";
echo "</td>";
echo '</tr>';
}
?>
</table>