I think I got it figured out, the only thing that probably won't work is attachments...
I've attached files for you to upload, for the approve tab.
scp/approve.php
include/staff/approve.inc.php
In scp/tickets.php ~ line 89 CHANGE
if(!$errors && ($respId=$ticket->postResponse($_POST,$_POST,$_POST,$_FILES,$_POST))){
$msg='Response Posted Successfully';
TO
if(!$errors){
$sql= 'INSERT INTO '.TICKET_RESPONSE_TABLE.' SET created=NOW() '.
',ticket_id='.db_input($ticket->getId()).
',msg_id='.db_input($_POST).
',response='.db_input(Format:($_POST)).
',staff_id='.db_input($thisuser->getId()).
',staff_name='.db_input($thisuser->getName()).
',ip_address='.db_input($thisuser->getIP()).
',waiting=1'.
',signature='.db_input($_POST);
$resp_id=0;
//echo $sql;
if(db_query($sql) && ($resp_id=db_insert_id()))
$msg = "Response Awaiting Approval";
In scp/tickets.php ~ line 365 AFTER
//post issue as a response...but no alerts are sent to the user. ?? TODO: Add optional alert
$msgId=$ticket->getLastMsgId();
if(($respId=$ticket->postResponse($msgId,$_POST,'none',null,$status,$alert_close))) {
ADD
$q = "UPDATE ".TICKET_RESPONSE_TABLE." SET ".
"waiting=0, approved=1 ".
"WHERE response_id=".$respId;
mysql_query($q);
In scp/tickets.php ~ line 113
AFTER
}else{
$errors=$errors?$errors:'Unable to post the response.';
}
ADD
?> <script>
location.replace("<?=$cfg->getBaseUrl()?>/scp/tickets.php?id=<?=$ticket->getId()?>");
</script> <?
In include/staff/viewticket.inc.php ~ line 248
CHANGE
<tr><th><?=Format:($resp_row)?> - <?=$resp_row?></th></tr>
WITH
<tr><th>
<div style="float;"><?=Format:($resp_row)?> - <?=$resp_row?></div>
<div style="float;">
<? if($resp_row==1) echo "Waiting for Approval";
else {
if($resp_row==0) echo "Response Approval Denied";
if($resp_row==1) echo "Response Approved";
} ?>
</div>
</th></tr>
And finally in /include/class.nav.php ~ line 37
AFTER
$tabs=array('desc'=>'Tickets','href'=>'tickets.php','title'=>'Ticket Queue');
ADD
$q = "SELECT response_id FROM ".TICKET_RESPONSE_TABLE." WHERE waiting = 1";
$query = mysql_query($q);
$approve_num = mysql_num_rows($query);
$approve_label = "Approve (".$approve_num.")";
if($thisuser->isAdmin() || $thisuser->isManager()) $tabs=array('desc'=>$approve_label,'href'=>'approve.php','title'=>'Approve Responses');
[approve.inc.php.txt](https://forum.osticket.com/assets/files/migrated/c/2e7985084bf7350a1e0d32ad1e387bb.txt)
[approve.php.txt](https://forum.osticket.com/assets/files/migrated/7/fc5af5a07fd6c3d88c0bd73c0c77060.txt)