trigger_recent.php 694 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require("user.inc.php");
  3. require("template.inc.php");
  4. list($status, $data) = $ctl->cmd("trigger_recentchanges");
  5. tpl_header();
  6. $data = json_decode($data, true);
  7. print "<h2>Recent changes to triggers</h2>";
  8. if (!$data) {
  9. print "<p>No changes recorded yet.";
  10. tpl_footer();
  11. exit;
  12. }
  13. print "<p>Click on one of the triggers to get its edit history";
  14. if (logged_in()) print " or edit it";
  15. print ".<dl>";
  16. foreach ($data as $v) {
  17. $t = htmlspecialchars($v['trigger']);
  18. $tu = urlencode($v['trigger']);
  19. print "<dt><a href=\"trigger_detail.php?trigger=$tu\">!$t</a></dt><dd>".htmlspecialchars($v['exp'])."<em> -- $v[changed_by] at $v[changed_at]</em></dd>";
  20. }
  21. print "</dl>";
  22. tpl_footer();