Copyright (c) 2006-2013 osTicket http://www.osticket.com Released under the GNU General Public License WITHOUT ANY WARRANTY. See LICENSE.TXT for details. vim: expandtab sw=4 ts=4 sts=4: **********************************************************************/ require('staff.inc.php'); require_once(INCLUDE_DIR.'class.ticket.php'); require_once(INCLUDE_DIR.'class.dept.php'); require_once(INCLUDE_DIR.'class.filter.php'); require_once(INCLUDE_DIR.'class.canned.php'); require_once(INCLUDE_DIR.'class.json.php'); require_once(INCLUDE_DIR.'class.dynamic_forms.php'); $page=''; $ticket = $user = null; //clean start. //LOCKDOWN...See if the id provided is actually valid and if the user has access. if($_REQUEST['id']) { if(!($ticket=Ticket::lookup($_REQUEST['id']))) $errors['err']=sprintf($txt['scp']['sences']['unknownOrInvalidItem'].'.', sprintf($txt['scp']['sences']['itemID'], $txt['ticket']['ticket'])); elseif(!$ticket->checkStaffAccess($thisstaff)) { $errors['err']=$txt['general']['accessDenied'].'. '.$txt['general']['contactAdmin'].'.'; $ticket=null; //Clear ticket obj. } } //Lookup user if id is available. if ($_REQUEST['uid']) $user = User::lookup($_REQUEST['uid']); //At this stage we know the access status. we can process the post. if($_POST && !$errors): if($ticket && $ticket->getId()) { //More coffee please. $errors=array(); $lock=$ticket->getLock(); //Ticket lock if any $statusKeys=array('open'=>'Open','Reopen'=>'Open','Close'=>'Closed'); switch(strtolower($_POST['a'])): case 'reply': if(!$thisstaff->canPostReply()) $errors['err'] = $txt['general']['actionDenied'].'. '.$txt['general']['contactAdmin'].'.'; else { if(!$_POST['response']) $errors['response']=$txt['scp']['tickets'][3]; //Use locks to avoid double replies if($lock && $lock->getStaffId()!=$thisstaff->getId()) $errors['err']=$txt['general']['actionDenied'].'. '.$txt['scp']['tickets'][4]; //Make sure the email is not banned if(!$errors['err'] && TicketFilter::isBanned($ticket->getEmail())) $errors['err']=$txt['scp']['tickets'][5]; } $wasOpen =($ticket->isOpen()); //If no error...do the do. $vars = $_POST; if(!$errors && $_FILES['attachments']) $vars['files'] = AttachmentFile::format($_FILES['attachments']); if(!$errors && ($response=$ticket->postReply($vars, $errors, isset($_POST['emailreply'])))) { $msg=$txt['scp']['tickets'][6]; $ticket->reload(); if($ticket->isClosed() && $wasOpen) $ticket=null; else // Still open -- cleanup response draft for this user Draft::deleteForNamespace( 'ticket.response.' . $ticket->getId(), $thisstaff->getId()); } elseif(!$errors['err']) { $errors['err']=$txt['scp']['tickets'][7].'. '.$txt['general']['CorrectErrorsTryAgain']; } break; case 'transfer': /** Transfer ticket **/ //Check permission if(!$thisstaff->canTransferTickets()) $errors['err']=$errors['transfer'] = $txt['general']['actionDenied'].'. '.$txt['scp']['tickets'][8]; else { //Check target dept. if(!$_POST['deptId']) $errors['deptId'] = $txt['scp']['tickets'][9]; elseif($_POST['deptId']==$ticket->getDeptId()) $errors['deptId'] = $txt['scp']['tickets'][10]; elseif(!($dept=Dept::lookup($_POST['deptId']))) $errors['deptId'] = sprintf($txt['scp']['sences']['unknownOrInvalidItem'].'.', $txt['general']['department']); //Transfer message - required. if(!$_POST['transfer_comments']) $errors['transfer_comments'] = $txt['scp']['tickets'][12]; elseif(strlen($_POST['transfer_comments'])<5) $errors['transfer_comments'] = $txt['scp']['tickets'][13]; //If no errors - them attempt the transfer. if(!$errors && $ticket->transfer($_POST['deptId'], $_POST['transfer_comments'])) { $msg = sprintf($txt['scp']['tickets'][14], $ticket->getDeptName()); //Check to make sure the staff still has access to the ticket if(!$ticket->checkStaffAccess($thisstaff)) $ticket=null; } elseif(!$errors['transfer']) { $errors['err'] = $txt['scp']['tickets'][15]; $errors['transfer']=$txt['general']['CorrectErrorsTryAgain']; } } break; case 'assign': if(!$thisstaff->canAssignTickets()) $errors['err']=$errors['assign'] = $txt['general']['actionDenied'].'. '.$txt['scp']['tickets'][17]; else { $id = preg_replace("/[^0-9]/", "",$_POST['assignId']); $claim = (is_numeric($_POST['assignId']) && $_POST['assignId']==$thisstaff->getId()); if(!$_POST['assignId'] || !$id) $errors['assignId'] = sprintf($txt['sences']['selectItem'], $txt['ticket']['assignee']); elseif($_POST['assignId'][0]!='s' && $_POST['assignId'][0]!='t' && !$claim) $errors['assignId']=sprintf($txt['scp']['sences']['unknownOrInvalidItem'].'.', sprintf($txt['scp']['sences'] ['itemID'], $txt['ticket']['assignee'])).' - '.$txt['general']['getTechHelp']; elseif($ticket->isAssigned()) { if($_POST['assignId'][0]=='s' && $id==$ticket->getStaffId()) $errors['assignId']=$txt['scp']['tickets'][20]; elseif($_POST['assignId'][0]=='t' && $id==$ticket->getTeamId()) $errors['assignId']=$txt['scp']['tickets'][21]; } //Comments are not required on self-assignment (claim) if($claim && !$_POST['assign_comments']) $_POST['assign_comments'] = sprintf($txt['scp']['tickets'][22], $thisstaff->getName()); elseif(!$_POST['assign_comments']) $errors['assign_comments'] = $txt['scp']['tickets'][23]; elseif(strlen($_POST['assign_comments'])<5) $errors['assign_comments'] = $txt['scp']['tickets'][24]; if(!$errors && $ticket->assign($_POST['assignId'], $_POST['assign_comments'], !$claim)) { if($claim) { $msg = $txt['scp']['tickets'][25]; } else { $msg=$txt['scp']['tickets'][26].' '.$ticket->getAssigned(); TicketLock::removeStaffLocks($thisstaff->getId(), $ticket->getId()); $ticket=null; } } elseif(!$errors['assign']) { $errors['err'] = $txt['scp']['tickets'][27]; $errors['assign'] = $txt['general']['CorrectErrorsTryAgain']; } } break; case 'postnote': /* Post Internal Note */ //Make sure the staff can set desired state if($_POST['state']) { if($_POST['state']=='closed' && !$thisstaff->canCloseTickets()) $errors['state'] = $txt['scp']['tickets'][29]; elseif(in_array($_POST['state'], array('overdue', 'notdue', 'unassigned')) && (!($dept=$ticket->getDept()) || !$dept->isManager($thisstaff))) $errors['state'] = $txt['scp']['tickets'][30]; } $vars = $_POST; if($_FILES['attachments']) $vars['files'] = AttachmentFile::format($_FILES['attachments']); $wasOpen = ($ticket->isOpen()); if(($note=$ticket->postNote($vars, $errors, $thisstaff))) { $msg=$txt['scp']['tickets'][31]; if($wasOpen && $ticket->isClosed()) $ticket = null; //Going back to main listing. else // Ticket is still open -- clear draft for the note Draft::deleteForNamespace('ticket.note.'.$ticket->getId(), $thisstaff->getId()); } else { if(!$errors['err']) $errors['err'] = $txt['scp']['tickets'][32]; $errors['postnote'] = $txt['scp']['tickets'][33].'. '.$txt['general']['CorrectErrorsTryAgain']; } break; case 'edit': case 'update': $forms=DynamicFormEntry::forTicket($ticket->getId()); foreach ($forms as $form) if (!$form->isValid()) $errors = array_merge($errors, $form->errors()); if(!$ticket || !$thisstaff->canEditTickets()) $errors['err']=$txt['general']['PermissionDenied'].'. '.$txt['scp']['tickets'][34]; elseif($ticket->update($_POST,$errors)) { $msg=$txt['scp']['tickets'][35]; $_REQUEST['a'] = null; //Clear edit action - going back to view. //Check to make sure the staff STILL has access post-update (e.g dept change). foreach ($forms as $f) $f->save(); if(!$ticket->checkStaffAccess($thisstaff)) $ticket=null; } elseif(!$errors['err']) { $errors['err']=$txt['scp']['tickets'][36]; } break; case 'process': switch(strtolower($_POST['do'])): case 'set_simple_status': if(!$thisstaff->canManageTickets()){ $errors['err']='Perm. Denied. You are not allowed change the status.'; } if(!$errors){ $newStatus = $_POST['updatestatus']; $ticket->setTicketStatus($newStatus, 0); $comment = 'Ticket status changed to ' . $ticket->getStatusName($newStatus) . ' by user: ' . $thisstaff->getName(); $ticket->logNote('Ticket status changed', $comment, 'SYSTEM', false); } break; case 'close': if(!$thisstaff->canCloseTickets()) { $errors['err'] = $txt['scp']['tickets'][37]; } elseif($ticket->isClosed()) { $errors['err'] = $txt['scp']['tickets'][51]; } elseif($ticket->close()) { $msg=$txt['scp']['tickets'][81].$ticket->getExtId().': '.$txt['scp']['tickets'][38]; //Log internal note if($_POST['ticket_status_notes']) $note = $_POST['ticket_status_notes']; else $note=$txt['scp']['tickets'][39]; $ticket->logNote($txt['scp']['tickets'][40], $note, $thisstaff); //Going back to main listing. TicketLock::removeStaffLocks($thisstaff->getId(), $ticket->getId()); $page=$ticket=null; } else { $errors['err']=$txt['scp']['tickets'][41]; } break; case 'reopen': //if staff can close or create tickets ...then assume they can reopen. if(!$thisstaff->canCloseTickets() && !$thisstaff->canCreateTickets()) { $errors['err']=$txt['scp']['tickets'][42]; } elseif($ticket->isOpen()) { $errors['err'] = $txt['scp']['tickets'][43]; } elseif($ticket->reopen()) { $msg=$txt['scp']['tickets'][44]; if($_POST['ticket_status_notes']) $note = $_POST['ticket_status_notes']; else $note=$txt['scp']['tickets'][45]; $ticket->logNote($txt['scp']['tickets'][46], $note, $thisstaff); } else { $errors['err']=$txt['scp']['tickets'][47]; } break; case 'release': if(!$ticket->isAssigned() || !($assigned=$ticket->getAssigned())) { $errors['err'] = $txt['scp']['tickets'][48]; } elseif($ticket->release()) { $msg=$txt['scp']['tickets'][49].' '.$assigned; $ticket->logActivity($txt['scp']['tickets'][50],$msg.' '.$txt['general']['by'].' '.$thisstaff->getName()); } else { $errors['err'] = $txt['scp']['tickets'][52]; } break; case 'claim': if(!$thisstaff->canAssignTickets()) { $errors['err'] = $txt['scp']['tickets'][53]; } elseif(!$ticket->isOpen()) { $errors['err'] = $txt['scp']['tickets'][54]; } elseif($ticket->isAssigned()) { $errors['err'] = $txt['scp']['tickets'][55].' '.$ticket->getAssigned(); } elseif($ticket->assignToStaff($thisstaff->getId(), (sprintf($txt['scp']['tickets'][22], $thisstaff->getName())), false)) { $msg = $txt['scp']['tickets'][57]; } else { $errors['err'] = $txt['scp']['tickets'][58]; } break; case 'overdue': $dept = $ticket->getDept(); if(!$dept || !$dept->isManager($thisstaff)) { $errors['err']=$txt['scp']['tickets'][59]; } elseif($ticket->markOverdue()) { $msg=$txt['scp']['tickets'][60]; $ticket->logActivity($txt['scp']['tickets'][61],($msg.' '.$txt['scp']['tickets'][51].' '.$thisstaff->getName())); } else { $errors['err']=$txt['scp']['tickets'][62]; } break; case 'answered': $dept = $ticket->getDept(); if(!$dept || !$dept->isManager($thisstaff)) { $errors['err']=$txt['scp']['tickets'][63]; } elseif($ticket->markAnswered()) { $msg=$txt['scp']['tickets'][64]; $ticket->logActivity($txt['scp']['tickets'][65],($msg.' '.$txt['scp']['tickets'][51].' '.$thisstaff->getName())); } else { $errors['err']=$txt['scp']['tickets'][66]; } break; case 'unanswered': $dept = $ticket->getDept(); if(!$dept || !$dept->isManager($thisstaff)) { $errors['err']=$txt['scp']['tickets'][67]; } elseif($ticket->markUnAnswered()) { $msg=$txt['scp']['tickets'][68]; $ticket->logActivity($txt['scp']['tickets'][69],($msg.' '.$txt['scp']['tickets'][51].' '.$thisstaff->getName())); } else { $errors['err']=$txt['scp']['tickets'][70]; } break; case 'banemail': if(!$thisstaff->canBanEmails()) { $errors['err']=$txt['scp']['tickets'][71]; } elseif(BanList::includes($ticket->getEmail())) { $errors['err']=$txt['scp']['tickets'][72]; } elseif(Banlist::add($ticket->getEmail(),$thisstaff->getName())) { $msg=$txt['scp']['tickets'][73].$ticket->getEmail().$txt['scp']['tickets'][74]; } else { $errors['err']=$txt['scp']['tickets'][75]; } break; case 'unbanemail': if(!$thisstaff->canBanEmails()) { $errors['err'] = $txt['scp']['tickets'][76]; } elseif(Banlist::remove($ticket->getEmail())) { $msg = $txt['scp']['tickets'][77]; } elseif(!BanList::includes($ticket->getEmail())) { $warn = $txt['scp']['tickets'][78]; } else { $errors['err']=$txt['scp']['tickets'][79]; } break; case 'changeuser': if (!$thisstaff->canEditTickets()) { $errors['err'] = $txt['scp']['tickets'][137]; } elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) { $errors['err'] = $txt['scp']['tickets'][138]; } elseif ($ticket->changeOwner($user)) { $msg = sprintf($txt['scp']['tickets'][139], $user->getName()); } else { $errors['err'] = $txt['scp']['tickets'][140]; } break; case 'delete': // Dude what are you trying to hide? bad customer support?? if(!$thisstaff->canDeleteTickets()) { $errors['err']=$txt['scp']['tickets'][80]; } elseif($ticket->delete()) { $msg=$txt['scp']['tickets'][81].$ticket->getNumber().' '.$txt['scp']['tickets'][82]; //Log a debug note $ost->logDebug($txt['scp']['tickets'][81].$ticket->getNumber().' '.$txt['scp']['tickets'][83], sprintf('%s%s %s %s', $txt['scp']['tickets'][81], $ticket->getNumber(), $txt['scp']['tickets'][84], $thisstaff->getName()) ); $ticket=null; //clear the object. } else { $errors['err']=$txt['scp']['tickets'][85]; } break; default: $errors['err']=$txt['scp']['tickets'][86]; endswitch; break; default: $errors['err']=$txt['general']['unknownAction']; endswitch; if($ticket && is_object($ticket)) $ticket->reload();//Reload ticket info following post processing }elseif($_POST['a']) { switch($_POST['a']) { case 'mass_process': if(!$thisstaff->canManageTickets()) $errors['err']=$txt['scp']['tickets'][87]; elseif(!$_POST['tids'] || !is_array($_POST['tids'])) $errors['err']=$txt['scp']['tickets'][88]; else { $count=count($_POST['tids']); $i = 0; switch(strtolower($_POST['do'])) { case 'reopen': if($thisstaff->canCloseTickets() || $thisstaff->canCreateTickets()) { $note=$txt['scp']['tickets'][89].' '.$thisstaff->getName(); foreach($_POST['tids'] as $k=>$v) { if(($t=Ticket::lookup($v)) && $t->isClosed() && @$t->reopen()) { $i++; $t->logNote($txt['scp']['tickets'][90], $note, $thisstaff); } } if($i==$count) $msg = $txt['scp']['tickets'][136]." ($i) ".$txt['scp']['tickets'][91]; elseif($i) $warn = $i.' '.$txt['general']['of'].' '.$count.' '.$txt['scp']['tickets'][92]; else $errors['err'] = $txt['scp']['tickets'][93]; } else { $errors['err'] = $txt['scp']['tickets'][94]; } break; case 'close': if($thisstaff->canCloseTickets()) { $note=$txt['scp']['tickets'][95].' '.$thisstaff->getName(); foreach($_POST['tids'] as $k=>$v) { if(($t=Ticket::lookup($v)) && $t->isOpen() && @$t->close()) { $i++; $t->logNote($txt['scp']['tickets'][96], $note, $thisstaff); } } if($i==$count) $msg =$txt['scp']['tickets'][136]." ($i) ".$txt['scp']['tickets'][97]; elseif($i) $warn = $i.' '.$txt['general']['of'].' '.$count.' '.$txt['scp']['tickets'][98]; else $errors['err'] = $txt['scp']['tickets'][99]; } else { $errors['err'] = $txt['scp']['tickets'][100]; } break; case 'mark_overdue': $note=$txt['scp']['tickets'][101].' '.$thisstaff->getName(); foreach($_POST['tids'] as $k=>$v) { if(($t=Ticket::lookup($v)) && !$t->isOverdue() && $t->markOverdue()) { $i++; $t->logNote($txt['scp']['tickets'][102], $note, $thisstaff); } } if($i==$count) $msg = $txt['scp']['tickets'][136]." ($i) ".$txt['scp']['tickets'][103]; elseif($i) $warn = $i.' '.$txt['general']['of'].' '.$count.' '.$txt['scp']['tickets'][104]; else $errors['err'] = $txt['scp']['tickets'][105]; break; case 'delete': if($thisstaff->canDeleteTickets()) { foreach($_POST['tids'] as $k=>$v) { if(($t=Ticket::lookup($v)) && @$t->delete()) $i++; } //Log a warning if($i) { $log = sprintf('%s (%s) %s %d %s', $thisstaff->getName(), $thisstaff->getUserName(),$txt['scp']['tickets'][106] , $i, $txt['scp']['tickets'][107]); $ost->logWarning($txt['scp']['tickets'][108], $log, false); } if($i==$count) $msg = $txt['scp']['tickets'][136]." ($i) ".$txt['scp']['tickets'][109]; elseif($i) $warn = $i.' '.$txt['general']['of'].' '.$count.' '.$txt['scp']['tickets'][110]; else $errors['err'] = $txt['scp']['tickets'][111]; } else { $errors['err'] = $txt['scp']['tickets'][112]; } break; default: $errors['err']=$txt['scp']['tickets'][113]; } } break; case 'open': $ticket=null; if ($topic=Topic::lookup($_POST['topicId'])) { if ($form = DynamicForm::lookup($topic->ht['form_id'])) { $form = $form->instanciate(); if (!$form->getForm()->isValid()) $errors = array_merge($errors, $form->getForm()->errors()); } } if(!$thisstaff || !$thisstaff->canCreateTickets()) { $errors['err']=$txt['scp']['tickets'][114]; } else { $vars = $_POST; $vars['uid'] = $user? $user->getId() : 0; if($_FILES['attachments']) $vars['files'] = AttachmentFile::format($_FILES['attachments']); if(($ticket=Ticket::open($vars, $errors))) { $msg=$txt['scp']['tickets'][115]; $_REQUEST['a']=null; # Save extra dynamic form(s) if (isset($form)) { $form->setTicketId($ticket->getId()); $form->save(); } if (!$ticket->checkStaffAccess($thisstaff) || $ticket->isClosed()) $ticket=null; Draft::deleteForNamespace('ticket.staff%', $thisstaff->getId()); } elseif(!$errors['err']) { $errors['err']=$txt['scp']['tickets'][116]; } } break; } } if(!$errors) $thisstaff ->resetStats(); //We'll need to reflect any changes just made! endif; /*... Quick stats ...*/ $stats= $thisstaff->getTicketsStats(); //Navigation $nav->setTabActive('tickets'); if($cfg->showAnsweredTickets()) { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][117].' ('.number_format($stats['open']+$stats['answered']).')', 'title'=>$txt['scp']['tickets'][118], 'href'=>'tickets.php', 'iconclass'=>'Ticket'), (!$_REQUEST['status'] || $_REQUEST['status']=='open')); } else { if($stats) { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][117].' ('.number_format($stats['open']).')', 'title'=>$txt['scp']['tickets'][118], 'href'=>'tickets.php', 'iconclass'=>'Ticket'), (!$_REQUEST['status'] || $_REQUEST['status']=='open')); } if($stats['answered']) { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][119].' ('.number_format($stats['answered']).')', 'title'=>$txt['scp']['tickets'][120], 'href'=>'tickets.php?status=answered', 'iconclass'=>'answeredTickets'), ($_REQUEST['status']=='answered')); } } if($stats['assigned']) { if(!$ost->getWarning() && $stats['assigned']>10) $ost->setWarning($stats['assigned'].' '.$txt['scp']['tickets'][121]); $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][122].' ('.number_format($stats['assigned']).')', 'title'=>$txt['scp']['tickets'][123], 'href'=>'tickets.php?status=assigned', 'iconclass'=>'assignedTickets'), ($_REQUEST['status']=='assigned')); } if($stats['overdue']) { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][124].' ('.number_format($stats['overdue']).')', 'title'=>$txt['scp']['tickets'][125], 'href'=>'tickets.php?status=overdue', 'iconclass'=>'overdueTickets'), ($_REQUEST['status']=='overdue')); if(!$sysnotice && $stats['overdue']>10) $sysnotice=$stats['overdue'] .$txt['scp']['tickets'][126].' '; } if($thisstaff->showAssignedOnly() && $stats['closed']) { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][127].' ('.number_format($stats['closed']).')', 'title'=>$txt['scp']['tickets'][128], 'href'=>'tickets.php?status=closed', 'iconclass'=>'closedTickets'), ($_REQUEST['status']=='closed')); } else { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][129].' ('.number_format($stats['closed']).')', 'title'=>$txt['scp']['tickets'][130], 'href'=>'tickets.php?status=closed', 'iconclass'=>'closedTickets'), ($_REQUEST['status']=='closed')); } if($thisstaff->canCreateTickets()) { $nav->addSubMenu(array('desc'=>$txt['scp']['tickets'][131], 'title' => $txt['scp']['tickets'][141], 'href'=>'tickets.php?a=open', 'iconclass'=>'newTicket', 'id' => 'new-ticket'), ($_REQUEST['a']=='open')); } $inc = 'tickets.inc.php'; if($ticket) { $ost->setPageTitle($txt['scp']['tickets'][81].$ticket->getNumber()); $nav->setActiveSubMenu(-1); $inc = 'ticket-view.inc.php'; if($_REQUEST['a']=='edit' && $thisstaff->canEditTickets()) { $inc = 'ticket-edit.inc.php'; if (!$forms) $forms=DynamicFormEntry::forTicket($ticket->getId()); // Auto add new fields to the entries foreach ($forms as $f) $f->addMissingFields(); } elseif($_REQUEST['a'] == 'print' && !$ticket->pdfExport($_REQUEST['psize'], $_REQUEST['notes'])) $errors['err'] = $txt['scp']['tickets'][132]; } else { $inc = 'tickets.inc.php'; if($_REQUEST['a']=='open' && $thisstaff->canCreateTickets()) $inc = 'ticket-open.inc.php'; elseif($_REQUEST['a'] == 'export') { require_once(INCLUDE_DIR.'class.export.php'); $ts = strftime('%Y%m%d'); if (!($token=$_REQUEST['h'])) $errors['err'] = $txt['scp']['tickets'][133]; elseif (!($query=$_SESSION['search_'.$token])) $errors['err'] = $txt['scp']['tickets'][134]; elseif (!Export::saveTickets($query, "tickets-$ts.csv", 'csv')) $errors['err'] = $txt['scp']['tickets'][135]; } //Clear active submenu on search with no status if($_REQUEST['a']=='search' && !$_REQUEST['status']) $nav->setActiveSubMenu(-1); //set refresh rate if the user has it configured if(!$_POST && !$_REQUEST['a'] && ($min=$thisstaff->getRefreshRate())) $ost->addExtraHeader(''); } require_once(STAFFINC_DIR.'header.inc.php'); require_once(STAFFINC_DIR.$inc); require_once(STAFFINC_DIR.'footer.inc.php'); ?>