Unsupported scripts and control panel web app for a hosting company
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.

viewlog.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?PHP
  2. require_once('lib/dashboard.php');
  3. require_once('lib/common.php');
  4. if (!isset($_GET['n']) || !ctype_digit($_GET['n'])) {
  5. header('Location: '.CP_PATH);
  6. }
  7. $sql = 'SELECT i_title FROM issues_issues WHERE i_id = '.m($_GET['n']);
  8. $viewIssueRes = mysql_query($sql) or die(mysql_error().'<br />'.$sql);
  9. if (mysql_num_rows($viewIssueRes) == 0) {
  10. header('Location: '.CP_PATH);
  11. }
  12. $viewIssueData = mysql_fetch_assoc($viewIssueRes);
  13. $sql = 'SELECT ilog_id, ilog_time, user_name, ilog_field, ilog_old, ilog_new';
  14. $sql .= ' FROM issues_logs NATURAL JOIN users';
  15. $sql .= ' WHERE i_id = '.m($_GET['n']);
  16. $sql .= ' ORDER BY ilog_time';
  17. $viewIssueChangesRes = mysql_query($sql) or die(mysql_error());
  18. $issueChanges = array();
  19. while ($viewIssueChangesData = mysql_fetch_assoc($viewIssueChangesRes)) {
  20. $issueChanges[$viewIssueChangesData['ilog_id']] = $viewIssueChangesData;
  21. }
  22. define('TITLE', 'Issue tracker :: View Issue Changes :: '.h($viewIssueData['i_title']));
  23. addDashboardItem('Actions', 'Raise new issue', 'addissue');
  24. addDashboardItem('Actions', 'Edit', 'editissue/'.$_GET['n']);
  25. addDashboardItem('Actions', 'Reply', 'addreply/'.$_GET['n']);
  26. addDashboardItem('Actions', 'View Log', 'viewlog/'.$_GET['n']);
  27. include_once('res/commonDashboard.php');
  28. require_once('lib/header.php');
  29. require_once('pages/viewlog.php');
  30. require_once('lib/footer.php');
  31. ?>