oops!! I added it to my install but didn't update the tutorial. :
in include/client/viewticket.inc.php
under the very first <?php tag add this code...
function showOptionsDrop($selected){ // shows all options but selected...
$string = '';
$sql = 'SELECT * FROM ' . STATUS_TABLE;
$res = db_query($sql);
while ($row = db_fetch_array($res)) {
$k = $row;
$v = $row;
if($selected == $k) // don't double display the selected option
$string .= '<option selected value="'.$k.'">'.$v.'</option>'."\n";
else
$string .= '<option value="'.$k.'">'.$v.'</option>'."\n";
}
return $string;
}
Find this code...
<table align="center" class="infotable" cellspacing="1" cellpadding="3" width="100%" border=0>
Directly below add this code...
<tr>
<th width="100" >Simple Status:</th>
<td nowrap >
<form method="" action="" name="update">
<select name="updatework" width="150" style="width: 150px" disabled="disabled">
<?php echo showOptionsDrop($ticket->getSimpleStatus()); ?>
</select>
</form>
</tr>
Lets also display the status to the client on their open ticket list.
include/client/tickets.inc.php
Find the first block of table headers,around line 100 or so, add...
<th width="150">SimpleStatus</th>
Then, around line 129 or so, add this code...
<td nowrap >
<?if($row == "1")
{?>
<?php echo 'Reviewed'; ?>
<?}?>
<?if($row == "2")
{?>
<?php echo 'Responded'; ?>
<?}?>
<?if($row == "3")
{?>
<?php echo 'Quotation Sent'; ?>
<?}?>
<?if($row == "4")
{?>
<?php echo 'PO Requested'; ?>
<?}?>
<?if($row == "5")
{?>
<?php echo 'PO Recieved'; ?>
<?}?>
<?if($row == "6")
{?>
<span style="color:#F00; text-decoration;"><?php echo 'DFNP'; ?></span>
<?}?>
<?if($row == "7")
{?>
<span style="color:#2A9F00; text-decoration;"><?php echo 'DFP'; ?></span>
<?}?>
<?if($row == "8")
{?>
<?php echo 'Awaiting Payment'; ?>
<?}?>
<?if($row == "9")
{?>
<?php echo 'Payment Recieved'; ?>
<?}?>
<?if($row == "10")
{?>
<?php echo 'In Transit'; ?>
<?}?>
<?if($row == "11")
{?>
<?php echo 'Working'; ?>
<?}?>
<?if($row == "12")
{?>
<?php echo 'Finished'; ?>
<?}?>
<?if($row == "13")
{?>
<?php echo 'In Return Transit'; ?>
<?}?>
</td>
</tr>
There we go. Simple status on the client end. It could probably be prettier and better coded. :