|
|
|
@ -37,6 +37,7 @@ require(HESK_PATH . 'hesk_settings.inc.php');
|
|
|
|
|
require(HESK_PATH . 'inc/common.inc.php');
|
|
|
|
|
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
|
|
|
|
require(HESK_PATH . 'inc/status_functions.inc.php');
|
|
|
|
|
require(HESK_PATH . 'inc/mail_functions.inc.php');
|
|
|
|
|
hesk_load_database_functions();
|
|
|
|
|
|
|
|
|
|
hesk_session_start();
|
|
|
|
@ -60,25 +61,9 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
|
|
|
|
|
/* Print admin navigation */
|
|
|
|
|
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="row pad-down-20">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
<div class="panel-heading">
|
|
|
|
|
<h4><?php echo $hesklang['tickets_found']; ?> <span class="nu-floatRight panel-button"><a
|
|
|
|
|
href="new_ticket.php"
|
|
|
|
|
class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span> <?php echo $hesklang['nti']; ?></a></span></h4>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
// This SQL code will be used to retrieve results
|
|
|
|
|
$sql_final = "SELECT
|
|
|
|
|
// This SQL code will be used to retrieve results
|
|
|
|
|
$sql_final = "SELECT
|
|
|
|
|
`id`,
|
|
|
|
|
`trackid`,
|
|
|
|
|
`name`,
|
|
|
|
@ -223,16 +208,11 @@ LEFT(`message`, 400) AS `message`,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Date */
|
|
|
|
|
/* -> Check for compatibility with old date format */
|
|
|
|
|
if (preg_match("/(\d{4})-(\d{2})-(\d{2})/", hesk_GET('dt'), $m)) {
|
|
|
|
|
$_GET['dt'] = $m[2] . $m[3] . $m[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* -> Now process the date value */
|
|
|
|
|
$dt = preg_replace('/[^0-9]/', '', hesk_GET('dt'));
|
|
|
|
|
if (strlen($dt) == 8) {
|
|
|
|
|
$date = substr($dt, 4, 4) . '-' . substr($dt, 0, 2) . '-' . substr($dt, 2, 2);
|
|
|
|
|
$date_input = substr($dt, 0, 2) . '/' . substr($dt, 2, 2) . '/' . substr($dt, 4, 4);
|
|
|
|
|
$date = substr($dt, 0, 4) . '-' . substr($dt, 4, 2) . '-' . substr($dt, 6, 2);
|
|
|
|
|
$date_input = $date;
|
|
|
|
|
|
|
|
|
|
/* This search is valid even if no query is entered */
|
|
|
|
|
if ($no_query) {
|
|
|
|
@ -250,9 +230,6 @@ LEFT(`message`, 400) AS `message`,
|
|
|
|
|
hesk_process_messages($hesk_error_buffer, 'NOREDIRECT');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* This will handle error, success and notice messages */
|
|
|
|
|
$handle = hesk_handle_messages();
|
|
|
|
|
|
|
|
|
|
# echo "$sql<br/>";
|
|
|
|
|
|
|
|
|
|
// That's all the SQL we need for count
|
|
|
|
@ -261,24 +238,49 @@ LEFT(`message`, 400) AS `message`,
|
|
|
|
|
|
|
|
|
|
/* Prepare variables used in search and forms */
|
|
|
|
|
require_once(HESK_PATH . 'inc/prepare_ticket_search.inc.php');
|
|
|
|
|
|
|
|
|
|
/* If there has been an error message skip searching for tickets */
|
|
|
|
|
if ($handle !== FALSE) {
|
|
|
|
|
$href = 'find_tickets.php';
|
|
|
|
|
require_once(HESK_PATH . 'inc/ticket_list.inc.php');
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<section class="content">
|
|
|
|
|
<div class="box">
|
|
|
|
|
<div class="box-header with-border">
|
|
|
|
|
<h1 class="box-title">
|
|
|
|
|
<?php echo $hesklang['tickets']; ?>
|
|
|
|
|
</h1>
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
<?php $handle = hesk_handle_messages(); ?>
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="checkbox" onclick="toggleAutoRefresh(this);" id="reloadCB">
|
|
|
|
|
<?php echo $hesklang['arp']; ?>
|
|
|
|
|
<span id="timer"></span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">heskCheckReloading();</script>
|
|
|
|
|
<?php
|
|
|
|
|
if ($handle !== FALSE) {
|
|
|
|
|
$href = 'find_tickets.php';
|
|
|
|
|
require_once(HESK_PATH . 'inc/ticket_list.inc.php');
|
|
|
|
|
echo '<br>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
/* Clean unneeded session variables */
|
|
|
|
|
hesk_cleanSessionVars('hide');
|
|
|
|
|
|
|
|
|
|
/* Clean unneeded session variables */
|
|
|
|
|
hesk_cleanSessionVars('hide');
|
|
|
|
|
/* Show the search form */
|
|
|
|
|
require_once(HESK_PATH . 'inc/show_search_form.inc.php');
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/* Show the search form */
|
|
|
|
|
require_once(HESK_PATH . 'inc/show_search_form.inc.php');
|
|
|
|
|
|
|
|
|
|
/* Print footer */
|
|
|
|
|
require_once(HESK_PATH . 'inc/footer.inc.php');
|
|
|
|
|
exit();
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|