diff options
author | Erich Eckner <git@eckner.net> | 2023-12-27 17:15:02 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-12-27 17:15:02 +0100 |
commit | f64ffda854b322763880584f23314fbfc19ce4f8 (patch) | |
tree | f6cbae22207d896145a496296991dda4ea2161cf /computer-time-limit.php | |
parent | 0f5e5dfa412fda2d9aef33c1ee53ddfc01d65d26 (diff) | |
download | computer-time-limit-f64ffda854b322763880584f23314fbfc19ce4f8.tar.xz |
nun mit Status
Diffstat (limited to 'computer-time-limit.php')
-rw-r--r-- | computer-time-limit.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/computer-time-limit.php b/computer-time-limit.php index b3d9bbc..22b7992 100644 --- a/computer-time-limit.php +++ b/computer-time-limit.php @@ -1 +1,29 @@ <?php + +$db = new SQLite3('../backstage/computer-time-limit.sqlite'); + +$result = $db->query('select * from `computer_time`'); + +?><html><body><table><?php + +while ($row = $result->fetchArray()) { + + $bis = strtotime($row['bis']); + $von = strtotime($row['von']); + if ($row['aktiv']) { + $von = time(); + } + $noch = $bis - $von; + + ?><tr><td><?php print($row['name']); ?></td><td><?php + + print(date('Y-m-d H:i:s', $bis)); + print(' ('); + print($noch); + print(')'); + + ?></td></tr> + <?php +} + +?></table></body></html> |