From 87f2bb4aa8891b342542c9b1eb0f23908593b738 Mon Sep 17 00:00:00 2001 From: Stefanie Eckner Date: Sat, 17 Feb 2024 09:18:59 +0100 Subject: log the things that actually go to the db --- computer-time-limit.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/computer-time-limit.php b/computer-time-limit.php index 67d6c15..fd23b30 100644 --- a/computer-time-limit.php +++ b/computer-time-limit.php @@ -76,12 +76,14 @@ if (array_key_exists('msg', $_POST) && array_key_exists('sig', $_POST)) { if ($noch == 0) { $aktiv = 0; } + $von = date('Y-m-d H:i:s', time()); + $bis = date('Y-m-d H:i:s', time() + $noch); log_to_file('to_db ' . $key . ' ' . $aktiv . ' ' . $von . ' ' . $bis); $db -> exec( 'UPDATE `computer_time`' . ' SET `aktiv`=' . $aktiv . ',' . - '`von`="' . date('Y-m-d H:i:s', time()) . '",' . - '`bis`="' . date('Y-m-d H:i:s', time() + $noch) . '"' . + '`von`="' . $von . '",' . + '`bis`="' . $bis . '"' . ' WHERE `name`="' . $key . '"'); die(); } -- cgit v1.2.3-70-g09d2