trigger_edit.php 799 B

123456789101112131415161718192021222324252627
  1. <?php
  2. require("user.inc.php");
  3. require("template.inc.php");
  4. if (!$username) die("Be a good boy and log in first.");
  5. list($status, $arg) = $ctl->cmd("trigger_edit", $_POST['trigger'], $_POST['exp']);
  6. if ($status == "ok") tpl_redirect("trigger.php?ok=1");
  7. tpl_header();
  8. switch ($status) {
  9. case "denied":
  10. print "<p>You are not allowed to edit triggers, sorry.";
  11. break;
  12. case "doesntexist":
  13. print "<p>You tried to edit a trigger that doesn't exist. If you want to add a new trigger, please do so on IRC (if you are allowed to).";
  14. break;
  15. case "locked":
  16. print "<p>This trigger is locked against edits. You need special privileges in order to edit it.";
  17. break;
  18. default:
  19. print "<p>Something unknown and confusing happened and your edit didn't go through ($status, $arg). Sorry!";
  20. }
  21. tpl_footer();