trigger_revert.php 781 B

12345678910111213141516171819202122232425262728
  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. $res = $ctl->cmd("trigger_revert", $_POST['tc_id']);
  6. if ($res[0] == "ok") tpl_redirect("trigger.php?ok=1");
  7. tpl_header();
  8. switch ($res[0]) {
  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 (". implode(',', $res) ."). Sorry!";
  20. }
  21. tpl_footer();