Esempio n. 1
0
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;
        }
    }
    if ($other_tickets !== false && mysql_num_rows($other_tickets) > 1) {
        $other_status = array();
        ob_start();
        ?>

            <table border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form tableclass_full tbl_fixed">
                <tbody>
                    <?php 
        while ($other_ticket = mysql_fetch_assoc($other_tickets)) {
            ?>
Esempio n. 2
0
    $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);
    }
}
$priorities = module_ticket::get_ticket_priorities();
$header = array('title' => _l('Customer Tickets'), 'type' => 'h2', 'main' => true, 'button' => array());
if (module_ticket::can_i('create', 'Tickets')) {
    $header['button'] = array('url' => module_ticket::link_open('new'), 'title' => _l('Add New Ticket'), 'type' => 'add');
}
Esempio n. 3
0
                         'm' => 'ticket',
                         'p' => 'ticket_admin',
                         'default_page' => 'ticket_admin_open',
                         'order' => 0,
                         'menu_include_parent' => 0,
                         'allow_nesting' => 0,
                         'current' => true,
                         'args'=>array(
                             'faq_product_id'=>false,
                             'ticket_id'=>$ticket_data['ticket_id'],
                         )
                     ));*/
     }
 }
 array_unshift($links, array("name" => _l('All'), 'm' => 'ticket', 'p' => 'ticket_admin', 'default_page' => 'ticket_admin_open', 'order' => 1, 'menu_include_parent' => 0, 'allow_nesting' => 0, 'current' => !$showing_ticket && !isset($_REQUEST['faq_product_id']), 'args' => array('faq_product_id' => false, 'ticket_id' => false)));
 $product_tickets = module_ticket::get_tickets(array('faq_product_id' => '0', 'status_id' => '<' . _TICKET_STATUS_RESOLVED_ID));
 $link_name = _l('No Product') . " <span class='menu_label'>" . mysql_num_rows($product_tickets) . '</span>';
 $ticket_count = module_ticket::get_ticket_count(0);
 if ($ticket_count && $ticket_count['priority'] > 0) {
     $link_name .= " <span class='menu_label important'>" . $ticket_count['priority'] . "</span> ";
     //    $link_name .= ' <em>+ '.$ticket_count['priority'].'</em>';
 }
 //$link_name .= '</span>';
 array_unshift($links, array("name" => $link_name, 'm' => 'ticket', 'p' => 'ticket_admin', 'default_page' => 'ticket_admin_open', 'order' => 2, 'menu_include_parent' => 0, 'allow_nesting' => 0, 'current' => !$showing_ticket && isset($_REQUEST['faq_product_id']) && $_REQUEST['faq_product_id'] == 0, 'args' => array('faq_product_id' => 0, 'ticket_id' => false)));
 /*if(!$showing_ticket && (!isset($_REQUEST['faq_product_id']) || !$_REQUEST['faq_product_id'])){
       // hack for search to work correctly.
       $_REQUEST['search'] = isset($_REQUEST['search']) ? $_REQUEST['search'] : array();
       $_REQUEST['search']['faq_product_id'] = 0;
   }*/
 $products = module_faq::get_faq_products_rel();
 $order = 3;
Esempio n. 4
0
 public static function hook_customer_deleted($callback_name, $customer_id, $remove_linked_data)
 {
     if ((int) $customer_id > 0) {
         while ($row = mysql_fetch_assoc(module_ticket::get_tickets(array('customer_id' => $customer_id)))) {
             if ($remove_linked_data && self::can_i('delete', 'Tickets')) {
                 self::delete_ticket($row['ticket_id']);
             } else {
                 update_insert('ticket_id', $row['ticket_id'], 'ticket', array('customer_id' => 0));
             }
         }
     }
 }
Esempio n. 5
0
}
?>

						</tbody>
                        <?php 
if (isset($ticket['ticket_id']) && $ticket['ticket_id'] && module_ticket::can_edit_tickets()) {
    module_extra::display_extras(array('owner_table' => 'ticket', 'owner_key' => 'ticket_id', 'owner_id' => $ticket['ticket_id'], 'layout' => 'table_row'));
}
?>

					</table>


                    <?php 
if ($ticket['user_id']) {
    $other_tickets = module_ticket::get_tickets(array('user_id' => $ticket['user_id']));
    if (mysql_num_rows($other_tickets) > 1) {
        ?>

                        <h3><?php 
        _e('%s Other Support Tickets', mysql_num_rows($other_tickets));
        ?>
</h3>
                        <table border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form tableclass_full tbl_fixed">
                            <tbody>
                                <?php 
        while ($other_ticket = mysql_fetch_assoc($other_tickets)) {
            ?>

                            <tr>
                                <td style="width:55px; <?php