This commit is contained in:
William 2022-03-16 12:43:21 +01:00
parent c85dba499c
commit cdd1fa0575
3 changed files with 6 additions and 2 deletions

View File

@ -22,6 +22,7 @@ class Cardreader
}
/**
* TODO: yeah this sucks but it werks!
* Returns:
* 0 created team
* 1 started counting
@ -52,6 +53,9 @@ class Cardreader
return 3;
}
$team->rounds += 1;
$this->teamMapper->update($team);
if ($team->bestTime === NULL)
{
$team->bestTime = $diff;

View File

@ -29,7 +29,7 @@
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='danger' href='delete.php?item={$team->id}&confirm=1'>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>';

View File

@ -12,7 +12,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
if (!(strlen($cardnumber) > 32)) {
$code = $cardreader->receive($cardnumber, 30);
$code = $cardreader->receive($cardnumber, 5);
switch ($code) {
case 0:
$app->session->flash('Opprettet nytt lag', 'success');