🔔 User Notifications v0.6

This commit is contained in:
jokob-sk
2024-06-03 07:39:27 +10:00
parent 91ff13df27
commit 8a0b8b8a10
24 changed files with 430 additions and 203 deletions

View File

@@ -1,5 +1,9 @@
<?php
require dirname(__FILE__).'/../templates/timezone.php';
// Check if the action parameter is set in the GET request
if (isset($_GET['action'])) {
// Collect GUID if provided
@@ -59,7 +63,7 @@ function write_notification($content, $level = "interrupt") {
$guid = generate_guid();
// Generate timestamp
$timestamp = date("Y-m-d H:i:s");
$timestamp = (new DateTime('now'))->format('Y-m-d H:i:s');
// Escape content to prevent breaking JSON
$escaped_content = json_encode($content);