summaryrefslogtreecommitdiff
path: root/computer-time-limit.php
diff options
context:
space:
mode:
Diffstat (limited to 'computer-time-limit.php')
-rw-r--r--computer-time-limit.php6
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();
}