thanks bud, ok here is what i need, on the merge mod you have this following section that we post at the bottom of our include/staff.viewticket.inc.php, i just need this section to screen if your admin you see all tickets in the system, if your not admin you only see your dept tickets thats all...
here is your code... appreciate it and have a great trip...
<?
//Admin and Manager function - merge tickets.
if( ($thisuser->isadmin() || $thisuser->isManager() ) && ($ticket->getStatus()!='closed') ) {
?>
<div id="mergeticket" class="tabbertab" align="left">
<h2>Merge Ticket</h2>
<p>
<form action="tickets.php?id=<?=$id?>#mergeticket" name="notes" method="post" enctype="multipart/form-data">
<input type="hidden" name="ticket_id" value="<?=$id?>">
<input type="hidden" name="a" value="mergeticket">
<input type="hidden" name="email" value="<?php echo $ticket->getEmail(); ?>">
<input type="hidden" name="status" value="<?php echo $ticket->getStatus(); ?>">
Merge this current ticket into ticket # <select id="keepticket" name="keepticket">
<?
$sql = 'SELECT ticket_id, concat(ticketid,": ",subject) AS label FROM '.TICKET_TABLE.' WHERE email='.
'(SELECT email FROM ost_ticket WHERE ticket_id = '.$id.') AND status '.
'= "open" AND ticket_id <> '.$id.' ORDER BY `created` DESC ';
$lookuptickets = db_query($sql);
while (list($ticket_id,$label) = db_fetch_row($lookuptickets)){
?>
<option value="<?=$ticket_id?>"><?=$label?></option>
<?
}?>
</select>
<div><input type="checkbox" value="1" name="notifycustomer" checked="true" />Send Email to Customer inform the Ticket Merging</div>
<div style="margin-left: 50px; margin-top: 5px; margin-bottom: 10px;border: 0px;" align="left">
<input class="button" type='submit' value='Merge Ticket'/>
<input class="button" type='reset' value='Reset' />
<input class="button" type='button' value='Cancel' onClick="history.go(-1)" />
</div>
</p>
</form>
</p>
</div>
<?}?>