Files
ops-Gazelle/sections/tools/managers/take_global_notification.php
T
2020-05-27 20:33:46 +02:00

17 lines
431 B
PHP

<?php
use \Gazelle\Manager\Notification;
if (!check_perms("admin_global_notification")) {
error(404);
}
$notification = new Notification;
if ($_POST['set']) {
$Expiration = $_POST['length'] * 60;
$notification->setGlobal($_POST['message'], $_POST['url'], $_POST['importance'], $Expiration);
} elseif ($_POST['delete']) {
$notification->deleteGlobal();
}
header("Location: tools.php?action=global_notification");