home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / dotproject / modules / ticketsmith / post_ticket.php < prev    next >
Encoding:
PHP Script  |  2004-01-28  |  3.2 KB  |  92 lines

  1. <?php /* TICKETSMITH $Id: post_ticket.php,v 1.14 2004/01/28 05:47:36 ajdonnison Exp $ */
  2. ##
  3. ##    Ticketsmith Post Ticket
  4. ##
  5.  
  6. if (!$canEdit) {
  7.     $AppUI->redirect( "m=public&a=access_denied" );
  8. }
  9.  
  10.  
  11. // setup the title block
  12. $titleBlock = new CTitleBlock( 'Submit Trouble Ticket', 'gconf-app-icon.png', $m, "$m.$a" );
  13. $titleBlock->addCrumb( "?m=ticketsmith", "tickets list" );
  14. $titleBlock->show();
  15.  
  16. ?>
  17.  
  18. <SCRIPT language="javascript">
  19. function submitIt() {
  20.     var f = document.ticketform;
  21.     var msg = '';
  22.     if (f.name.value.length < 3) {
  23.         msg += "\n- <?php echo $AppUI->_('a valid name'); ?>"
  24.     }
  25.     if (f.email.value.length < 3) {
  26.         msg += "\n- <?php echo $AppUI->_('a valid email'); ?>";
  27.     }
  28.     if (f.subject.value.length < 3) {
  29.         msg += "\n- <?php echo $AppUI->_('a valid subject'); ?>";
  30.     }
  31.     if (f.description.value.length < 3) {
  32.         msg += "\n- <?php echo $AppUI->_('a valid description'); ?>";
  33.     }
  34.     
  35.     if (msg.length < 1) {
  36.         f.submit();
  37.     } else {
  38.         alert( "<?php echo $AppUI->_('ticketsmithValidDetail'); ?>:" + msg );
  39.     }
  40. }
  41. </script>
  42.  
  43. <TABLE width="100%" border=0 cellpadding="0" cellspacing=1 class="std">
  44. <form name="ticketform" action="?m=ticketsmith" method="post">
  45. <input type="hidden" name="dosql" value="do_ticket_aed">
  46.  
  47. <TR height="20">
  48.     <Th colspan=2>
  49.          <font face="verdana,helveitica,arial,sans-serif" color=#ffffff><strong><?php echo $AppUI->_('Trouble Details'); ?></strong></font>
  50.     </th>
  51. </tr>
  52. <tr>
  53.     <TD align="right"><?php echo $AppUI->_('Name'); ?>:</td>
  54.     <TD><input type="text" class="text" name="name" value="<?php echo $AppUI->user_first_name . ' ' . $AppUI->user_last_name; ?>" size=50 maxlength="255"> <span class="smallNorm">(<?php echo $AppUI->_('required'); ?>)</span></td>
  55. </tr>
  56. <tr>
  57.     <TD align="right"><?php echo $AppUI->_('E-Mail'); ?>:</td>
  58.     <TD><input type="text" class="text" name="email" value="<?php echo $AppUI->user_email; ?>" size=50 maxlength="50"> <span class="smallNorm">(<?php echo $AppUI->_('required'); ?>)</span></td>
  59. </tr>
  60. <tr>
  61.     <TD align="right"><?php echo $AppUI->_('Subject'); ?>:</td>
  62.     <TD><input type="text" class="text" name="subject" value="" size=50 maxlength="50"> <span class="smallNorm">(<?php echo $AppUI->_('required'); ?>)</span></td>
  63. </tr>
  64. <tr>
  65.     <TD align="right"><?php echo $AppUI->_('Priority'); ?>:</td>
  66.     <TD>
  67.         <select name="priority" class="text">
  68.             <option value="0"><?php echo $AppUI->_('Low'); ?>
  69.             <option value="1" selected><?php echo $AppUI->_('Normal'); ?>
  70.             <option value="2"><?php echo $AppUI->_('High'); ?>
  71.             <option value="3"><?php echo $AppUI->_('Highest'); ?>
  72.             <option value="4"><strong><?php echo $AppUI->_('911'); ?> (<?php echo $AppUI->_('Showstopper'); ?>)</strong>
  73.         </select>
  74.     </td>
  75. </tr>
  76. <TR>
  77.     <TD align="right"><?php echo $AppUI->_('Description of Problem'); ?>: </td>
  78.     <td><span class="smallNorm">(<?php echo $AppUI->_('required'); ?>)</span></td>
  79. </tr>
  80. <TR>
  81.     <TD colspan=2 align="center">
  82.         <textarea cols="70" rows="10" class="textarea" name="description"><?php echo @$crow["description"];?></textarea>
  83.     </td>
  84. </tr>
  85. <TR>
  86.     <TD><input type="button" value="<?php echo $AppUI->_('back'); ?>" class="button" onClick="javascript:history.back(-1);"></td>
  87.     <TD align="right"><input type="button" value="<?php echo $AppUI->_('submit'); ?>" class="button" onClick="submitIt()"></td>
  88. </tr>
  89. </form>
  90. </TABLE>
  91.  <br /> <br /> 
  92.