golden hour
/home/doctorbruno/public_html/taeionline.com/support/include/staff
⬆️ Go Up
Upload
File/Folder
Size
Actions
apikey.inc.php
4.69 KB
Del
OK
apikeys.inc.php
7.6 KB
Del
OK
banlist.inc.php
8.71 KB
Del
OK
banrule.inc.php
2.96 KB
Del
OK
cannedresponse.inc.php
6.09 KB
Del
OK
cannedresponses.inc.php
8.47 KB
Del
OK
categories.inc.php
7.03 KB
Del
OK
category.inc.php
6.51 KB
Del
OK
dashboard.inc.php
6.35 KB
Del
OK
department.inc.php
22.78 KB
Del
OK
departments.inc.php
10.42 KB
Del
OK
directory.inc.php
5.95 KB
Del
OK
dynamic-form.inc.php
15.2 KB
Del
OK
dynamic-forms.inc.php
5.26 KB
Del
OK
dynamic-list.inc.php
11.12 KB
Del
OK
dynamic-lists.inc.php
4.62 KB
Del
OK
email.inc.php
10.47 KB
Del
OK
emails.inc.php
7.03 KB
Del
OK
faq-categories.inc.php
7.13 KB
Del
OK
faq-category.inc.php
3.52 KB
Del
OK
faq-view.inc.php
3.52 KB
Del
OK
faq.inc.php
10.31 KB
Del
OK
filter.inc.php
18.98 KB
Del
OK
filters.inc.php
9.47 KB
Del
OK
footer.inc.php
3.87 KB
Del
OK
header.inc.php
6.02 KB
Del
OK
helptopic.inc.php
20.78 KB
Del
OK
helptopics.inc.php
9.93 KB
Del
OK
index.php
37 B
Del
OK
login.header.php
1.37 KB
Del
OK
login.tpl.php
6.76 KB
Del
OK
org-view.inc.php
4.45 KB
Del
OK
orgs.inc.php
8.57 KB
Del
OK
page.inc.php
7.87 KB
Del
OK
pages.inc.php
7.64 KB
Del
OK
plugin-add.inc.php
1.84 KB
Del
OK
plugin-instance.inc.php
1.31 KB
Del
OK
plugin.inc.php
4.67 KB
Del
OK
plugins.inc.php
5.81 KB
Del
OK
profile.inc.php
20.72 KB
Del
OK
pwreset.login.php
1.77 KB
Del
OK
pwreset.php
1.7 KB
Del
OK
pwreset.sent.php
1.59 KB
Del
OK
queue.inc.php
15.59 KB
Del
OK
queues-ticket.inc.php
4.56 KB
Del
OK
role.inc.php
4.91 KB
Del
OK
roles.inc.php
5.5 KB
Del
OK
schedule.inc.php
4.53 KB
Del
OK
schedules.inc.php
5.34 KB
Del
OK
settings-agents.inc.php
13.15 KB
Del
OK
settings-alerts.inc.php
10.68 KB
Del
OK
settings-autoresp.inc.php
2.48 KB
Del
OK
settings-emails.inc.php
9.88 KB
Del
OK
settings-kb.inc.php
2.18 KB
Del
OK
settings-pages.inc.php
15.32 KB
Del
OK
settings-system.inc.php
22.99 KB
Del
OK
settings-tasks.inc.php
14.99 KB
Del
OK
settings-tickets.inc.php
13.7 KB
Del
OK
settings-users.inc.php
9.36 KB
Del
OK
slaplan.inc.php
5.96 KB
Del
OK
slaplans.inc.php
7.99 KB
Del
OK
staff.inc.php
21.42 KB
Del
OK
staffmembers.inc.php
12.63 KB
Del
OK
syslogs.inc.php
8.58 KB
Del
OK
system.inc.php
7.82 KB
Del
OK
task-view.inc.php
93 B
Del
OK
tasks.inc.php
17.99 KB
Del
OK
team.inc.php
8.76 KB
Del
OK
teams.inc.php
8.14 KB
Del
OK
template.inc.php
7.21 KB
Del
OK
templates
-
Del
OK
templates.inc.php
8.25 KB
Del
OK
ticket-edit.inc.php
8.62 KB
Del
OK
ticket-open.inc.php
23.7 KB
Del
OK
ticket-relations.inc.php
1.27 KB
Del
OK
ticket-tasks.inc.php
7.32 KB
Del
OK
ticket-view.inc.php
70.54 KB
Del
OK
tickets.inc.php
25.45 KB
Del
OK
tpl.inc.php
5.77 KB
Del
OK
user-view.inc.php
9.22 KB
Del
OK
users.inc.php
12.88 KB
Del
OK
Edit: department.inc.php
<?php if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied'); $info = $qs = array(); if($dept && $_REQUEST['a']!='add') { //Editing Department. $title=__('Update Department'); $action='update'; $submit_text=__('Save Changes'); $info = $dept->getInfo(); $info['id'] = $dept->getId(); $qs += array('id' => $dept->getId()); } else { if (!$dept) $dept = Dept::create(); $title=__('Add New Department'); $action='create'; $submit_text=__('Create Dept'); $info['ispublic']=isset($info['ispublic'])?$info['ispublic']:1; $info['ticket_auto_response']=isset($info['ticket_auto_response'])?$info['ticket_auto_response']:1; $info['message_auto_response']=isset($info['message_auto_response'])?$info['message_auto_response']:1; if (!isset($info['group_membership'])) $info['group_membership'] = 1; $qs += array('a' => $_REQUEST['a']); } $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info, true); ?> <form action="departments.php?<?php echo Http::build_query($qs); ?>" method="post" class="save"> <?php csrf_token(); ?> <input type="hidden" name="do" value="<?php echo $action; ?>"> <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>"> <input type="hidden" name="id" value="<?php echo $info['id']; ?>"> <h2><?php echo $title; ?> <?php if (isset($info['name'])) { ?><small> — <?php echo $info['name']; ?></small> <?php } ?> </h2> <ul class="clean tabs"> <li class="active"><a href="#settings"> <i class="icon-file"></i> <?php echo __('Settings'); ?></a></li> <li><a href="#access"> <i class="icon-user"></i> <?php echo __('Access'); ?></a></li> </ul> <div id="settings" class="tab_content"> <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th colspan="2"> <em><?php echo __('Department Information');?></em> </th> </tr> </thead> <tbody> <tr> <td width="180"> <?php echo __('Parent');?>: </td> <td> <select name="pid"> <option value="">— <?php echo __('Top-Level Department'); ?> —</option> <?php if($info['pid']) $current_name = Dept::getNameById($info['pid']); if ($depts=Dept::getPublicDepartments()) { if(!array_key_exists($info['pid'], $depts) && $info['pid']) { $depts[$info['pid']] = $current_name; $errors['pid'] = sprintf(__('%s selected must be active'), __('Parent Department')); } foreach ($depts as $id=>$name) { $selected=($info['pid'] && $id==$info['pid'])?'selected="selected"':''; echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$name); } } ?> </select> <span class="error">* <?php echo $errors['pid']; ?></span> </td> </tr> <tr> <td width="180" class="required"> <?php echo __('Name');?>: </td> <td> <input data-translate-tag="<?php echo $dept ? $dept->getTranslateTag() : ''; ?>" type="text" size="30" name="name" value="<?php echo $info['name']; ?>" autofocus> <span class="error">* <?php echo $errors['name']; ?></span> </td> </tr> <tr> <td width="180" class="required"> <?php echo __('Status');?>: </td> <td> <?php if ($dept->getId() == $cfg->getDefaultDeptId()) echo $dept->getStatus(); else { ?> <select name="status"> <option value="active"<?php echo (!strcasecmp($info['status'], 'active'))?'selected="selected"':'';?>><?php echo __('Active'); ?></option> <option value="disabled"<?php echo (!strcasecmp($info['status'], 'disabled'))?'selected="selected"':'';?>><?php echo __('Disabled'); ?></option> <option value="archived"<?php echo (!strcasecmp($info['status'], 'archived'))?'selected="selected"':'';?>><?php echo __('Archived'); ?></option> </select> <?php } ?> <span class="error"> </span> <i class="help-tip icon-question-sign" href="#status"></i> </td> </tr> <tr> <td width="180" class="required"> <?php echo __('Type');?>: </td> <td> <label> <input type="radio" name="ispublic" value="1" <?php echo $info['ispublic']?'checked="checked"':''; ?>><strong><?php echo __('Public');?></strong> </label> <label> <input type="radio" name="ispublic" value="0" <?php echo !$info['ispublic']?'checked="checked"':''; ?>><strong><?php echo __('Private');?></strong> <?php echo mb_convert_case(__('(internal)'), MB_CASE_TITLE);?> </label> <i class="help-tip icon-question-sign" href="#type"></i> <span class="error"><?php echo $errors['ispublic']; ?></span> </td> </tr> <tr> <td width="180"> <?php echo __('SLA'); ?>: </td> <td> <select name="sla_id"> <option value="0">— <?php echo __('System Default'); ?> —</option> <?php if($slas=SLA::getSLAs()) { foreach($slas as $id =>$name) { echo sprintf('<option value="%d" %s>%s</option>', $id, ($info['sla_id']==$id)?'selected="selected"':'',$name); } } ?> </select> <span class="error"><?php echo $errors['sla_id']; ?></span> <i class="help-tip icon-question-sign" href="#sla"></i> </td> </tr> <tr> <td width="180"> <?php echo __('Schedule');?>: </td> <td> <select name="schedule_id"> <option value="0" selected="selected" >— <?php echo __("SLA's Default");?> —</option> <?php if ($schedules=BusinessHoursSchedule::getSchedules()) { foreach ($schedules as $s) { echo sprintf('<option value="%d" %s>%s</option>', $s->getId(), ($info['schedule_id']==$s->getId()) ? 'selected="selected"' : '', $s->getName()); } } ?> </select> <span class="error"><?php echo $errors['schedule_id']; ?></span> <i class="help-tip icon-question-sign" href="#schedule"></i> </td> </tr> <tr> <td width="180"> <?php echo __('Manager'); ?>: </td> <td> <span> <select name="manager_id"> <option value="0">— <?php echo __('None'); ?> —</option> <?php $sql='SELECT staff_id,CONCAT_WS(", ",lastname, firstname) as name ' .' FROM '.STAFF_TABLE.' staff ' .' ORDER by name'; if(($res=db_query($sql)) && db_num_rows($res)) { while(list($id,$name)=db_fetch_row($res)){ $selected=($info['manager_id'] && $id==$info['manager_id'])?'selected="selected"':''; echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$name); } } ?> </select> <span class="error"><?php echo $errors['manager_id']; ?></span> <i class="help-tip icon-question-sign" href="#manager"></i> </span> </td> </tr> <tr> <td><?php echo __('Ticket Assignment'); ?>:</td> <td> <select name="assignment_flag"> <option value="all"<?php echo ($info['assignment_flag'] == 'all')?'selected="selected"':'';?>><?php echo __('All'); ?></option> <option value="members"<?php echo ($info['assignment_flag'] == 'members') ?'selected="selected"':'';?>><?php echo __('Department Members'); ?></option> <option value="primary"<?php echo ($info['assignment_flag'] == 'primary') ?'selected="selected"':'';?>><?php echo __('Primary Members'); ?></option> </select> <span class="error"> </span> <i class="help-tip icon-question-sign" href="#sandboxing"></i> </td> </tr> <tr> <td><?php echo __('Claim on Response'); ?>:</td> <td> <label> <input type="checkbox" name="disable_auto_claim" <?php echo $info['disable_auto_claim'] ? 'checked="checked"' : ''; ?>> <?php echo sprintf('<strong>%s</strong> %s', __('Disable'), __('auto claim')); ?> </label> <i class="help-tip icon-question-sign" href="#disable_auto_claim"></i> </td> </tr> <tr> <td><?php echo __('Reopen Auto Assignment'); ?>:</td> <td> <label> <input type="checkbox" name="disable_reopen_auto_assign" <?php echo $info['disable_reopen_auto_assign'] ? 'checked="checked"' : ''; ?>> <?php echo sprintf('<strong>%s</strong> %s', __('Disable'), __('auto assign on reopen')); ?> </label> <i class="help-tip icon-question-sign" href="#disable_reopen_auto_assign"></i> </td> </tr> <tr> <th colspan="2"> <em><strong><?php echo __('Outgoing Email Settings'); ?></strong>:</em> </th> </tr> <tr> <td width="180"> <?php echo __('Outgoing Email'); ?>: </td> <td> <select name="email_id"> <option value="0">— <?php echo __('System Default'); ?> —</option> <?php $sql='SELECT email_id,email,name FROM '.EMAIL_TABLE.' email ORDER by name'; if(($res=db_query($sql)) && db_num_rows($res)){ while(list($id,$email,$name)=db_fetch_row($res)){ $selected=($info['email_id'] && $id==$info['email_id'])?'selected="selected"':''; if($name) $email=Format::htmlchars("$name <$email>"); echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$email); } } ?> </select> <span class="error"> <?php echo $errors['email_id']; ?></span> <i class="help-tip icon-question-sign" href="#email"></i> </td> </tr> <tr> <td width="180"> <?php echo __('Template Set'); ?>: </td> <td> <select name="tpl_id"> <option value="0">— <?php echo __('System Default'); ?> —</option> <?php $sql='SELECT tpl_id,name FROM '.EMAIL_TEMPLATE_GRP_TABLE.' tpl WHERE isactive=1 ORDER by name'; if(($res=db_query($sql)) && db_num_rows($res)){ while(list($id,$name)=db_fetch_row($res)){ $selected=($info['tpl_id'] && $id==$info['tpl_id'])?'selected="selected"':''; echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$name); } } ?> </select> <span class="error"> <?php echo $errors['tpl_id']; ?></span> <i class="help-tip icon-question-sign" href="#template"></i> </td> </tr> <tr> <th colspan="2"> <em><strong><?php echo __('Autoresponder Settings'); ?></strong>: <i class="help-tip icon-question-sign" href="#auto_response_settings"></i></em> </th> </tr> <tr> <td width="180"> <?php echo __('New Ticket');?>: </td> <td> <label> <input type="checkbox" name="ticket_auto_response" value="0" <?php echo !$info['ticket_auto_response']?'checked="checked"':''; ?> > <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this department')); ?> </label> <i class="help-tip icon-question-sign" href="#new_ticket"></i> </td> </tr> <tr> <td width="180"> <?php echo __('New Message');?>: </td> <td> <label> <input type="checkbox" name="message_auto_response" value="0" <?php echo !$info['message_auto_response']?'checked="checked"':''; ?> > <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this department')); ?> </label> <i class="help-tip icon-question-sign" href="#new_message"></i> </td> </tr> <tr> <td width="180"> <?php echo __('Auto-Response Email'); ?>: </td> <td> <span> <select name="autoresp_email_id"> <option value="0" selected="selected">— <?php echo __('Department Email'); ?> —</option> <?php $sql='SELECT email_id,email,name FROM '.EMAIL_TABLE.' email ORDER by name'; if(($res=db_query($sql)) && db_num_rows($res)){ while(list($id,$email,$name)=db_fetch_row($res)){ $selected = (isset($info['autoresp_email_id']) && $id == $info['autoresp_email_id']) ? 'selected="selected"' : ''; if($name) $email=Format::htmlchars("$name <$email>"); echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$email); } } ?> </select> <span class="error"><?php echo $errors['autoresp_email_id']; ?></span> <i class="help-tip icon-question-sign" href="#auto_response_email"></i> </span> </td> </tr> <tr> <th colspan="2"> <em><strong><?php echo __('Alerts and Notices'); ?>:</strong> <i class="help-tip icon-question-sign" href="#group_membership"></i></em> </th> </tr> <tr> <td width="180"> <?php echo __('Recipients'); ?>: </td> <td> <span> <select name="group_membership"> <?php foreach (array( Dept::ALERTS_DISABLED => __("No one (disable Alerts and Notices)"), Dept::ALERTS_ADMIN_ONLY => __("Admin Email Only"), Dept::ALERTS_DEPT_ONLY => __("Department members only"), Dept::ALERTS_DEPT_AND_EXTENDED => __("Department and extended access members"), ) as $mode=>$desc) { ?> <option value="<?php echo $mode; ?>" <?php if ($info['group_membership'] == $mode) echo 'selected="selected"'; ?>><?php echo $desc; ?></option><?php } ?> </select> <i class="help-tip icon-question-sign" href="#group_membership"></i> </span> </td> </tr> <tr> <th colspan="2"> <em><strong><?php echo __('Department Signature'); ?></strong>: <span class="error"> <?php echo $errors['signature']; ?></span> <i class="help-tip icon-question-sign" href="#department_signature"></i></em> </th> </tr> <tr> <td colspan=2> <textarea class="richtext no-bar" name="signature" cols="21" rows="5" style="width: 60%;"><?php echo Format::viewableImages($info['signature']); ?></textarea> </td> </tr> </tbody> </table> </div> <div id="access" class="hidden tab_content"> <table class="two-column table" width="100%"> <tbody> <tr class="header" id="primary-members"> <td colspan="2"> <?php echo __('Department Members'); ?> <div><small> <?php echo sprintf(__('Agents who are primary members of %s'), __('this department')); ?> </small></div> </td> <td> <?php echo sprintf( '<a class="no-pjax" href="departments.php?id=%d&a=export"</a>', $dept->getId()); ?> <span class="action-button pull-right" data-placement="bottom" data-toggle="tooltip" title="<?php echo __('Export');?>"> <i class="icon-download-alt icon-fixed-width"></i> </span> </td> </tr> <?php if (!count($dept->members)) { ?> <tr><td colspan=2><em><?php echo __('Department does not have primary members'); ?> </em> </td> </tr> <?php } ?> </tbody> <tbody> <tr class="header" id="extended-access-members"> <td colspan="2"> <div><small> <?php echo sprintf(__('Agents who have extended access to %s'), __('this department')); ?> </small></div> </td> </tr> <?php $agents = Staff::getStaffMembers(); foreach ($dept->getMembers() as $member) { unset($agents[$member->getId()]); } ?> <tr id="add_extended_access"> <td colspan="2"> <i class="icon-plus-sign"></i> <select id="add_access" data-quick-add="staff"> <option value="0">— <?php echo __('Select Agent');?> —</option> <?php foreach ($agents as $id=>$name) { echo sprintf('<option value="%d">%s</option>',$id,Format::htmlchars($name)); } ?> <option value="0" data-quick-add>— <?php echo __('Add New');?> —</option> </select> <button type="button" class="action-button"> <?php echo __('Add'); ?> </button> </td> </tr> </tbody> <tbody> <tr id="member_template" class="hidden"> <td> <input type="hidden" data-name="members[]" value="" /> </td> <td> <select data-name="member_role" data-quick-add="role"> <option value="0">— <?php echo __('Select Role');?> —</option> <?php foreach (Role::getRoles() as $id=>$name) { echo sprintf('<option value="%d" %s>%s</option>',$id,$sel,$name); } ?> <option value="0" data-quick-add>— <?php echo __('Add New');?> —</option> </select> <span style="display:inline-block;width:60px"> </span> <label class="inline checkbox"> <input type="checkbox" data-name="member_alerts" value="1" /> <?php echo __('Alerts'); ?> </label> <a href="#" class="pull-right drop-membership" title="<?php echo __('Delete'); ?>"><i class="icon-trash"></i></a> </td> </tr> </tbody> </table> </div> <p style="text-align:center"> <input type="submit" name="submit" value="<?php echo $submit_text; ?>"> <input type="reset" name="reset" value="<?php echo __('Reset');?>"> <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick='window.location.href="?"'> </p> </form> <script type="text/javascript"> var addAccess = function(staffid, name, role, alerts, primary, error) { if (!staffid) return; var copy = $('#member_template').clone(); var target = (primary) ? 'extended-access-members' : 'add_extended_access'; copy.find('td:first').append(document.createTextNode(name)); if (primary) { copy.find('a.drop-membership').remove(); } copy.find('[data-name^=member_alerts]') .attr('name', 'member_alerts['+staffid+']') .prop('disabled', (primary)) .prop('checked', primary || alerts); copy.find('[data-name^=member_role]') .attr('name', 'member_role['+staffid+']') .val(role || 0); copy.find('[data-name=members\\[\\]]') .attr('name', 'members[]') .val(staffid); copy.attr('id', '').show().insertBefore($('#'+target)); copy.removeClass('hidden') if (error) $('<div class="error">').text(error).appendTo(copy.find('td:last')); copy.find('.drop-membership').click(function() { $('#add_access').append( $('<option>') .attr('value', copy.find('input[name^=members][type=hidden]').val()) .text(copy.find('td:first').text()) ); copy.fadeOut(function() { $(this).remove(); }); return false; }); }; $('#add_extended_access').find('button').on('click', function() { var selected = $('#add_access').find(':selected'), id = parseInt(selected.val()); if (!id) return; addAccess(id, selected.text(), 0, true); selected.remove(); return false; }); <?php if ($dept) { // Primary members foreach ($dept->getPrimaryMembers() as $member) { $primary = $member->dept_id == $info['id']; echo sprintf('addAccess(%d, %s, %d, %d, %d, %s);', $member->getId(), JsonDataEncoder::encode((string) $member->getName()), $member->role_id, $member->get('alerts', 0), ($member->dept_id == $info['id']) ? 1 : 0, JsonDataEncoder::encode($errors['members'][$member->staff_id]) ); } // Extended members. foreach ($dept->getExtendedMembers() as $member) { echo sprintf('addAccess(%d, %s, %d, %d, %d, %s);', $member->getId(), JsonDataEncoder::encode((string) $member->getName()), $member->role_id, $member->get('alerts', 0), 0, JsonDataEncoder::encode($errors['members'][$member->staff_id]) ); } } ?> </script>
Save