<?php /** * Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca, 0a3014a3-2b8f-460b-8850-d6025aa845f8 * Package Date: 2015-11-25 03:08:17 * IP Address: 67.79.165.254 */ switch ($display_mode) { case 'mobile': if (class_exists('module_mobile', false)) { module_mobile::render_start($page_title, $page); } break; case 'ajax': break; case 'iframe': case 'normal': default: ?> <!DOCTYPE html> <html dir="<?php echo module_config::c('text_direction', 'ltr'); ?> "> <head>
$fieldset_data['elements'][] = array('title' => _l('Account'), 'fields' => array(array('type' => module_ticket::can_edit_tickets() ? 'select' : 'html', 'name' => 'ticket_account_id', 'value' => module_ticket::can_edit_tickets() ? $ticket['ticket_account_id'] : friendly_key(module_ticket::get_accounts_rel(), $ticket['ticket_account_id']), 'options' => module_ticket::get_accounts_rel()))); } $fieldset_data['elements'][] = array('title' => _l('Status'), 'fields' => array(array('type' => module_ticket::can_edit_tickets() ? 'select' : 'html', 'name' => 'status_id', 'value' => module_ticket::can_edit_tickets() ? $ticket['status_id'] : friendly_key(module_ticket::get_statuses(), $ticket['status_id']), 'options' => module_ticket::get_statuses()))); if (module_ticket::can_edit_tickets() || module_config::c('ticket_allow_priority_selection', 0)) { $priorities = module_ticket::get_ticket_priorities(); if (!module_ticket::can_edit_tickets() && isset($priorities[_TICKET_PRIORITY_STATUS_ID]) && $ticket['priority'] != _TICKET_PRIORITY_STATUS_ID) { unset($priorities[_TICKET_PRIORITY_STATUS_ID]); } $fieldset_data['elements'][] = array('title' => _l('Priority'), 'fields' => array(array('type' => 'select', 'name' => 'priority', 'value' => $ticket['priority'], 'blank' => false, 'options' => $priorities))); } $fieldset_data['extra_settings'] = array('owner_table' => 'ticket', 'owner_key' => 'ticket_id', 'owner_id' => $ticket['ticket_id'], 'layout' => 'table_row', 'allow_new' => module_extra::can_i('create', 'Tickets'), 'allow_edit' => module_extra::can_i('edit', 'Tickets')); echo module_form::generate_fieldset($fieldset_data); unset($fieldset_data); $done_messages = false; if (class_exists('module_mobile', false)) { if (module_mobile::is_mobile_browser()) { // we're on mobile, display the ticket messages here: $tickets_in_reverse = false; include module_theme::include_ucm('includes/plugin_ticket/pages/ticket_admin_edit_messages.php'); $done_messages = true; } } if ($ticket['user_id']) { if (module_config::c('ticket_other_list_by', 'user') == 'user') { $other_tickets = module_ticket::get_tickets(array('user_id' => $ticket['user_id'])); } else { if (module_config::c('ticket_other_list_by', 'user') == 'customer' && $ticket['customer_id']) { $other_tickets = module_ticket::get_tickets(array('customer_id' => $ticket['customer_id'])); } else { $other_tickets = false; }
function get_display_mode() { if (isset($_REQUEST['display_mode']) && $_REQUEST['display_mode'] != 'iframe' && $_REQUEST['display_mode'] != 'ajax') { $_SESSION['display_mode'] = $_REQUEST['display_mode']; } if (isset($_REQUEST['display_mode'])) { return $_REQUEST['display_mode']; } if (isset($_SESSION['display_mode']) && $_SESSION['display_mode']) { return $_SESSION['display_mode']; } if (class_exists('module_mobile', false)) { if (module_mobile::is_mobile_browser()) { return 'mobile'; } } return 'normal'; }