fixed timestamp at the statistics table

This commit is contained in:
2022-06-12 22:40:38 +02:00
parent 4118f76f92
commit 491a12276d
2 changed files with 38 additions and 3 deletions

View File

@@ -21,7 +21,11 @@
}
if (get_minutes($con, $m_id, $s_id)->fetch()['minutes'] != $minutes || get_seconds($con, $m_id, $s_id)->fetch()['seconds'] != $seconds || get_millis($con, $m_id, $s_id)->fetch()['millis'] != $millis) {
$time = "00:" . $minutes . ":" . $seconds . "." . $millis;
if ($millis < 10) {
$time = "00:" . $minutes . ":" . $seconds . "." . "0" . $millis;
} else {
$time = "00:" . $minutes . ":" . $seconds . "." . $millis;
}
change_time($con, $m_id, $s_id, $time);
}
@@ -48,7 +52,7 @@
<label for="seconds">Sekunden</label>
<input name="seconds" type="number" min="0" max="60" value=<?php if(!$time_set){echo"\"0\"";} else { echo "\"" . get_seconds($con, $row['m_id'], $row['s_id'])->fetch()['seconds'] . "\""; }?>/><br>
<label for="millis">Millisekunden</label>
<input name="millis" type="number" min="0" max="99" value=<?php if(!$time_set){echo"\"0\"";} else { echo "\"" . get_millis($con, $row['m_id'], $row['s_id'])->fetch()['millis'] . "\""; }?>/><br>
<input name="millis" type="number" min="0" max="99" value=<?php if(!$time_set){echo"\"0\"";} else { echo "\"" . get_millis($con, $row['m_id'], $row['s_id'])->fetch()['millis'] / 1e4 . "\""; }?>/><br>
</div>
<input type="hidden" name="m_id" value=<?php echo $row['m_id'] ?>/>
<input type="hidden" name="s_id" value=<?php echo $row['s_id'] ?>/>