2013-08-28 23:08:41 +00:00
|
|
|
<?
|
|
|
|
|
|
|
|
if (!check_perms("users_mod")) {
|
|
|
|
error(404);
|
|
|
|
}
|
|
|
|
|
|
|
|
View::show_header("Global Notification");
|
|
|
|
|
|
|
|
$GlobalNotification = NotificationsManager::get_global_notification();
|
|
|
|
|
|
|
|
$Expiration = $GlobalNotification['Expiration'] ? $GlobalNotification['Expiration'] / 60 : "";
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h2>Set global notification</h2>
|
|
|
|
|
|
|
|
<div class="thin box pad">
|
2013-10-13 08:01:01 +00:00
|
|
|
<form action="tools.php" method="post">
|
|
|
|
<input type="hidden" name="action" value="take_global_notification" />
|
|
|
|
<input type="hidden" name="type" value="set" />
|
2013-08-28 23:08:41 +00:00
|
|
|
<table align="center">
|
|
|
|
<tr>
|
|
|
|
<td class="label">Message</td>
|
|
|
|
<td>
|
|
|
|
<input type="text" name="message" id="message" size="50" value="<?=$GlobalNotification['Message']?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="label">URL</td>
|
|
|
|
<td>
|
|
|
|
<input type="text" name="url" id="url" size="50" value="<?=$GlobalNotification['URL']?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="label">Importance</td>
|
|
|
|
<td>
|
|
|
|
<select name="importance" id="importance">
|
2013-10-13 08:01:01 +00:00
|
|
|
<? foreach (NotificationsManager::$Importances as $Key => $Value) { ?>
|
|
|
|
<option value="<?=$Value?>"<?=$Value == $GlobalNotification['Importance'] ? ' selected="selected"' : ''?>><?=ucfirst($Key)?></option>
|
|
|
|
<? } ?>
|
2013-08-28 23:08:41 +00:00
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="label">Length (in minutes)</td>
|
|
|
|
<td>
|
2013-10-13 08:01:01 +00:00
|
|
|
<input type="text" name="length" id="length" size="20" value="<?=$Expiration?>" />
|
2013-08-28 23:08:41 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<input type="submit" name="set" value="Create Notification" />
|
|
|
|
</td>
|
2013-10-13 08:01:01 +00:00
|
|
|
<? if ($GlobalNotification) { ?>
|
|
|
|
<td>
|
|
|
|
<input type="submit" name="delete" value="Delete Notification" />
|
|
|
|
</td>
|
|
|
|
<? } ?>
|
2013-08-28 23:08:41 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?
|
2013-10-13 08:01:01 +00:00
|
|
|
View::show_footer();
|