diff --git a/admin.php b/admin.php index c3be309..a9267af 100644 --- a/admin.php +++ b/admin.php @@ -33,6 +33,12 @@
  • ⏱️ Registrer passering på matpost/mål
  • 👥 Endre løperbase
  • ⚙️ Konfigurasjon
  • +
  • ⏳️ Nedtelling matpost + +
  • 1. mat
  • +
  • 2. mat
  • +
    +
  • diff --git a/api/countdown.php b/api/countdown.php new file mode 100644 index 0000000..25d334f --- /dev/null +++ b/api/countdown.php @@ -0,0 +1,50 @@ +Tid igjen på matpost:

    "; + $finished = "

    Kan løpe videre:

    "; + for ($i = 0; $i < count($runners); $i++) { + $runner = $runners[$i]; + if ($runner->get_control() == $control){ + $time_since_punch = time() - ($runner->splits[$control])->getTimestamp(); + + //Løperen har ikke venta 4 minutt: + if ($time_since_punch < $time_limit) { + $time = format($time_limit - $time_since_punch); + $waiting .= "
    $runner->id $runner->name -$time
    "; + } elseif ($time_since_punch >= $time_limit && $time_since_punch <900){ //Løperen har venta ferdig + $time = format(time()-$runner->splits[$control]->getTimestamp() - $time_limit) ; + $finished .= "
    $runner->id $runner->name +$time
    "; + } + + + + } + } + echo($waiting . "
    ". $finished . "

    "); +} \ No newline at end of file diff --git a/config_editor.html b/config_editor.html index e0cf96d..9f4954d 100644 --- a/config_editor.html +++ b/config_editor.html @@ -19,6 +19,12 @@
  • ⏱️ Registrer passering på matpost/mål
  • 👥 Endre løperbase
  • ⚙️ Konfigurasjon
  • +
  • ⏳️ Nedtelling matpost + +
  • 1. mat
  • +
  • 2. mat
  • +
    +
  • diff --git a/db_editor.html b/db_editor.html index d31b1bc..8df0cb7 100644 --- a/db_editor.html +++ b/db_editor.html @@ -19,6 +19,12 @@
  • ⏱️ Registrer passering på matpost/mål
  • 👥 Endre løperbase
  • ⚙️ Konfigurasjon
  • +
  • ⏳️ Nedtelling matpost + +
  • 1. mat
  • +
  • 2. mat
  • +
    +
  • Legg til løper

    diff --git a/matpost_nedtelling.php b/matpost_nedtelling.php new file mode 100644 index 0000000..2a5e4a6 --- /dev/null +++ b/matpost_nedtelling.php @@ -0,0 +1,67 @@ + + + + + EKT admin + + + + + + + + + + + + +"); +?> + + + + \ No newline at end of file diff --git a/registrering.php b/registrering.php index 71cfccb..b1d3a28 100644 --- a/registrering.php +++ b/registrering.php @@ -53,6 +53,12 @@
  • ⏱️ Registrer passering på matpost/mål
  • 👥 Endre løperbase
  • ⚙️ Konfigurasjon
  • +
  • ⏳️ Nedtelling matpost + +
  • 1. mat
  • +
  • 2. mat
  • +
    +