Ejemplo n.º 1
0


<form action="" method="<?php 
echo _DEFAULT_FORM_METHOD;
?>
">

<input type="hidden" name="customer_id" value="<?php 
echo isset($_REQUEST['customer_id']) ? (int) $_REQUEST['customer_id'] : '';
?>
">

<?php 
module_form::print_form_auth();
$search_bar = array('elements' => array('ticket_id' => array('title' => _l('Number:'), 'field' => array('type' => 'text', 'name' => 'search[ticket_id]', 'value' => isset($search['ticket_id']) ? $search['ticket_id'] : '', 'size' => 5)), 'name' => array('title' => _l('Subject:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 10)), 'ticket_content' => array('title' => _l('Message:'), 'field' => array('type' => 'text', 'name' => 'search[ticket_content]', 'value' => isset($search['ticket_content']) ? $search['ticket_content'] : '', 'size' => 10)), 'contact' => array('title' => _l('Contact:'), 'field' => array('type' => 'text', 'name' => 'search[contact]', 'value' => isset($search['contact']) ? $search['contact'] : '', 'size' => 10)), 'date' => array('title' => _l('Date:'), 'fields' => array(array('type' => 'date', 'name' => 'search[date_from]', 'value' => isset($search['date_from']) ? $search['date_from'] : ''), _l('to'), array('type' => 'date', 'name' => 'search[date_to]', 'value' => isset($search['date_to']) ? $search['date_to'] : ''))), 'type' => array('title' => _l('Type:'), 'field' => array('type' => 'select', 'name' => 'search[ticket_type_id]', 'value' => isset($search['ticket_type_id']) ? $search['ticket_type_id'] : '', 'options' => module_ticket::get_types(), 'options_array_id' => 'name')), 'Status' => array('title' => _l('Status:'), 'field' => array('type' => 'select', 'name' => 'search[status_id]', 'value' => isset($search['status_id']) ? $search['status_id'] : '', 'options' => $search_statuses, 'blank' => _l('All'))), 'Priority' => array('title' => _l('Priority:'), 'field' => array('type' => 'select', 'name' => 'search[priority]', 'value' => isset($search['priority']) ? $search['priority'] : '', 'options' => module_ticket::get_ticket_priorities())), 'Staff' => array('title' => _l('Staff:'), 'field' => array('type' => 'select', 'name' => 'search[assigned_user_id]', 'value' => isset($search['assigned_user_id']) ? $search['assigned_user_id'] : '', 'options' => module_ticket::get_ticket_staff_rel()))));
if (class_exists('module_faq', false) && module_config::c('ticket_show_product_list', 1)) {
    $search_bar['elements']['Product'] = array('title' => _l('Product:'), 'field' => array('type' => 'select', 'name' => 'search[faq_product_id]', 'value' => isset($search['faq_product_id']) ? $search['faq_product_id'] : '', 'options' => module_faq::get_faq_products_rel()));
}
if (class_exists('module_envato', false)) {
    $search_bar['elements']['envato'] = array('title' => _l('Envato:'), 'field' => array('type' => 'select', 'name' => 'search[envato_item_id]', 'value' => isset($search['envato_item_id']) ? $search['envato_item_id'] : '', 'options' => array(-1 => 'No product') + module_envato::get_envato_items_rel()));
}
echo module_form::search_bar($search_bar);
if (class_exists('module_envato', false) && module_config::c('envato_show_ticket_earning', 0)) {
    $item_ticket_count = array();
    $envato_count = module_cache::get('ticket', 'envato_ticket_earning');
    //if($envato_count===false){
    while ($ticket = mysql_fetch_assoc($tickets)) {
        $items = module_envato::get_items_by_ticket($ticket['ticket_id']);
        if (count($items)) {
            foreach ($items as $item_id => $item) {
Ejemplo n.º 2
0
            _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'));
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;
Ejemplo n.º 3
0
		</td>
		<td>
			<input type="text" name="search[contact]" value="<?php 
echo isset($search['contact']) ? htmlspecialchars($search['contact']) : '';
?>
" size="10">
		</td>
		 <td width="30">
			<?php 
echo _l('Priority:');
?>

		</td>
		<td>
            <?php 
echo print_select_box(module_ticket::get_ticket_priorities(), 'search[priority]', isset($search['priority']) ? $search['priority'] : '');
?>

		</td>
        <?php 
if (class_exists('module_envato', false)) {
    ?>

        <td width="27">
            <?php 
    echo _l('Envato:');
    ?>

        </td>
        <td>
            <?php