Example #1
0
        }
        echo ' ' . htmlspecialchars($create_user['email']);
    }
}));
$fieldset_data['elements'][] = array('title' => _l('Type/Department'), 'fields' => array(array('type' => 'select', 'name' => 'ticket_type_id', 'value' => $ticket['ticket_type_id'], 'options' => module_ticket::get_types(), 'blank' => module_ticket::can_edit_tickets(), 'options_array_id' => 'name')));
if (class_exists('module_faq', false) && module_config::c('ticket_faq_link', 1) && module_faq::get_faq_products() > 0) {
    $fieldset_data['elements'][] = array('title' => _l('Product'), 'fields' => array(function () use($ticket, $ticket_id) {
        if (module_ticket::can_edit_tickets()) {
            echo print_select_box(module_faq::get_faq_products_rel(), 'faq_product_id', $ticket['faq_product_id']);
            _h('Use this to link a ticket to a product. Set products in Settings > FAQ. This allows you to have different FAQ items for different products. Users are shown the FAQ items before submitting a support ticket.');
        } else {
            echo friendly_key(module_faq::get_faq_products_rel(), $ticket['faq_product_id']);
        }
        // show a button that does a jquery popup with the list of faq items and an option to create new one.
        //if(module_faq::can_i('edit','FAQ')){                                                                            echo ' ';
        echo popup_link('<a href="' . module_faq::link_open_list($ticket['faq_product_id']) . '">' . _l('FAQ') . '</a>', array('force' => true, 'width' => 1100, 'height' => 600));
        //}
    }));
}
if (module_config::c('ticket_support_accounts', 1) && module_ticket::get_accounts_rel()) {
    $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'));
Example #2
0
<?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
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if (!isset($_REQUEST['iframe'])) {
    $link = module_faq::link_open_list(isset($_REQUEST['faq_product_id']) ? $_REQUEST['faq_product_id'] : false);
    $link .= '&iframe&display_mode=iframe';
    echo '<iframe src="' . $link . '" style="width:100%; height:90%; border:0;" class="autosize" frameborder="0"></iframe>';
} else {
    $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array();
    if (isset($_REQUEST['faq_product_id']) && $_REQUEST['faq_product_id']) {
        $search['faq_product_id'] = $_REQUEST['faq_product_id'];
    }
    $faqs = module_faq::get_faqs($search);
    $header = array('title' => _l('FAQs'), 'type' => 'h2', 'main' => true, 'button' => array());
    if (module_faq::can_i('create', 'FAQ')) {
        $header['button'] = array('url' => module_faq::link_open('new'), 'title' => _l('Add New FAQ'), 'type' => 'add');
    }
    print_heading($header);
    ?>


<form action="" method="POST">