BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

global_notification.php 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. declare(strict_types = 1);
  3. if (!check_perms("users_mod")) {
  4. error(404);
  5. }
  6. View::show_header("Global Notification");
  7. $GlobalNotification = NotificationsManager::get_global_notification();
  8. $Expiration = $GlobalNotification['Expiration'] ? $GlobalNotification['Expiration'] / 60 : "";
  9. ?>
  10. <h2 class="header">
  11. Set global notification
  12. </h2>
  13. <div class="box pad">
  14. <form action="tools.php" method="post">
  15. <input type="hidden" name="action" value="take_global_notification" />
  16. <input type="hidden" name="type" value="set" />
  17. <table align="center">
  18. <tr>
  19. <td class="label">
  20. Message
  21. </td>
  22. <td>
  23. <input type="text" name="message" id="message" size="50"
  24. value="<?=$GlobalNotification['Message']?>" />
  25. </td>
  26. </tr>
  27. <tr>
  28. <td class="label">
  29. URL
  30. </td>
  31. <td>
  32. <input type="text" name="url" id="url" size="50"
  33. value="<?=$GlobalNotification['URL']?>" />
  34. </td>
  35. </tr>
  36. <tr>
  37. <td class="label">
  38. Importance
  39. </td>
  40. <td>
  41. <select name="importance" id="importance">
  42. <?php foreach (NotificationsManager::$Importances as $Key => $Value) { ?>
  43. <option value="<?=$Value?>" <?=$Value === $GlobalNotification['Importance'] ? ' selected="selected"' : ''?>><?=ucfirst($Key)?>
  44. </option>
  45. <?php } ?>
  46. </select>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td class="label">
  51. Length (in minutes)
  52. </td>
  53. <td>
  54. <input type="text" name="length" id="length" size="20"
  55. value="<?=$Expiration?>" />
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60. <input type="submit" name="set" value="Create Notification" />
  61. </td>
  62. <?php if ($GlobalNotification) { ?>
  63. <td>
  64. <input type="submit" name="delete" value="Delete Notification" />
  65. </td>
  66. <?php } ?>
  67. </tr>
  68. </table>
  69. </form>
  70. </div>
  71. <?php View::show_footer();