La til endring av databasen og sjekk av ridstreng

This commit is contained in:
Trygve
2025-10-30 23:21:49 +01:00
parent f2ede38dca
commit 5b62326c42
6 changed files with 115 additions and 12 deletions

View File

@@ -24,10 +24,15 @@ if ($method == "POST") {
$start_time = $_POST['start_time'];
$password = $_POST['password'];
$new_time = DateTime::createFromFormat(DateTime::ISO8601, $start_time. "+01");
if (!password_verify($password, $hash)) {
http_response_code(response_code: 401);
}
else {
} elseif (!$new_time) {
http_response_code(response_code: 400);
echo("Feil datoformat din noldus!!!!!!!11!!! Skriv inn sekund");
} else {
$file = "$documentRoot/data/config.ini";
$config["start_date"] = $start_time . "+01";
write_ini_file($config, $file);