PATH:
home
/
centosnipponia
/
public_html
/
ticketing.nipponia.com
/
ticketing-old
/
include
/
staff
<?php if(!defined('OSTSTAFFINC') || !$thisstaff || !$thisstaff->isStaff()) die('Access Denied'); $qs = array(); $agents = $thisstaff->getDeptAgents(); // htmlchar 'order' param To Escape XSS if ($_REQUEST['order']) $_REQUEST['order'] = Format::htmlchars($_REQUEST['order']); // htmlchar 'sort' param To Escape XSS if ($_REQUEST['sort']) $_REQUEST['sort'] = Format::htmlchars($_REQUEST['sort']); if($_REQUEST['q']) { $searchTerm=$_REQUEST['q']; if($searchTerm){ if(is_numeric($searchTerm)){ $agents->filter(Q::any(array( 'phone__contains'=>$searchTerm, 'phone_ext__contains'=>$searchTerm, 'mobile__contains'=>$searchTerm, ))); }elseif(strpos($searchTerm,'@') && Validator::is_email($searchTerm)){ $agents->filter(array('email'=>$searchTerm)); }else{ $agents->filter(Q::any(array( 'email__contains'=>$searchTerm, 'lastname__contains'=>$searchTerm, 'firstname__contains'=>$searchTerm, ))); } } } if($_REQUEST['did'] && is_numeric($_REQUEST['did'])) { $agents->filter(array('dept'=>$_REQUEST['did'])); $qs += array('did' => $_REQUEST['did']); } $sortOptions=array('name'=>array('firstname','lastname'),'email'=>'email','dept'=>'dept__name', 'phone'=>'phone','mobile'=>'mobile','ext'=>'phone_ext', 'created'=>'created','login'=>'lastlogin'); $orderWays=array('DESC'=>'-','ASC'=>''); switch ($cfg->getAgentNameFormat()) { case 'last': case 'lastfirst': case 'legal': $sortOptions['name'] = array('lastname', 'firstname'); break; // Otherwise leave unchanged } $sort=($_REQUEST['sort'] && $sortOptions[strtolower($_REQUEST['sort'])])?strtolower($_REQUEST['sort']):'name'; //Sorting options... if($sort && $sortOptions[$sort]) { $order_column =$sortOptions[$sort]; } $order_column = $order_column ?: 'firstname,lastname'; if($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) { $order=$orderWays[strtoupper($_REQUEST['order'])]; } $x=$sort.'_sort'; $$x=' class="'.strtolower($_REQUEST['order'] ?: 'desc').'" '; foreach ((array) $order_column as $C) { $agents->order_by($order.$C); } $total=$agents->count(); $page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1; $pageNav=new Pagenate($total, $page, PAGE_LIMIT); $qstr = '&'. Http::build_query($qs); $qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']); $pageNav->setURL('directory.php', $qs); $pageNav->paginate($agents); //Ok..lets roll...create the actual query $qstr.='&order='.($order=='DESC' ? 'ASC' : 'DESC'); ?> <div id="basic_search"> <div style="min-height:25px;"> <form action="directory.php" method="GET" name="filter"> <input type="text" name="q" value="<?php echo Format::htmlchars($_REQUEST['q']); ?>" > <select name="did" id="did"> <option value="0">— <?php echo __('All Departments');?> —</option> <?php foreach ($thisstaff->getDepartmentNames() as $id=>$name) { $sel=($_REQUEST['did'] && $_REQUEST['did']==$id)?'selected="selected"':''; echo sprintf('<option value="%d" %s>%s</option>',$id,$sel,$name); } ?> </select> <input type="submit" name="submit" value="<?php echo __('Filter');?>"/> <i class="help-tip icon-question-sign" href="#apply_filtering_criteria"></i> </form> </div> </div> <div class="clear"></div> <div style="margin-bottom:20px; padding-top:5px;"> <div class="pull-left flush-left"> <h2><?php echo __('Agents');?> <i class="help-tip icon-question-sign" href="#staff_members"></i> </h2> </div> </div> <?php if ($agents->exists(true)) $showing=$pageNav->showing(); else $showing=__('No agents found!'); ?> <table class="list" border="0" cellspacing="1" cellpadding="0" width="940"> <thead> <tr> <th width="20%"><a <?php echo $name_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name');?></a></th> <th width="15%"><a <?php echo $dept_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=dept"><?php echo __('Department');?></a></th> <th width="25%"><a <?php echo $email_sort; ?>href="directory.php?<?php echo $qstr; ?>&sort=email"><?php echo __('Email Address');?></a></th> <th width="15%"><a <?php echo $phone_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=phone"><?php echo __('Phone Number');?></a></th> <th width="10%"><a <?php echo $ext_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=ext"><?php echo __(/* As in a phone number `extension` */ 'Extension');?></a></th> <th width="15%"><a <?php echo $mobile_sort; ?> href="directory.php?<?php echo $qstr; ?>&sort=mobile"><?php echo __('Mobile Number');?></a></th> </tr> </thead> <tbody> <?php $ids=($errors && is_array($_POST['ids']))?$_POST['ids']:null; foreach ($agents as $A) { ?> <tr id="<?php echo $A->staff_id; ?>"> <td> <?php echo Format::htmlchars($A->getName()); ?></td> <td> <?php echo Format::htmlchars((string) $A->dept); ?></td> <td> <?php echo Format::htmlchars($A->email); ?></td> <td> <?php echo Format::phone($A->phone); ?></td> <td> <?php echo $A->phone_ext; ?></td> <td> <?php echo Format::phone($A->mobile); ?></td> </tr> <?php } // end of foreach ?> <tfoot> <tr> <td colspan="6"> <?php if ($agents->exists(true)) { echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <?php } else { echo __('No agents found!'); } ?> </td> </tr> </tfoot> </table>
[+]
..
[-] apikey.inc.php
[edit]
[-] apikeys.inc.php
[edit]
[-] banlist.inc.php
[edit]
[-] banrule.inc.php
[edit]
[-] cannedresponse.inc.php
[edit]
[-] cannedresponses.inc.php
[edit]
[-] categories.inc.php
[edit]
[-] category.inc.php
[edit]
[-] dashboard.inc.php
[edit]
[-] department.inc.php
[edit]
[-] departments.inc.php
[edit]
[-] directory.inc.php
[edit]
[-] dynamic-form.inc.php
[edit]
[-] dynamic-forms.inc.php
[edit]
[-] dynamic-list.inc.php
[edit]
[-] dynamic-lists.inc.php
[edit]
[-] email.inc.php
[edit]
[-] emails.inc.php
[edit]
[-] faq-categories.inc.php
[edit]
[-] faq-category.inc.php
[edit]
[-] faq-view.inc.php
[edit]
[-] faq.inc.php
[edit]
[-] filter.inc.php
[edit]
[-] filters.inc.php
[edit]
[-] footer.inc.php
[edit]
[-] header.inc.php
[edit]
[-] helptopic.inc.php
[edit]
[-] helptopics.inc.php
[edit]
[-] index.php
[edit]
[-] login.header.php
[edit]
[-] login.tpl.php
[edit]
[-] org-view.inc.php
[edit]
[-] orgs.inc.php
[edit]
[-] page.inc.php
[edit]
[-] pages.inc.php
[edit]
[-] plugin-add.inc.php
[edit]
[-] plugin-instance.inc.php
[edit]
[-] plugin.inc.php
[edit]
[-] plugins.inc.php
[edit]
[-] profile.inc.php
[edit]
[-] pwreset.login.php
[edit]
[-] pwreset.php
[edit]
[-] pwreset.sent.php
[edit]
[-] queue.inc.php
[edit]
[-] queues-ticket.inc.php
[edit]
[-] role.inc.php
[edit]
[-] roles.inc.php
[edit]
[-] schedule.inc.php
[edit]
[-] schedules.inc.php
[edit]
[-] settings-agents.inc.php
[edit]
[-] settings-alerts.inc.php
[edit]
[-] settings-autoresp.inc.php
[edit]
[-] settings-emails.inc.php
[edit]
[-] settings-kb.inc.php
[edit]
[-] settings-pages.inc.php
[edit]
[-] settings-system.inc.php
[edit]
[-] settings-tasks.inc.php
[edit]
[-] settings-tickets.inc.php
[edit]
[-] settings-users.inc.php
[edit]
[-] slaplan.inc.php
[edit]
[-] slaplans.inc.php
[edit]
[-] staff.inc.php
[edit]
[-] staffmembers.inc.php
[edit]
[-] syslogs.inc.php
[edit]
[-] system.inc.php
[edit]
[-] task-view.inc.php
[edit]
[-] tasks.inc.php
[edit]
[-] team.inc.php
[edit]
[-] teams.inc.php
[edit]
[-] template.inc.php
[edit]
[+]
templates
[-] templates.inc.php
[edit]
[-] ticket-edit.inc.php
[edit]
[-] ticket-open.inc.php
[edit]
[-] ticket-relations.inc.php
[edit]
[-] ticket-tasks.inc.php
[edit]
[-] ticket-view.inc.php
[edit]
[-] tpl.inc.php
[edit]
[-] user-view.inc.php
[edit]
[-] users.inc.php
[edit]
[-] .htaccess.disabled
[edit]