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.

viewticket.php 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?PHP
  2. if (!isset($error)) {
  3. ?>
  4. <div class="block">
  5. <h2>Original ticket</h2>
  6. <table class="innerblock righthead bottomdiv">
  7. <tr>
  8. <th>Title</th>
  9. <td><?PHP echo h(TICKET_TITLE); ?></td>
  10. </tr>
  11. <tr>
  12. <th>Author</th>
  13. <td><?PHP echo h(TICKET_USER); ?></td>
  14. </tr>
  15. <tr>
  16. <th>Status</th>
  17. <td><?PHP echo ucfirst(TICKET_STATUS); ?></td>
  18. </tr>
  19. <tr>
  20. <th>Date</th>
  21. <td><?PHP echo date('r',TICKET_TIME); ?></td>
  22. </tr>
  23. </table>
  24. <div class="innerblock">
  25. <?PHP echo h(TICKET_BODY); ?>
  26. </div>
  27. </div>
  28. <?PHP
  29. while ($row = mysql_fetch_array(TICKET_RES)) {
  30. ?>
  31. <div class="block">
  32. <h2>Reply</h2>
  33. <table class="innerblock righthead bottomdiv">
  34. <tr>
  35. <th>Author</th>
  36. <td><?PHP echo $row['ud_name']; if ($row['user_admin'] == '1') { echo ' (UTD Staff)'; } ?></td>
  37. </tr>
  38. <tr>
  39. <th>Date</th>
  40. <td><?PHP echo date('r',$row['ticket_time']); ?></td>
  41. </tr>
  42. </table>
  43. <div class="innerblock">
  44. <?PHP echo h($row['ticket_body']); ?>
  45. </div>
  46. </div>
  47. <?PHP
  48. }
  49. ?>
  50. <form action="<?PHP echo CP_PATH; ?>doticketreply" method="post">
  51. <input type="hidden" name="thread" value="<?PHP echo TICKET_ID; ?>">
  52. <div class="block">
  53. <h2>Post a new reply</h2>
  54. <table class="innerblock righthead bottomdiv">
  55. <tr>
  56. <th>Status</th>
  57. <td>
  58. <select name="status" style="width: 100%;" class="inflat">
  59. <option value="<?PHP echo TICKET_STATUS; ?>"><?PHP echo ucfirst(TICKET_STATUS); ?> (Leave unchanged)</option>
  60. <?PHP
  61. $o = array();
  62. $s = TICKET_STATUS;
  63. if ($s == 'new' || $s == 'reopened') {
  64. $o['closed'] = true;
  65. if (defined('ADMIN')) { $o['assigned'] = true; }
  66. }
  67. if ($s == 'assigned') {
  68. $o['closed'] = true;
  69. }
  70. if ($s == 'closed') {
  71. $o['reopened'] = true;
  72. }
  73. ?>
  74. <?PHP if (isset($o['closed'])) { ?><option value="closed">Closed</option><?PHP } ?>
  75. <?PHP if (isset($o['assigned'])) { ?><option value="assigned">Assigned</option><?PHP } ?>
  76. <?PHP if (isset($o['reopened'])) { ?><option value="reopened">Reopened</option><?PHP } ?>
  77. </select>
  78. </td>
  79. </tr>
  80. </table>
  81. <div class="innerblock">
  82. <textarea name="message" class="inflat" style="width: 98%; height: 100px; "></textarea><br>
  83. <input type="submit" value="Add reply" style="float: right; margin: 10px;">
  84. <br style="clear: right;">
  85. </div>
  86. </div>
  87. </form>
  88. <?PHP
  89. } else {
  90. echo '<div id="message"><div>'.$error.'</div></div>';
  91. }
  92. ?>