ticket_update.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <div align='center'>
  2. <table width='100%' border='0' cellpadding='0' cellspacing='2'>
  3. <tr class='border'>
  4. <td align=\"left\">
  5. <br>
  6. <form method='post' name='ifrm' action=''>
  7. <div align='center'>
  8. <table width='100%' border='0' cellpadding='6' cellspacing='0'>
  9. <tr>
  10. <td colspan='2'>
  11. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  12. <tr>
  13. <td align='left' width="50%">
  14. <strong>Update Ticket</strong><br>
  15. </td>
  16. <td width='50%' align='right'>
  17. <input type='submit' name='submit' class='btn' value='Save'>
  18. <input type='button' class='btn' name='' alt='back' onclick="window.location='v_tickets.php'" value='Back'>
  19. </td>
  20. </tr>
  21. </table>
  22. </td>
  23. </tr>
  24. <tr>
  25. <td colspan="2">
  26. <table width='100%' border="0" cellpadding="0" cellspacing="0">
  27. <tr><td width="47%" valign="top">
  28. <table width='100%' border="0" cellpadding="0" cellspacing="0">
  29. <tr><th colspan='2'>Ticket Info</th></tr>
  30. <tr>
  31. <td width="30%" class='vncell' valign='top' align='left' nowrap='nowrap'>
  32. Subject:
  33. </td>
  34. <td width="70%" class='vtable' align='left'>
  35. <?php echo $ticket_header['subject']; ?>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  40. Requestor:
  41. </td>
  42. <td class='vtable' align='left'>
  43. <?php echo $ticket_header['username']; ?>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  48. Created:
  49. </td>
  50. <td class='vtable' align='left'>
  51. <?php echo $ticket_header['create_stamp']; ?> by <?php echo $ticket_header['create_username']; ?>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  56. Last Update:
  57. </td>
  58. <td class='vtable' align='left'>
  59. <?php echo $ticket_header['last_update_stamp']; ?> by <?php echo $ticket_header['last_update_username']; ?>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  64. Ticket Number:
  65. </td>
  66. <td class='vtable' align='left'>
  67. <?php echo $ticket_header['ticket_number']; ?>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  72. Customer Ticket Number:
  73. </td>
  74. <td class='vtable' align='left'>
  75. <input class='formfld' type='text' name='customer_ticket_number' maxlength='255' value="<?php echo $ticket_header['customer_ticket_number']; ?>">
  76. </td>
  77. </tr>
  78. </table>
  79. </td>
  80. </td>
  81. <td width="6%">
  82. </td>
  83. <td width="47%" valign="top">
  84. <table width='100%' border="0" cellpadding="0" cellspacing="0">
  85. <tr><th colspan='2'>Ticket Status</th></tr>
  86. <?php if ($isadmin) { ?>
  87. <tr>
  88. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  89. Ticket Owner:
  90. </td>
  91. <td class='vtable' align='left'>
  92. <select name="ticket_owner">
  93. <option value=''>--</option>
  94. <?php foreach ($queue_members as $qm) {
  95. echo "<option value='" . $qm['user_uuid'] . "' ";
  96. if ($qm['user_uuid'] == $ticket_header['ticket_owner']) echo "selected='selected'";
  97. echo ">" . $qm['username'] . "</option>\n";
  98. }
  99. ?>
  100. </select>
  101. </td>
  102. </tr>
  103. <?php } ?>
  104. <tr>
  105. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  106. Ticket status:
  107. </td>
  108. <td class='vtable' align='left'>
  109. <?php if ($isadmin) { ?>
  110. <select name="ticket_status">
  111. <?php foreach ($ticket_statuses as $ts) {
  112. echo "<option value='" . $ts['status_id'] . "' ";
  113. if ($ts['status_id'] == $ticket_header['ticket_status']) echo "selected='selected'";
  114. echo ">" . $ts['status_name'] . "</option>\n";
  115. }
  116. ?>
  117. </select>
  118. <?php } else {
  119. foreach($ticket_statuses as $ts) {
  120. if ($ts['status_id'] == $ticket_header['ticket_status']) echo $ts['status_name'];
  121. }
  122. } ?>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td class='vncell' valign='top' align='left' nowrap='nowrap'>
  127. Ticket Queue:
  128. </td>
  129. <td class='vtable' align='left'>
  130. <?php if ($isadmin) { ?>
  131. <select name="queue_id">
  132. <?php foreach ($ticket_queues as $tq) {
  133. echo "<option value='" . $tq['queue_id'] . "' ";
  134. if ($tq['queue_id'] == $ticket_header['queue_id']) echo "selected='selected'";
  135. echo ">" . $tq['queue_name'] . "</option>\n";
  136. }
  137. ?>
  138. </select>
  139. <?php } else {
  140. foreach ($ticket_queues as $tq) {
  141. if ($tq['queue_id'] == $ticket_header['queue_id']) echo $tq['queue_name'];
  142. }
  143. } ?>
  144. </td>
  145. </tr>
  146. </table>
  147. </td>
  148. </table>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td colspan='2' align='right'>
  153. <input type='hidden' name='id' value='<?php echo $ticket_header['ticket_id']; ?>'/>
  154. <input type='submit' name='submit' class='btn' value='Save'/>
  155. </td>
  156. </tr>
  157. <tr><td colspan='2'><table width='100%' border="0" cellpadding="0" cellspacing="0">
  158. <tr><th colspan='2'>Ticket Notes</th></tr>
  159. <tr>
  160. <td width="30%" class='row_style0' valign='top' align='left' nowrap='nowrap'>
  161. <input type="checkbox" name="alert_user" value="1"/>Alert User<br>
  162. Attach File<br />
  163. <input type="file" name="file" id="file" />
  164. </td>
  165. <td class='row_style0' align='left'>
  166. <textarea rows='5' cols='80' class='formfld' type='text' name='new_note'></textarea>
  167. </td>
  168. </tr>
  169. <?php
  170. $row_style[0] = 'row_style0';
  171. $row_style[1] = 'row_style1';
  172. $rs = 0;
  173. foreach($ticket_notes as $tn) {
  174. if ($rs == 1) { $rs = 0; } else { $rs = 1; }
  175. ?>
  176. <tr>
  177. <td width="30%" class="<?php echo $row_style[$rs]; ?>" valign='top' align='left' nowrap='nowrap'>
  178. Updated: <?php echo $tn['create_stamp']; ?><br/>By: <?php echo $ticket_header['username']; ?>
  179. <?php if (strlen($tn['file_pointer']) > 1) echo "<br>File Attachment: " . $tn['file_pointer']; ?>
  180. </td>
  181. <td class="<?php echo $row_style[$rs]; ?>" align='left'>
  182. <?php echo base64_decode($tn['ticket_note']); ?>
  183. </td>
  184. </tr>
  185. <?php }?>
  186. </table></td></tr>
  187. <tr>
  188. <td colspan='2' align='right'>
  189. <input type='hidden' name='id' value='<?php echo $ticket_header['ticket_id']; ?>'/>
  190. <input type='submit' name='submit' class='btn' value='Save'/>
  191. </td>
  192. </tr>
  193. </table></form> </td> </tr></table></div>