diff options
author | Stefanie Eckner <stefanie@eckner.net> | 2024-02-17 09:18:59 +0100 |
---|---|---|
committer | Stefanie Eckner <stefanie@eckner.net> | 2024-02-17 09:18:59 +0100 |
commit | 87f2bb4aa8891b342542c9b1eb0f23908593b738 (patch) | |
tree | 270e3f3fb4af67df25ff87c8dbece53c1386bf1e /computer-time-limit.php | |
parent | e7e4eeff0b261e09fdb48572830abcd78c242015 (diff) | |
download | computer-time-limit-87f2bb4aa8891b342542c9b1eb0f23908593b738.tar.xz |
log the things that actually go to the db
Diffstat (limited to 'computer-time-limit.php')
-rw-r--r-- | computer-time-limit.php | 6 |
1 files 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(); } |