Starting to work on ticket search
This commit is contained in:
parent
5ce782d893
commit
e251d586f9
@ -64,7 +64,9 @@ if (hesk_checkPermission('can_view_tickets', 0)) {
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h1 class="box-title"><?php echo $hesklang['open_tickets']; ?></h1>
|
||||
<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" data-toggle="tooltip" title="Collapse"></i>
|
||||
@ -76,6 +78,9 @@ if (hesk_checkPermission('can_view_tickets', 0)) {
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer clearfix">
|
||||
<a href="new_ticket.php" class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span> <?php echo $hesklang['nti']; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
20
inc/ticket/get_tickets.inc.php
Normal file
20
inc/ticket/get_tickets.inc.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @param $search_filter Filter to search by. Valid criteria:
|
||||
* //TODO
|
||||
*/
|
||||
function get_tickets($search_filter, $hesk_settings) {
|
||||
$sql = "SELECT `id`, `trackid`, `name`, `email`, `category`, `priority`, `subject`, LEFT(`message`, 400) AS `message`,
|
||||
`dt`, `lastchange`, `firstreply`, `closedat`, `status`, `openedby`, `firstreplyby`, `closedby`, `replies`, `staffreplies`, `owner`,
|
||||
`time_worked`, `lastreplier`, `replierid`, `archive`, `locked`, `merged`, `due_date`, `latitude`, `longitude`, `user_agent`,
|
||||
`screen_resolution_width`, `screen_resolution_height`";
|
||||
|
||||
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
||||
if ($v['use']) {
|
||||
$sql_final .= ", `" . $k . "`";
|
||||
}
|
||||
}
|
||||
|
||||
$sql_final .= " FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` WHERE ";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user