Ejemplo n.º 1
0
        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'));
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;
Ejemplo n.º 2
0
        ),
    )
);*/
$search = isset($_REQUEST['search']) && is_array($_REQUEST['search']) ? $_REQUEST['search'] : array();
if (!$search && isset($_REQUEST['do_last_search']) && isset($_SESSION['ticket_last_search'])) {
    $search = $_SESSION['ticket_last_search'];
}
if (isset($_REQUEST['faq_product_id']) && !isset($search['faq_product_id'])) {
    $search['faq_product_id'] = (int) $_REQUEST['faq_product_id'];
}
if (isset($_REQUEST['customer_id']) && (int) $_REQUEST['customer_id'] > 0) {
    $search['customer_id'] = (int) $_REQUEST['customer_id'];
} else {
    $search['customer_id'] = false;
}
$search_statuses = module_ticket::get_statuses();
$search_statuses['2,3,5'] = 'New/Replied/In Progress';
if (!isset($search['status_id']) && module_ticket::can_edit_tickets()) {
    $search['status_id'] = '2,3,5';
}
$tickets = module_ticket::get_tickets($search, true);
$_SESSION['ticket_last_search'] = $search;
if (!isset($_REQUEST['nonext'])) {
    $_SESSION['_ticket_nextprev'] = array();
    while ($ticket = mysql_fetch_assoc($tickets)) {
        $_SESSION['_ticket_nextprev'][] = $ticket['ticket_id'];
    }
    if (mysql_num_rows($tickets) > 0) {
        mysql_data_seek($tickets, 0);
    }
}
Ejemplo n.º 3
0
echo h(isset($types[$ticket['ticket_type_id']]) ? $types[$ticket['ticket_type_id']]['name'] : '');
?>

								</td>
							</tr>
							<tr>
								<th>
									<?php 
echo _l('Status');
?>

								</th>
								<td>
									<?php 
//echo print_select_box(module_ticket::get_statuses(),'status_id',$ticket['status_id'],'',true,false,true);
$s = module_ticket::get_statuses();
echo $s[$ticket['status_id']];
if ($ticket['status_id'] == 2 || $ticket['status_id'] == 3 || $ticket['status_id'] == 5) {
    if (module_config::c('ticket_show_position', 1)) {
        echo ' ';
        echo _l('(%s out of %s tickets)', ordinal($ticket['position']), module_ticket::ticket_count('pending'));
    }
}
?>

								</td>
							</tr>
						</tbody>
					</table>

	                <?php 
Ejemplo n.º 4
0
                 </th>
                 <td>
                     <?php 
 echo print_select_box(module_group::get_groups('ticket'), 'group_id', false, '', true, 'name');
 ?>
                 </td>
             </tr>
             <tr>
                 <th>
                     <?php 
 echo _l('Change Ticket Status');
 ?>
                 </th>
                 <td>
                     <?php 
 echo print_select_box(module_ticket::get_statuses(), 'status_id', '');
 ?>
                 </td>
             </tr>
             <tr>
                 <th>
                     <?php 
 echo _l('Send Ticket Reply Message');
 ?>
                 </th>
                 <td>
                     <input type="checkbox" name="send_message" value="1"> <?php 
 _e('Yes, send below message to each ticket in group:');
 ?>
                     <div>
                     <textarea name="send_message_content" id="send_message_content" rows="10" cols="30" style="width:450px; height: 350px;"></textarea>
        $current_status = $ticket['status_id'];
        //if ( count( $ticket_messages ) ) {
        if ($ticket_message_count) {
            if ($current_status <= 2) {
                //$current_status = 3; // change to replied
                $current_status = module_config::c('ticket_reply_status_id', _TICKET_STATUS_RESOLVED_ID);
                // resolved
            } else {
                //$current_status = 5; // change to in progress
                $current_status = module_config::c('ticket_reply_status_id', _TICKET_STATUS_RESOLVED_ID);
                // resolved
            }
        } else {
            $current_status = _TICKET_STATUS_NEW_ID;
        }
        echo print_select_box(module_ticket::get_statuses(), 'change_status_id', $current_status);
        ?>

					        <span id="data_change_status_id" data-status="<?php 
        echo (int) $current_status;
        ?>
"></span>
				        </td>
			        </tr>
			        <?php 
        if (module_config::c('ticket_show_change_staff', 0) && $ticket['assigned_user_id'] != module_security::get_loggedin_id() && isset($admins_rel[module_security::get_loggedin_id()])) {
            ?>

				        <tr>
					        <td colspan="2">
						        <?php 
Ejemplo n.º 6
0
    public static function hook_invoice_sidebar($callback, $invoice_id)
    {
        // see if any tickets match this  invoice.
        $tickets = get_multiple('ticket', array('invoice_id' => $invoice_id));
        if ($tickets) {
            foreach ($tickets as $ticket) {
                ?>

                <h3><?php 
                _e('Priority Support Ticket');
                ?>
</h3>
                <table border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form tableclass_full">
                    <tbody>
                    <tr>
                        <th class="width1">
                            <?php 
                _e('Ticket');
                ?>

                        </th>
                        <td>
                            <?php 
                echo module_ticket::link_open($ticket['ticket_id'], true, $ticket);
                ?>

                        </td>
                    </tr>
                    <tr>
                        <th>
                            <?php 
                _e('Subject');
                ?>

                        </th>
                        <td>
                            <?php 
                echo htmlspecialchars($ticket['subject']);
                ?>

                        </td>
                    </tr>
                    <tr>
                        <th>
                            <?php 
                _e('Status');
                ?>

                        </th>
                        <td>
                            <?php 
                $s = module_ticket::get_statuses();
                echo $s[$ticket['status_id']];
                ?>

                        </td>
                    </tr>
                    </tbody>
                </table>
                <?php 
            }
        }
    }