Ejemplo n.º 1
0
    $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');
}
print_heading($header);
?>



<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'] : '';
?>
Ejemplo n.º 2
0
}
$last_response_from = 'admin';
// or customer.
// find the prev/next tickets.
$temp_prev = $prev_ticket = $next_ticket = false;
$temp_tickets = isset($_SESSION['_ticket_nextprev']) ? $_SESSION['_ticket_nextprev'] : array();
foreach ($temp_tickets as $key => $val) {
    if ($prev_ticket && !$next_ticket) {
        $next_ticket = $val;
    }
    if ($val == $ticket_id) {
        $prev_ticket = $temp_prev ? $temp_prev : true;
    }
    $temp_prev = $val;
}
$form_actions = array('class' => 'action_bar action_bar_center action_bar_single', 'elements' => array(array('type' => 'save_button', 'name' => 'butt_save', 'value' => _l('Save details')), array('ignore' => !((int) $ticket_id && module_ticket::can_i('delete', 'Tickets')), 'type' => 'delete_button', 'name' => 'butt_del', 'value' => _l('Delete')), array('type' => 'button', 'name' => 'cancel', 'value' => _l('Cancel'), 'class' => 'submit_button', 'onclick' => "window.location.href='" . module_ticket::link_open(false) . "';")));
if ((int) $ticket_id && module_ticket::can_edit_tickets()) {
    $form_actions['elements'][] = array('type' => 'submit', 'name' => 'mark_as_unread', 'value' => _l('Mark as unread'));
}
if ($prev_ticket && $prev_ticket !== true) {
    array_unshift($form_actions['elements'], array('type' => 'button', 'onclick' => "window.location.href='" . module_ticket::link_open($prev_ticket) . "';", 'name' => 'prev_ticket', 'value' => _l('Prev Ticket')));
}
if ($next_ticket) {
    $form_actions['elements'][] = array('type' => 'button', 'onclick' => "window.location.href='" . module_ticket::link_open($next_ticket) . "';", 'name' => 'next_ticket', 'value' => _l('Next Ticket'));
}
$action_buttons = module_form::generate_form_actions($form_actions);
?>



<script type="text/javascript">
Ejemplo n.º 3
0
                                            </div>
                                            <?php 
}
?>

                                        </div>
                    </mobile>


    <p align="center">
        <input type="submit" name="butt_save" id="butt_save" value="<?php 
echo _l('Save details');
?>
" class="submit_button save_button" />
        <?php 
if ((int) $ticket_id && module_ticket::can_i('delete', 'Tickets')) {
    ?>

        <input type="submit" name="butt_del" id="butt_del" value="<?php 
    echo _l('Delete');
    ?>
" class="submit_button delete_button" />
        <?php 
}
?>

        <input type="button" name="cancel" value="<?php 
echo _l('Cancel');
?>
" onclick="window.location.href='<?php 
echo module_ticket::link_open(false);