PATH:
home
/
centosnipponia
/
public_html
/
ticketing.nipponia.com
/
include
/
staff
<?php if (!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied'); $info = $qs = array(); if ($email && $_REQUEST['a'] != 'add'){ $title = __('Update Email Address'); $action = 'update'; $submit_text = __('Save Changes'); $info = $email->getInfo(); $info['id'] = $email->getId(); $qs += array('id' => $email->getId()); }else { $title = __('Add New Email Address'); $action = 'create'; $submit_text = __('Submit'); $info['id'] = 0; $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; $qs += array('a' => $_REQUEST['a']); } $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info, true); ?> <h2 style="margin:0 0 10px 2px;"><?php echo sprintf('<a href="emails.php">%s</a>', __('Emails')); if ($email) { echo sprintf('<small> — <a href="emails.php?id=%d">%s</a></small>', $email->getId(), Format::htmlchars($email->getAddress())); } else echo "<small> — $title </small>"; ?> </h2> <form action="emails.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']; ?>"> <ul class="tabs"> <li class="active"><a id="account_tab" href="#account" ><i class="icon-envelope"></i>  <?php echo __('Account'); ?></a></li> <?php if ($email) { ?> <li><a id="mailbox_tab" href="#mailbox" ><i class="icon-inbox"></i> <?php echo __('Remote Mailbox'); ?></a></li> <li><a id="smtp_tab" href="#smtp" ><i class="icon-reply-all"></i> <?php echo sprintf('%s (%s)', __('Outgoing'), __('SMTP')); ?></a></li> <?php } ?> </ul> <div class="tab_content" id="account"> <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th colspan="2"> <em><strong><?php echo __('Email Information and Settings');?></strong>: <?php echo __('Changing Email Address will invalidates set Credentials'); ?> </em> </th> </tr> </thead> <tbody> <tr> <td width="180" class="required"> <?php echo __('Email Address');?> </td> <td> <input type="text" size="35" name="email" value="<?php echo $info['email']; ?>" autofocus> <span class="error">* <?php echo $errors['email']; ?></span> </td> </tr> <tr> <td width="180" class="required"> <?php echo __('Email Name');?> </td> <td> <input type="text" size="35" name="name" value="<?php echo $info['name']; ?>"> <span class="error">* <?php echo $errors['name']; ?> </span> </td> </tr> <tr> <th colspan="2"> <em><strong><?php echo __('New Ticket Settings'); ?></strong></em> </th> </tr> <tr> <td width="180"> <?php echo __('Department');?> </td> <td> <span> <select name="dept_id"> <option value="0" selected="selected">— <?php echo __('System Default'); ?> —</option> <?php if ($depts=Dept::getPublicDepartments()) { if($info['dept_id'] && !array_key_exists($info['dept_id'], $depts)) { $depts[$info['dept_id']] = $email->dept; $warn = sprintf(__('%s selected must be active'), __('Department')); } foreach ($depts as $id => $name) { $selected=($info['dept_id'] && $id==$info['dept_id'])?'selected="selected"':''; echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$name); } } ?> </select> <?php if($warn) { ?> <span class="error">* <?php echo $warn; ?></span> <?php } ?> <i class="help-tip icon-question-sign" href="#new_ticket_department"></i> </span> </td> </tr> <tr> <td width="180"> <?php echo __('Priority'); ?> </td> <td> <span> <select name="priority_id"> <option value="0" selected="selected">— <?php echo __('System Default'); ?> —</option> <?php $sql='SELECT priority_id, priority_desc FROM '.PRIORITY_TABLE.' pri ORDER by priority_urgency DESC'; if(($res=db_query($sql)) && db_num_rows($res)){ while(list($id,$name)=db_fetch_row($res)){ $selected=($info['priority_id'] && $id==$info['priority_id'])?'selected="selected"':''; echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$name); } } ?> </select> <i class="help-tip icon-question-sign" href="#new_ticket_priority"></i> </span> <span class="error"><?php echo $errors['priority_id']; ?></span> </td> </tr> <tr> <td width="180"> <?php echo __('Help Topic'); ?> </td> <td> <span> <select name="topic_id"> <option value="0" selected="selected">— <?php echo __('System Default'); ?> —</option> <?php $warn = ''; $topics = Topic::getHelpTopics(); if($info['topic_id'] && !array_key_exists($info['topic_id'], $topics)) { $topics[$info['topic_id']] = $email->topic; $warn = sprintf(__('%s selected must be active'), __('Help Topic')); } foreach ($topics as $id=>$topic) { ?> <option value="<?php echo $id; ?>"<?php echo ($info['topic_id']==$id)?'selected':''; ?>><?php echo $topic; ?></option> <?php } ?> </select> <?php if($warn) { ?> <span class="error">* <?php echo $warn; ?></span> <?php } ?> <i class="help-tip icon-question-sign" href="#new_ticket_help_topic"></i> </span> <span class="error"> <?php echo $errors['topic_id']; ?> </span> </td> </tr> <tr> <td width="180"> <?php echo __('Auto-Response'); ?> </td> <td> <label><input type="checkbox" name="noautoresp" value="1" <?php echo $info['noautoresp']?'checked="checked"':''; ?> > <?php echo sprintf(__('<strong>Disable</strong> for %s'), __('this email')); ?> </label> <i class="help-tip icon-question-sign" href="#auto_response"></i> </td> </tr> <tr> <th colspan="2"> <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("Be liberal, they're internal");?> <span class="error"> <?php echo $errors['notes']; ?></span></em> </th> </tr> <tr> <td colspan=2> <textarea class="richtext no-bar" name="notes" cols="21" rows="5" style="width: 60%;"><?php echo Format::viewableImages($info['notes']); ?></textarea> </td> </tr> </tbody> </table> </div> <?php if ($email) { ?> <div class="tab_content" id="mailbox" style="display:none;"> <?php $pjax_container = '#holidays'; include STAFFINC_DIR . 'templates/email-mailbox.tmpl.php'; ?> </div> <div class="tab_content" id="smtp" style="display:none;"> <?php $pjax_container = '#smtp'; include STAFFINC_DIR . 'templates/email-smtp.tmpl.php'; ?> </div> <?php } ?> <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="emails.php"'> </p> </form> <script type="text/javascript"> $(function() { $('a.auth_config').on('click', function(e) { var target = $(this).attr('href').substr(1, $(this).attr('href').length); var type = $(this).data('type'); var form = $(this).closest('form'); if (target !== '' && type) { // Stash form before launching config dialog. var action = 'ajax.php/email/<?php echo $info['id']; ?>/stash'; $.ajax({ url: action, method: 'POST', data: $.objectifyForm(form.serializeArray()), cache: false, success: function(json) { // Launch the auth config dialog $.dialog('ajax.php/email/<?php echo $info['id']; ?>/auth/config/'+type+'/'+target, 201, function (xhr) { $(this).removeClass('save pending').addClass('save success'); if (xhr.responseJSON && xhr.responseJSON.redirect) { $(window).unbind('beforeunload'); window.location.href = xhr.responseJSON.redirect; } }, {size:(target == 'basic') ? 'normal' : 'xl'} ); } }); } e.preventDefault(); e.stopImmediatePropagation(); return false; }); $('select.emailauth').on('change', function() { var selected = $(this).find('option:selected').val(); var $target = $('a#'+this.name+'_config'); $target.attr('href', '#'+selected).removeClass('save pending'); if (selected == '' || $.inArray(selected, ['none', 'mailbox']) != -1) { $target.hide(); } else { $target.show(); if ($target.data('orig') !== selected) $target.addClass('save pending'); } }); $('select#postfetch').on('change', function() { var selected = $(this).find('option:selected').val(); var $target = $('span#archive_folder'); if (selected == 'archive') { $target.show(); } else { $target.hide(); } }); }); </script>
[+]
..
[-] faq-categories.inc.php
[edit]
[-] settings-autoresp.inc.php
[edit]
[-] login.header.php
[edit]
[-] ticket-tasks.inc.php
[edit]
[-] task-view.inc.php
[edit]
[-] staff.inc.php
[edit]
[-] index.php
[edit]
[-] dynamic-list.inc.php
[edit]
[-] settings-tickets.inc.php
[edit]
[-] page.inc.php
[edit]
[-] emails.inc.php
[edit]
[-] dynamic-forms.inc.php
[edit]
[-] cannedresponses.inc.php
[edit]
[-] settings-system.inc.php
[edit]
[-] categories.inc.php
[edit]
[-] faq.inc.php
[edit]
[-] user-view.inc.php
[edit]
[-] plugin-instance.inc.php
[edit]
[-] plugin-add.inc.php
[edit]
[-] login.tpl.php
[edit]
[-] department.inc.php
[edit]
[-] syslogs.inc.php
[edit]
[-] template.inc.php
[edit]
[-] category.inc.php
[edit]
[-] ticket-relations.inc.php
[edit]
[-] header.inc.php
[edit]
[-] schedule.inc.php
[edit]
[-] faq-view.inc.php
[edit]
[-] settings-alerts.inc.php
[edit]
[-] settings-users.inc.php
[edit]
[-] pages.inc.php
[edit]
[-] slaplans.inc.php
[edit]
[-] team.inc.php
[edit]
[-] helptopics.inc.php
[edit]
[-] role.inc.php
[edit]
[-] settings-pages.inc.php
[edit]
[-] users.inc.php
[edit]
[-] faq-category.inc.php
[edit]
[-] orgs.inc.php
[edit]
[-] pwreset.sent.php
[edit]
[-] settings-agents.inc.php
[edit]
[-] settings-emails.inc.php
[edit]
[+]
osta
[-] templates.inc.php
[edit]
[-] theme.inc.php
[edit]
[-] helptopic.inc.php
[edit]
[-] profile.inc.php
[edit]
[-] email.inc.php
[edit]
[-] ticket-open.inc.php
[edit]
[-] roles.inc.php
[edit]
[-] ticket-view.inc.php
[edit]
[-] schedules.inc.php
[edit]
[-] departments.inc.php
[edit]
[-] pwreset.login.php
[edit]
[-] filter.inc.php
[edit]
[-] queues-ticket.inc.php
[edit]
[-] plugin.inc.php
[edit]
[-] slaplan.inc.php
[edit]
[-] filters.inc.php
[edit]
[-] dashboard.inc.php
[edit]
[-] pwreset.php
[edit]
[-] tpl.inc.php
[edit]
[-] cannedresponse.inc.php
[edit]
[-] dynamic-form.inc.php
[edit]
[-] teams.inc.php
[edit]
[-] dynamic-lists.inc.php
[edit]
[-] tasks.inc.php
[edit]
[-] banrule.inc.php
[edit]
[-] ticket-edit.inc.php
[edit]
[-] settings-kb.inc.php
[edit]
[-] plugins.inc.php
[edit]
[-] directory.inc.php
[edit]
[-] apikeys.inc.php
[edit]
[-] org-view.inc.php
[edit]
[-] system.inc.php
[edit]
[+]
templates
[-] staffmembers.inc.php
[edit]
[-] banlist.inc.php
[edit]
[-] footer.inc.php
[edit]
[-] settings-tasks.inc.php
[edit]
[-] apikey.inc.php
[edit]
[-] queue.inc.php
[edit]
[-] .htaccess.disabled
[edit]