2014-03-23 16:03:30 -04:00
< ? php
/*******************************************************************************
2014-12-29 00:05:36 -05:00
* Title : Help Desk Software HESK
2015-08-29 21:44:26 -04:00
* Version : 2.6 . 5 from 28 th August 2015
2014-12-29 00:05:36 -05:00
* Author : Klemen Stirn
* Website : http :// www . hesk . com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
2015-02-22 22:16:44 -05:00
* Copyright 2005 - 2015 Klemen Stirn . All Rights Reserved .
2014-12-29 00:05:36 -05:00
* HESK is a registered trademark of Klemen Stirn .
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT .
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it ' s use .
* Selling the code for this program , in part or full , without prior
* written consent is expressly forbidden .
* Using this code , in part or full , to create derivate work ,
* new scripts or products is expressly forbidden . Obtain permission
* before redistributing this software over the Internet or in
* any other medium . In all cases copyright and header must remain intact .
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union .
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden . To remove HESK copyright notice you must purchase
* a license for this script . For more information on how to obtain
* a license please visit the page below :
* https :// www . hesk . com / buy . php
*******************************************************************************/
2014-03-23 16:03:30 -04:00
/* Check if this is a valid include */
2015-09-12 00:46:46 -04:00
if ( ! defined ( 'IN_SCRIPT' )) {
die ( 'Invalid attempt' );
}
if ( ! isset ( $status )) {
2014-06-19 23:32:23 -04:00
$status = array ();
2015-07-30 12:35:30 -04:00
$allStatuses = mfh_getAllStatuses ();
2014-06-19 23:32:23 -04:00
//-- We don't want to check statuses that are considered "closed"
2015-09-12 00:46:46 -04:00
foreach ( $allStatuses as $row ) {
2015-09-03 19:58:46 -04:00
if ( $row [ 'IsClosed' ] == 1 ) {
2015-07-30 12:35:30 -04:00
continue ;
}
2015-07-28 13:00:26 -04:00
$status [ $row [ 'ID' ]] = mfh_getDisplayTextForStatusId ( $row [ 'ID' ]);
2014-06-19 23:32:23 -04:00
}
2014-03-23 16:03:30 -04:00
}
2015-09-12 00:46:46 -04:00
if ( ! isset ( $priority )) {
2014-12-29 00:05:36 -05:00
$priority = array (
0 => 'CRITICAL' ,
1 => 'HIGH' ,
2 => 'MEDIUM' ,
3 => 'LOW' ,
);
2014-03-23 16:03:30 -04:00
}
2015-09-12 00:46:46 -04:00
if ( ! isset ( $what )) {
2014-12-29 00:05:36 -05:00
$what = 'trackid' ;
2014-03-23 16:03:30 -04:00
}
2015-09-12 00:46:46 -04:00
if ( ! isset ( $owner_input )) {
$owner_input = 0 ;
2015-01-12 21:00:11 -05:00
}
2015-09-12 00:46:46 -04:00
if ( ! isset ( $date_input )) {
2014-12-29 00:05:36 -05:00
$date_input = '' ;
2014-03-23 16:03:30 -04:00
}
/* Can view tickets that are unassigned or assigned to others? */
2015-09-12 00:46:46 -04:00
$can_view_ass_others = hesk_checkPermission ( 'can_view_ass_others' , 0 );
$can_view_unassigned = hesk_checkPermission ( 'can_view_unassigned' , 0 );
2014-03-23 16:03:30 -04:00
/* Category options */
$category_options = '' ;
2015-09-12 00:46:46 -04:00
if ( isset ( $hesk_settings [ 'categories' ]) && count ( $hesk_settings [ 'categories' ])) {
foreach ( $hesk_settings [ 'categories' ] as $row [ 'id' ] => $row [ 'name' ]) {
$row [ 'name' ] = ( strlen ( $row [ 'name' ]) > 30 ) ? substr ( $row [ 'name' ], 0 , 30 ) . '...' : $row [ 'name' ];
2014-12-29 00:05:36 -05:00
$selected = ( $row [ 'id' ] == $category ) ? 'selected="selected"' : '' ;
2015-09-12 00:46:46 -04:00
$category_options .= '<option value="' . $row [ 'id' ] . '" ' . $selected . '>' . $row [ 'name' ] . '</option>' ;
2014-12-29 00:05:36 -05:00
}
2015-09-12 00:46:46 -04:00
} else {
$res2 = hesk_dbQuery ( 'SELECT `id`, `name` FROM `' . hesk_dbEscape ( $hesk_settings [ 'db_pfix' ]) . 'categories` WHERE ' . hesk_myCategories ( 'id' ) . ' ORDER BY `cat_order` ASC' );
while ( $row = hesk_dbFetchAssoc ( $res2 )) {
$row [ 'name' ] = ( strlen ( $row [ 'name' ]) > 30 ) ? substr ( $row [ 'name' ], 0 , 30 ) . '...' : $row [ 'name' ];
2014-12-29 00:05:36 -05:00
$selected = ( $row [ 'id' ] == $category ) ? 'selected="selected"' : '' ;
2015-09-12 00:46:46 -04:00
$category_options .= '<option value="' . $row [ 'id' ] . '" ' . $selected . '>' . $row [ 'name' ] . '</option>' ;
2014-12-29 00:05:36 -05:00
}
2014-03-23 16:03:30 -04:00
}
2015-01-12 21:00:11 -05:00
/* List of staff */
2015-09-12 00:46:46 -04:00
if ( $can_view_ass_others && ! isset ( $admins )) {
2015-01-12 21:00:11 -05:00
$admins = array ();
2015-09-12 00:46:46 -04:00
$res2 = hesk_dbQuery ( " SELECT `id`,`name` FROM ` " . hesk_dbEscape ( $hesk_settings [ 'db_pfix' ]) . " users` ORDER BY `name` ASC " );
while ( $row = hesk_dbFetchAssoc ( $res2 )) {
$admins [ $row [ 'id' ]] = $row [ 'name' ];
2015-01-12 21:00:11 -05:00
}
}
2014-03-23 16:03:30 -04:00
$more = empty ( $_GET [ 'more' ]) ? 0 : 1 ;
$more2 = empty ( $_GET [ 'more2' ]) ? 0 : 1 ;
#echo "SQL: $sql";
?>
<!-- ** START SHOW TICKET FORM ** -->
2014-09-06 22:19:59 -04:00
< div class = " panel panel-default " >
2015-09-12 00:46:46 -04:00
< div class = " panel-heading " >
< h4 >< ? php echo $hesklang [ 'show_tickets' ]; ?> </h4>
</ div >
< div class = " panel-body " >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td valign = " top " >
< form name = " showt " action = " show_tickets.php " method = " get " >
< table class = " table " style = " border-top: 0 !important " border = " 0 " cellpadding = " 3 " cellspacing = " 0 "
width = " 100% " >
< tr >
< td style = " border-top: 0px " width = " 20% " class = " alignTop " >
< b >< ? php echo $hesklang [ 'status' ]; ?> </b>: </td>
< td style = " border-top: 0px " width = " 80% " >
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 100% " >
< tr >
< ? php
2014-09-06 22:19:59 -04:00
$rowCounter = 1 ;
2015-09-12 00:46:46 -04:00
$statuses = mfh_getAllStatuses ();
foreach ( $statuses as $row ) {
if ( $rowCounter > 3 ) {
echo '</tr><tr>' ;
$rowCounter = 1 ;
}
echo '<td width=' ;
if ( $rowCounter != 3 ) {
echo '"33%"' ;
} else {
echo '"34%"' ;
}
echo '<label><input type="checkbox" name="s' . $row [ 'ID' ] . '" value="1"' ;
if ( isset ( $status [ $row [ 'ID' ]])) {
echo 'checked="checked"' ;
}
echo '/> <span style="font-weight: bold;color: ' . $row [ 'TextColor' ] . ';">' . mfh_getDisplayTextForStatusId ( $row [ 'ID' ]) . '</span></label></td>' ;
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
$rowCounter ++ ;
}
?>
</ tr >
</ table >
</ td >
</ tr >
</ table >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< div id = " topSubmit " style = " display:<?php echo $more ? 'none' : 'block'; ?> " >
< div class = " btn-group " >
< input class = " btn btn-default " type = " submit "
value = " <?php echo $hesklang['show_tickets'] ; ?> " />
< a class = " btn btn-default " href = " javascript:void(0) "
onclick = " Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='1'; " >< ? php echo $hesklang [ 'mopt' ]; ?> </a>
</ div >
</ div >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< div id = " divShow " style = " display:<?php echo $more ? 'block' : 'none'; ?> " >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< table class = " table table-striped " border = " 0 " cellpadding = " 3 " cellspacing = " 0 " width = " 100% " >
< tr >
< td width = " 20% " class = " borderTop alignTop " >
< b >< ? php echo $hesklang [ 'priority' ]; ?> </b>: </td>
< td width = " 80% " class = " borderTop alignTop " >
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 100% " >
< tr >
< td width = " 33% " >< label >< input type = " checkbox " name = " p0 "
value = " 1 " < ? php if ( isset ( $priority [ 0 ])) {
echo 'checked="checked"' ;
} ?> /> <span
class = " critical " >< ? php echo $hesklang [ 'critical' ]; ?> </span></label>
</ td >
< td width = " 33% " >< label >< input type = " checkbox " name = " p2 "
value = " 1 " < ? php if ( isset ( $priority [ 2 ])) {
echo 'checked="checked"' ;
} ?> /> <span
class = " medium " >< ? php echo $hesklang [ 'medium' ]; ?> </span></label>
</ td >
< td width = " 34% " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 33% " >< label >< input type = " checkbox " name = " p1 "
value = " 1 " < ? php if ( isset ( $priority [ 1 ])) {
echo 'checked="checked"' ;
} ?> /> <span
class = " important " >< ? php echo $hesklang [ 'high' ]; ?> </span></label>
</ td >
< td width = " 33% " >< label >< input type = " checkbox " name = " p3 "
value = " 1 " < ? php if ( isset ( $priority [ 3 ])) {
echo 'checked="checked"' ;
} ?> /> <span
class = " normal " >< ? php echo $hesklang [ 'low' ]; ?> </span></label>
</ td >
< td width = " 34% " >& nbsp ; </ td >
</ tr >
</ table >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
</ td >
</ tr >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< tr >
< td class = " borderTop alignTop " >< b >< ? php echo $hesklang [ 'show' ]; ?> </b>: </td>
< td class = " borderTop " >
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 100% " >
< tr >
< td width = " 33% " class = " alignTop " >
< label >< input type = " checkbox " name = " s_my "
value = " 1 " < ? php if ( $s_my [ 1 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_my']; ?>
</ label >
< ? php
if ( $can_view_unassigned ) {
?>
< br />
< label >< input type = " checkbox " name = " s_un "
value = " 1 " < ? php if ( $s_un [ 1 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_un']; ?>
</ label >
< ? php
}
?>
</ td >
< td width = " 33% " class = " alignTop " >
< ? php
if ( $can_view_ass_others ) {
?>
< label >< input type = " checkbox " name = " s_ot "
value = " 1 " < ? php if ( $s_ot [ 1 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_ot']; ?>
</ label >
< br />
< ? php
}
?>
< label >< input type = " checkbox " name = " archive "
value = " 1 " < ? php if ( $archive [ 1 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['disp_only_archived']; ?>
</ label ></ td >
< td width = " 34% " >& nbsp ; </ td >
</ tr >
</ table >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
</ td >
</ tr >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< tr >
< td class = " borderTop alignTop " >< b >< ? php echo $hesklang [ 'sort_by' ]; ?> </b>:
</ td >
< td class = " borderTop " >
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 100% " >
2014-12-29 00:05:36 -05:00
< ? php
2015-09-12 00:46:46 -04:00
array_unshift ( $hesk_settings [ 'ticket_list' ], 'priority' );
$hesk_settings [ 'possible_ticket_list' ][ 'priority' ] = $hesklang [ 'priority' ];
$column = 1 ;
foreach ( $hesk_settings [ 'ticket_list' ] as $key ) {
if ( $column == 1 ) {
echo '<tr><td width="34%">' ;
} else {
echo '<td width="33%">' ;
}
echo '<label><input type="radio" name="sort" value="' . $key . '" ' . ( $sort == $key ? 'checked="checked"' : '' ) . ' /> ' . $hesk_settings [ 'possible_ticket_list' ][ $key ] . '</label></td>' ;
if ( $column == 3 ) {
echo '</tr>' ;
$column = 1 ;
} else {
$column ++ ;
}
2014-09-06 22:19:59 -04:00
}
2015-09-12 00:46:46 -04:00
// End table if needed
if ( $column == 3 ) {
echo '<td width="33%"> </td></tr>' ;
} elseif ( $column == 2 ) {
echo '<td width="33%"> </td><td width="33%"> </td></tr>' ;
2014-12-29 00:05:36 -05:00
}
?>
2015-09-12 00:46:46 -04:00
</ table >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
</ td >
</ tr >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< tr >
< td class = " alignTop " >< b >< ? php echo $hesklang [ 'gb' ]; ?> </b>: </td>
< td >
< table border = " 0 " cellpadding = " 0 " cellspacing = " 0 " width = " 100% " >
< tr >
< td width = " 33% " >< label >< input type = " radio " name = " g "
value = " " < ? php if ( ! $group ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['dg']; ?></label></td>
< td width = " 33% " >< ? php
if ( $can_view_unassigned || $can_view_ass_others ) {
?>
< label >< input type = " radio " name = " g "
value = " owner " < ? php if ( $group == 'owner' ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['owner']; ?></label>
< ? php
} else {
echo ' ' ;
}
?>
</ td >
< td width = " 34% " >& nbsp ; </ td >
</ tr >
< tr >
< td width = " 33% " >< label >< input type = " radio " name = " g "
value = " category " < ? php if ( $group == 'category' ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['category']; ?></label></td>
< td width = " 33% " >< label >< input type = " radio " name = " g "
value = " priority " < ? php if ( $group == 'priority' ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['priority']; ?></label></td>
< td width = " 34% " >& nbsp ; </ td >
</ tr >
</ table >
2015-01-12 21:00:11 -05:00
2015-09-12 00:46:46 -04:00
</ td >
</ tr >
2015-01-12 21:00:11 -05:00
2015-09-12 00:46:46 -04:00
< tr >
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'category' ]; ?> </b>: </td>
< td class = " alignMiddle " >
< div class = " col-md-4 " style = " padding-left: 0px " >< select class = " form-control "
name = " category " >
< option value = " 0 " >< ? php echo $hesklang [ 'any_cat' ]; ?> </option>
< ? php echo $category_options ; ?>
</ select ></ div >
</ td >
</ tr >
2015-01-12 21:00:11 -05:00
2015-09-12 00:46:46 -04:00
< tr >
< td >< b >< ? php echo $hesklang [ 'display' ]; ?> </b>: </td>
< td >
< div class = " col-md-2 " style = " padding-left: 0px; padding-right:0px " >< input
type = " text " class = " form-control " name = " limit "
value = " <?php echo $maxresults ; ?> " size = " 4 " /></ div >
< div class = " col-md-3 "
style = " line-height: 40px " >< ? php echo $hesklang [ 'tickets_page' ]; ?> </div>
</ td >
</ tr >
< tr >
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'order' ]; ?> </b>: </td>
< td class = " alignMiddle " >
< label >< input type = " radio " name = " asc " value = " 1 " < ? php if ( $asc ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['ascending']; ?></label>
|
< label >< input type = " radio " name = " asc " value = " 0 " < ? php if ( ! $asc ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['descending']; ?></label></td>
</ tr >
2015-01-12 21:00:11 -05:00
2015-09-12 00:46:46 -04:00
< tr >
< td class = " alignTop " >< b >< ? php echo $hesklang [ 'opt' ]; ?> </b>: </td>
< td >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
< label >< input type = " checkbox " name = " cot " value = " 1 " < ? php if ( $cot ) {
echo 'checked="checked"' ;
} ?> /> <?php echo $hesklang['cot']; ?></label><br/>
< label >< input type = " checkbox " name = " def "
value = " 1 " /> < ? php echo $hesklang [ 'def' ]; ?> </label> (<a
href = " admin_main.php?reset=1&token=<?php echo hesk_token_echo(0); ?> " >< ? php echo $hesklang [ 'redv' ]; ?> </a>)
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
</ td >
</ table >
< div class = " btn-group " >
< input class = " btn btn-default " type = " submit "
value = " <?php echo $hesklang['show_tickets'] ; ?> " />
< a class = " btn btn-default " href = " javascript:void(0) "
onclick = " Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='0'; " >< ? php echo $hesklang [ 'lopt' ]; ?> </a>
</ div >
< input type = " hidden " name = " more " value = " <?php echo $more ? 1 : 0; ?> " />
</ div >
</ form >
</ td >
</ tr >
</ table >
</ div >
2014-03-23 16:03:30 -04:00
</ div >
<!-- ** END SHOW TICKET FORM ** -->
< div class = " blankSpace " ></ div >
<!-- ** START SEARCH TICKETS FORM ** -->
2014-09-06 22:19:59 -04:00
< div class = " panel panel-default " >
2014-12-29 00:05:36 -05:00
< div class = " panel-heading " >
< h4 >< ? php echo $hesklang [ 'find_ticket_by' ]; ?> </h4>
</ div >
< div class = " panel-body " >
< table width = " 100% " border = " 0 " cellspacing = " 0 " cellpadding = " 0 " >
< tr >
< td valign = " top " >
2014-03-23 16:03:30 -04:00
2014-12-29 00:05:36 -05:00
< form class = " form-inline " action = " find_tickets.php " method = " get " name = " findby " id = " findby " >
2014-03-23 16:03:30 -04:00
2014-12-29 00:05:36 -05:00
< table class = " table " style = " width: auto " border = " 0 " cellpadding = " 3 " cellspacing = " 0 " >
2015-02-05 20:39:49 -05:00
< tr style = " border: none " >
< td class = " text-left " style = " border: none " >
2015-09-12 00:46:46 -04:00
< b style = " color: #000 " >< ? php echo $hesklang [ 's_for' ]; ?> </b><br/>
< input class = " form-control " type = " text " name = " q " size = " 30 " < ? php if ( isset ( $q )) {
echo 'value="' . $q . '"' ;
} ?> />
2014-12-29 00:05:36 -05:00
</ td >
2015-02-05 20:39:49 -05:00
< td class = " text-left " style = " border: none " >
2015-09-12 00:46:46 -04:00
< b style = " color: #000 " >< ? php echo $hesklang [ 's_in' ]; ?> </b><br/>
2015-02-05 20:39:49 -05:00
< select class = " form-control " name = " what " >
2015-09-12 00:46:46 -04:00
< option style = " background: #ffffff "
value = " trackid " < ? php if ( $what == 'trackid' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['trackID']; ?></option>
2014-12-29 00:05:36 -05:00
< ? php
2015-09-12 00:46:46 -04:00
if ( $hesk_settings [ 'sequential' ]) {
2014-12-29 00:05:36 -05:00
?>
2015-09-12 00:46:46 -04:00
< option style = " background: #ffffff "
value = " seqid " < ? php if ( $what == 'seqid' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['seqid']; ?></option>
< ? php
2014-12-29 00:05:36 -05:00
}
?>
2015-09-12 00:46:46 -04:00
< option style = " background: #ffffff " value = " name " < ? php if ( $what == 'name' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['name']; ?></option>
< option style = " background: #ffffff " value = " email " < ? php if ( $what == 'email' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['email']; ?></option>
< option style = " background: #ffffff "
value = " subject " < ? php if ( $what == 'subject' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['subject']; ?></option>
< option style = " background: #ffffff "
value = " message " < ? php if ( $what == 'message' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['message']; ?></option>
2014-12-29 00:05:36 -05:00
< ? php
2015-09-12 00:46:46 -04:00
foreach ( $hesk_settings [ 'custom_fields' ] as $k => $v ) {
2014-12-29 00:05:36 -05:00
$selected = ( $what == $k ) ? 'selected="selected"' : '' ;
2015-09-12 00:46:46 -04:00
if ( $v [ 'use' ]) {
if ( $modsForHesk_settings [ 'custom_field_setting' ]) {
2014-12-29 00:11:32 -05:00
$v [ 'name' ] = $hesklang [ $v [ 'name' ]];
}
2015-09-12 00:46:46 -04:00
$v [ 'name' ] = ( strlen ( $v [ 'name' ]) > 30 ) ? substr ( $v [ 'name' ], 0 , 30 ) . '...' : $v [ 'name' ];
echo '<option style="background: #ffffff" value="' . $k . '" ' . $selected . '>' . $v [ 'name' ] . '</option>' ;
2014-12-29 00:05:36 -05:00
}
}
?>
2015-09-12 00:46:46 -04:00
< option style = " background: #ffffff " value = " notes " < ? php if ( $what == 'notes' ) {
echo 'selected="selected"' ;
} ?> ><?php echo $hesklang['notes']; ?></option>
2014-12-29 00:05:36 -05:00
</ select >
</ td >
</ tr >
</ table >
2014-03-23 16:03:30 -04:00
2015-09-12 00:46:46 -04:00
< div id = " topSubmit2 " style = " display:<?php echo $more2 ? 'none' : 'block'; ?> " >
2015-01-19 00:13:49 -05:00
< div class = " btn-group " >
2015-09-12 00:46:46 -04:00
< input class = " btn btn-default " type = " submit "
value = " <?php echo $hesklang['find_ticket'] ; ?> " />
< a class = " btn btn-default " href = " javascript:void(0) "
onclick = " Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='1'; " >< ? php echo $hesklang [ 'mopt' ]; ?> </a>
2015-01-19 00:13:49 -05:00
</ div >
2014-12-29 00:05:36 -05:00
</ div >
2015-09-12 00:46:46 -04:00
< div id = " divShow2 " style = " display:<?php echo $more2 ? 'block' : 'none'; ?> " >
2014-12-29 00:05:36 -05:00
2015-09-12 00:46:46 -04:00
& nbsp ; < br />
2014-12-29 00:05:36 -05:00
< table class = " table table-striped " border = " 0 " cellpadding = " 3 " cellspacing = " 0 " width = " 100% " >
< tr >
2015-09-12 00:46:46 -04:00
< td class = " alignMiddle " width = " 20% " >< b >< ? php echo $hesklang [ 'category' ]; ?> </b>:
& nbsp ; </ td >
2014-12-29 00:05:36 -05:00
< td class = " alignMiddle " width = " 80% " >
< select class = " form-control " name = " category " >
2015-09-12 00:46:46 -04:00
< option value = " 0 " >< ? php echo $hesklang [ 'any_cat' ]; ?> </option>
2014-12-29 00:05:36 -05:00
< ? php echo $category_options ; ?>
</ select >
</ td >
</ tr >
2015-01-12 21:00:11 -05:00
< ? php
2015-09-12 00:46:46 -04:00
if ( $can_view_ass_others ) {
2015-01-12 21:00:11 -05:00
?>
< tr >
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'owner' ]; ?> </b>: </td>
< td class = " alignMiddle " >
2015-01-19 00:13:49 -05:00
< select class = " form-control " name = " owner " >
2015-09-12 00:46:46 -04:00
< option value = " 0 " >< ? php echo $hesklang [ 'anyown' ]; ?> </option>
2015-01-12 21:00:11 -05:00
< ? php
2015-09-12 00:46:46 -04:00
foreach ( $admins as $staff_id => $staff_name ) {
echo '<option value="' . $staff_id . '" ' . ( $owner_input == $staff_id ? 'selected="selected"' : '' ) . '>' . $staff_name . '</option>' ;
2015-01-12 21:00:11 -05:00
}
?>
</ select >
</ td >
</ tr >
2015-09-12 00:46:46 -04:00
< ? php
2015-01-12 21:00:11 -05:00
}
?>
2014-12-29 00:05:36 -05:00
< tr >
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'date' ]; ?> </b>: </td>
< td class = " alignMiddle " >
2015-09-12 00:46:46 -04:00
< div class = " col-md-3 " style = " padding-left: 0px " >< input class = " form-control tcal "
type = " text " name = " dt "
id = " dt "
size = " 10 " < ? php if ( $date_input ) {
echo 'value="' . $date_input . '"' ;
} ?> /></div>
2014-12-29 00:05:36 -05:00
</ td >
</ tr >
< tr >
< td class = " alignTop " >< b >< ? php echo $hesklang [ 's_incl' ]; ?> </b>: </td>
< td >
2015-09-12 00:46:46 -04:00
< label >< input type = " checkbox " name = " s_my "
value = " 1 " < ? php if ( $s_my [ 2 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_my']; ?>
</ label >
2014-12-29 00:05:36 -05:00
< ? php
2015-09-12 00:46:46 -04:00
if ( $can_view_ass_others ) {
2014-12-29 00:05:36 -05:00
?>
2015-09-12 00:46:46 -04:00
< br />
< label >< input type = " checkbox " name = " s_ot "
value = " 1 " < ? php if ( $s_ot [ 2 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_ot']; ?>
</ label >
< ? php
2014-12-29 00:05:36 -05:00
}
2014-03-23 16:03:30 -04:00
2015-09-12 00:46:46 -04:00
if ( $can_view_unassigned ) {
2014-12-29 00:05:36 -05:00
?>
2015-09-12 00:46:46 -04:00
< br />
< label >< input type = " checkbox " name = " s_un "
value = " 1 " < ? php if ( $s_un [ 2 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_un']; ?>
</ label >
< ? php
2014-12-29 00:05:36 -05:00
}
?>
2015-09-12 00:46:46 -04:00
< br />
< label >< input type = " checkbox " name = " archive "
value = " 1 " < ? php if ( $archive [ 2 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['disp_only_archived']; ?>
</ label >
2014-12-29 00:05:36 -05:00
</ td >
</ tr >
< tr >
< td >< b >< ? php echo $hesklang [ 'display' ]; ?> </b>: </td>
2015-09-12 00:46:46 -04:00
< td >
< div class = " col-md-2 text-right " style = " padding-left: 0px; padding-right: 0px; " >
< input class = " form-control " type = " text " name = " limit "
value = " <?php echo $maxresults ; ?> " size = " 4 " /></ div >
< div class = " col-md-10 "
style = " line-height: 40px " >< ? php echo $hesklang [ 'results_page' ]; ?> </div>
</ td >
2014-12-29 00:05:36 -05:00
</ tr >
</ table >
2015-01-19 00:13:49 -05:00
< div class = " btn-group " >
2015-09-12 00:46:46 -04:00
< input class = " btn btn-default " type = " submit "
value = " <?php echo $hesklang['find_ticket'] ; ?> " />
< a class = " btn btn-default " href = " javascript:void(0) "
onclick = " Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='0'; " >< ? php echo $hesklang [ 'lopt' ]; ?> </a>
2015-01-19 00:13:49 -05:00
</ div >
2015-09-12 00:46:46 -04:00
< input type = " hidden " name = " more2 " value = " <?php echo $more2 ? 1 : 0; ?> " />
2014-12-29 00:05:36 -05:00
</ div >
</ form >
</ td >
</ tr >
</ table >
</ div >
2014-09-06 22:19:59 -04:00
</ div >
2014-03-23 16:03:30 -04:00
<!-- ** END SEARCH TICKETS FORM ** -->