[v2.0] HESK - Submit ticket as Open/Closed option?
Posted: Tue Mar 24, 2009 12:24 pm
Hey folks,
In the previous version we managed to get HESK working to submit a ticket as 'Closed' however in the recent one we have been unable to achieve this - partly due to messing up the CSS formatting and also interfacing with the ticket. Here is our current previous version code which doesn't function with V2.
Old version GUI:

Any ideas
?
TIA (thanks in advance)
In the previous version we managed to get HESK working to submit a ticket as 'Closed' however in the recent one we have been unable to achieve this - partly due to messing up the CSS formatting and also interfacing with the ticket. Here is our current previous version code which doesn't function with V2.
Old version GUI:

Code: Select all
<form method="POST" action="submit_ticket.php" name="form1" enctype="multipart/form-data">
<table border="0" cellspacing="0" cellpadding="5" size="560">
<tr>
<td>
<!-- Contact info -->
<table border="0">
<tr>
<td align="right" width="150"><font class="important">*</font><?php echo $hesklang['name']; ?> : </td>
<td align="left" width="550"><select name="name">
<option value=""></option>
</select></td>
</tr>
</table>
<hr>
<!-- Department and priority -->
<table border="0">
<tr>
<td align="right" width="150"><?php echo $hesklang['category']; ?>: </td>
<td align="left" width="550"><select name="category">
<?php
require_once('inc/database.inc.php');
hesk_dbConnect() or hesk_error("$hesklang[cant_connect_db] $hesklang[contact_webmsater] $hesk_settings[webmaster_mail]!");
$sql = "SELECT * FROM `hesk_categories` ORDER BY `cat_order` ASC";
$result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
while ($row=hesk_dbFetchAssoc($result))
{
if ($_SESSION['c_category'] == $row['id']) {$selected = ' selected';}
else {$selected = '';}
echo '<option value="'.$row['id'].'"'.$selected.'>'.$row['name'].'</option>';
}
?>
</select></td>
</tr>
<tr>
<td align="right" width="150"><?php echo $hesklang['priority']; ?>:</td>
<td align="left" width="550"><select name="priority">
<option value="2" <?php if($_SESSION['c_priority']==2) {echo 'selected';} ?>><?php echo $hesklang['medium']; ?></option>
<option value="1" <?php if($_SESSION['c_priority']==1) {echo 'selected';} ?>><?php echo $hesklang['high']; ?></option>
<option value="3" <?php if($_SESSION['c_priority']==3) {echo 'selected';} ?>><?php echo $hesklang['low']; ?></option>
</select></td>
</tr>
</table>
<!-- START CUSTOM BEFORE -->
<?php
/* custom fields BEFORE comments */
if ($hesk_settings['use_custom'] && $hesk_settings['custom_place']==1) {
echo '<table border="0">';
foreach ($hesk_settings['custom_fields'] as $k=>$v) {
if ($v['use']) {
if ($v['req']) {$v['req']='<font class="important">*</font>';}
else {$v['req']='';}
$k_value = stripslashes(hesk_input($_SESSION["c_$k"]));
echo <<<EOC
<tr>
<td align="right" width="150">$v[name]: $v[req]</td>
<td align="left" width="550"><input type="text" name="$k" size="40" maxlength="$v[maxlen]" value="$k_value"></td>
</tr>
EOC;
}
}
echo '</table> <hr>';
}
?>
<!-- END CUSTOM BEFORE -->
<!-- ticket info -->
<table border="0">
<tr>
<td align="right" width="150"><font class="important">*</font><?php echo $hesklang['subject']; ?>: </td>
<td align="left" width="550"><input type="text" name="subject" size="40" maxlength="40" value="<?php echo stripslashes(hesk_input($_SESSION['c_subject']));?>"></td>
</tr>
<tr>
<td align="right" valign="top" width="150"><font class="important">*</font><?php echo $hesklang['message']; ?>: </td>
<td align="left" width="550"><p>
<textarea name="message" rows="12" cols="50"><?php echo stripslashes(hesk_input($_SESSION['c_message']));?></textarea>
</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%"><label><input type="radio" name="status" value="3" checked> <font class="resolved"><?php echo $hesklang['closed']; ?></label></td>
</tr>
<tr>
<td width="50%"><label><input type="radio" name="status" value="0"> <font class="open"><?php echo $hesklang['open']; ?></font></label></td>
</table>
</tr>
</table>
<hr>
<!-- START CUSTOM AFTER -->
<?php
/* custom fields AFTER comments */
if ($hesk_settings['use_custom'] && $hesk_settings['custom_place']==0) {
echo '<table border="0">';
foreach ($hesk_settings['custom_fields'] as $k=>$v) {
if ($v['use']) {
if ($v['req']) {$v['req']='<font class="important">*</font>';}
else {$v['req']='';}
$k_value = stripslashes(hesk_input($_SESSION["c_$k"]));
echo <<<EOC
<tr>
<td align="right" width="150">$v[name]: $v[req]</td>
<td align="left" width="550"><input type="text" name="$k" size="40" maxlength="$v[maxlen]" value="$k_value"></td>
</tr>
EOC;
}
}
echo '</table> <hr>';
}
?>
<!-- END CUSTOM AFTER -->
<?php
/* attachments */
if ($hesk_settings['attachments']['use']) {
?>
<table border="0">
<tr>
<td align="right" width="150" valign="top"><?php echo $hesklang['attachments']; ?>:</td>
<td align="left" width="550">
<p>
<?php
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++) {
echo '<input type="file" name="attachment['.$i.']" size="50"><br>';
}
?>
<?php echo$hesklang['accepted_types']; ?>: <?php echo '*'.implode(', *', $hesk_settings['attachments']['allowed_types']); ?><br>
<?php echo $hesklang['max_file_size']; ?>: <?php echo $hesk_settings['attachments']['max_size']; ?> Kb
(<?php echo sprintf("%01.2f",($hesk_settings['attachments']['max_size']/1024)); ?> Mb)</p>
</td>
</tr>
</table>
<hr>
<?php
}
?>
<!-- Submit -->
<div align="center">
<center>
<table border="0">
<tr>
<td>
<?php
if ($hesk_settings['secimg_use']) {
echo '<p> <br><img src="print_sec_img.php?'.rand(10000,99999).'" width="100" height="20" alt="'.$hesklang['sec_img'].'" border="1"><br>'.
$hesklang['sec_enter'].': <input type="text" name="mysecnum" size="10" maxlength="5"></p>
<p>';
} else {
echo '<p> <br>';
}
?>
</p>
<p align="center"><input type="submit" value="<?php echo $hesklang['sub_ticket']; ?>" class="button"></p>
</form>

TIA (thanks in advance)