Use YYYY-MM-DD for ticket date, restyle find_tickets
This commit is contained in:
parent
988f0e9a0f
commit
aba103bb49
@ -37,6 +37,7 @@ require(HESK_PATH . 'hesk_settings.inc.php');
|
|||||||
require(HESK_PATH . 'inc/common.inc.php');
|
require(HESK_PATH . 'inc/common.inc.php');
|
||||||
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
||||||
require(HESK_PATH . 'inc/status_functions.inc.php');
|
require(HESK_PATH . 'inc/status_functions.inc.php');
|
||||||
|
require(HESK_PATH . 'inc/mail_functions.inc.php');
|
||||||
hesk_load_database_functions();
|
hesk_load_database_functions();
|
||||||
|
|
||||||
hesk_session_start();
|
hesk_session_start();
|
||||||
@ -60,22 +61,6 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
|
|||||||
/* Print admin navigation */
|
/* Print admin navigation */
|
||||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
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
|
// This SQL code will be used to retrieve results
|
||||||
$sql_final = "SELECT
|
$sql_final = "SELECT
|
||||||
@ -223,16 +208,11 @@ LEFT(`message`, 400) AS `message`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Date */
|
/* 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 */
|
/* -> Now process the date value */
|
||||||
$dt = preg_replace('/[^0-9]/', '', hesk_GET('dt'));
|
$dt = preg_replace('/[^0-9]/', '', hesk_GET('dt'));
|
||||||
if (strlen($dt) == 8) {
|
if (strlen($dt) == 8) {
|
||||||
$date = substr($dt, 4, 4) . '-' . substr($dt, 0, 2) . '-' . substr($dt, 2, 2);
|
$date = substr($dt, 0, 4) . '-' . substr($dt, 4, 2) . '-' . substr($dt, 6, 2);
|
||||||
$date_input = substr($dt, 0, 2) . '/' . substr($dt, 2, 2) . '/' . substr($dt, 4, 4);
|
$date_input = $date;
|
||||||
|
|
||||||
/* This search is valid even if no query is entered */
|
/* This search is valid even if no query is entered */
|
||||||
if ($no_query) {
|
if ($no_query) {
|
||||||
@ -250,9 +230,6 @@ LEFT(`message`, 400) AS `message`,
|
|||||||
hesk_process_messages($hesk_error_buffer, 'NOREDIRECT');
|
hesk_process_messages($hesk_error_buffer, 'NOREDIRECT');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This will handle error, success and notice messages */
|
|
||||||
$handle = hesk_handle_messages();
|
|
||||||
|
|
||||||
# echo "$sql<br/>";
|
# echo "$sql<br/>";
|
||||||
|
|
||||||
// That's all the SQL we need for count
|
// 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 */
|
/* Prepare variables used in search and forms */
|
||||||
require_once(HESK_PATH . 'inc/prepare_ticket_search.inc.php');
|
require_once(HESK_PATH . 'inc/prepare_ticket_search.inc.php');
|
||||||
|
?>
|
||||||
/* If there has been an error message skip searching for tickets */
|
<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) {
|
if ($handle !== FALSE) {
|
||||||
$href = 'find_tickets.php';
|
$href = 'find_tickets.php';
|
||||||
require_once(HESK_PATH . 'inc/ticket_list.inc.php');
|
require_once(HESK_PATH . 'inc/ticket_list.inc.php');
|
||||||
|
echo '<br>';
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
/* Clean unneeded session variables */
|
/* Clean unneeded session variables */
|
||||||
hesk_cleanSessionVars('hide');
|
hesk_cleanSessionVars('hide');
|
||||||
|
|
||||||
/* Show the search form */
|
/* Show the search form */
|
||||||
require_once(HESK_PATH . 'inc/show_search_form.inc.php');
|
require_once(HESK_PATH . 'inc/show_search_form.inc.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
/* Print footer */
|
/* Print footer */
|
||||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -93,8 +93,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
|
||||||
<div class="box-body">
|
|
||||||
<?php
|
<?php
|
||||||
$hesk_settings['hesk_license']('HMgPSAxOw0KaWYgKGZpbGVfZXhpc3RzKEhFU0tfUEFUSCAuI
|
$hesk_settings['hesk_license']('HMgPSAxOw0KaWYgKGZpbGVfZXhpc3RzKEhFU0tfUEFUSCAuI
|
||||||
CdoZXNrX2xpY2Vuc2UucGhwJykpDQp7DQokaCA9ICghZW1wdHkoJF9TRVJWRVJbJ0hUVFBfSE9TVCddK
|
CdoZXNrX2xpY2Vuc2UucGhwJykpDQp7DQokaCA9ICghZW1wdHkoJF9TRVJWRVJbJ0hUVFBfSE9TVCddK
|
||||||
@ -117,8 +115,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
/* Clean unneeded session variables */
|
/* Clean unneeded session variables */
|
||||||
hesk_cleanSessionVars('hide');
|
hesk_cleanSessionVars('hide');
|
||||||
?>
|
?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -411,10 +411,7 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {
|
<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {
|
||||||
echo 'value="' . $q . '"';
|
echo 'value="' . $q . '"';
|
||||||
} ?>
|
} ?>>
|
||||||
data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
|
|
||||||
required>
|
|
||||||
<div class="help-block with-errors"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-left" style="border: none">
|
<td class="text-left" style="border: none">
|
||||||
@ -515,7 +512,7 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="alignMiddle"><b><?php echo $hesklang['date']; ?></b>: </td>
|
<td class="alignMiddle"><b><?php echo $hesklang['date']; ?></b>: </td>
|
||||||
<td class="alignMiddle">
|
<td class="alignMiddle">
|
||||||
<div class="col-md-3" style="padding-left: 0px"><input class="form-control tcal"
|
<div class="col-md-3" style="padding-left: 0px"><input class="form-control datepicker"
|
||||||
type="text" name="dt"
|
type="text" name="dt"
|
||||||
id="dt"
|
id="dt"
|
||||||
size="10" <?php if ($date_input) {
|
size="10" <?php if ($date_input) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user