2014-03-23 16:03:30 -04:00
< ? php
/*******************************************************************************
2014-12-29 00:05:36 -05:00
* Title : Help Desk Software HESK
2015-06-23 23:33:03 -04:00
* Version : 2.6 . 4 from 22 nd June 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 */
2014-06-19 23:32:23 -04:00
if ( ! defined ( 'IN_SCRIPT' )) { die ( 'Invalid attempt' );}
2014-03-23 16:03:30 -04:00
if ( ! isset ( $status ) )
{
2014-06-19 23:32:23 -04:00
$status = array ();
//-- We don't want to check statuses that are considered "closed"
2015-07-28 13:00:26 -04:00
$statusRS = hesk_dbQuery ( 'SELECT `ID` FROM `' . hesk_dbEscape ( $hesk_settings [ 'db_pfix' ]) . 'statuses` WHERE `IsClosed` = 0' );
2014-06-19 23:32:23 -04:00
while ( $row = $statusRS -> fetch_assoc ())
{
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
}
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
}
if ( ! isset ( $what ) )
{
2014-12-29 00:05:36 -05:00
$what = 'trackid' ;
2014-03-23 16:03:30 -04:00
}
2015-01-12 21:00:11 -05:00
if ( ! isset ( $owner_input ) )
{
$owner_input = 0 ;
}
2014-03-23 16:03:30 -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? */
$can_view_ass_others = hesk_checkPermission ( 'can_view_ass_others' , 0 );
$can_view_unassigned = hesk_checkPermission ( 'can_view_unassigned' , 0 );
/* Category options */
$category_options = '' ;
if ( isset ( $hesk_settings [ 'categories' ]) && count ( $hesk_settings [ 'categories' ]) )
{
2014-12-29 00:05:36 -05:00
foreach ( $hesk_settings [ 'categories' ] as $row [ 'id' ] => $row [ 'name' ])
{
$row [ 'name' ] = ( strlen ( $row [ 'name' ]) > 30 ) ? substr ( $row [ 'name' ], 0 , 30 ) . '...' : $row [ 'name' ];
$selected = ( $row [ 'id' ] == $category ) ? 'selected="selected"' : '' ;
$category_options .= '<option value="' . $row [ 'id' ] . '" ' . $selected . '>' . $row [ 'name' ] . '</option>' ;
}
2014-03-23 16:03:30 -04:00
}
else
{
2014-12-29 00:05:36 -05:00
$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' ];
$selected = ( $row [ 'id' ] == $category ) ? 'selected="selected"' : '' ;
$category_options .= '<option value="' . $row [ 'id' ] . '" ' . $selected . '>' . $row [ 'name' ] . '</option>' ;
}
2014-03-23 16:03:30 -04:00
}
2015-01-12 21:00:11 -05:00
/* List of staff */
if ( $can_view_ass_others && ! isset ( $admins ) )
{
$admins = array ();
$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' ];
}
}
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 " >
2014-12-29 00:05:36 -05: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
$rowCounter = 1 ;
2015-07-28 13:00:26 -04:00
$statusRS = hesk_dbQuery ( 'SELECT `ID`, `TextColor` FROM `' . hesk_dbEscape ( $hesk_settings [ 'db_pfix' ]) . 'statuses`' );
2015-07-28 22:09:34 -04:00
while ( $row = hesk_dbFetchAssoc ( $statusRS ))
2014-12-29 00:05:36 -05:00
{
if ( $rowCounter > 3 )
{
echo '</tr><tr>' ;
2014-09-06 22:19:59 -04:00
$rowCounter = 1 ;
2014-12-29 00:05:36 -05:00
}
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"' ;}
2015-07-28 13:00:26 -04:00
echo '/> <span style="font-weight: bold;color: ' . $row [ 'TextColor' ] . ';">' . mfh_getDisplayTextForStatusId ( $row [ 'ID' ]) . '</span></label></td>' ;
2014-12-29 00:05:36 -05:00
$rowCounter ++ ;
}
?>
</ tr >
</ table >
</ td >
</ tr >
</ table >
< div id = " topSubmit " style = " display:<?php echo $more ? 'none' : 'block' ; ?> " >
2015-01-19 00:13:49 -05:00
< 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 >
2014-12-29 00:05:36 -05:00
</ div >
< div id = " divShow " style = " display:<?php echo $more ? 'block' : 'none' ; ?> " >
< 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 >
</ td >
</ tr >
< 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 )
2014-09-06 22:19:59 -04:00
{
2014-12-29 00:05:36 -05:00
?>
< 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
2014-09-06 22:19:59 -04:00
}
?>
2014-12-29 00:05:36 -05:00
</ 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 >
</ td >
</ tr >
< 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% " >
2015-01-12 21:00:11 -05:00
< ? php
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 ++ ;
}
}
// 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
</ table >
</ td >
</ tr >
< tr >
2015-01-12 21:00:11 -05:00
< td class = " alignTop " >< b >< ? php echo $hesklang [ 'gb' ]; ?> </b>: </td>
< td >
2014-12-29 00:05:36 -05:00
< 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 >
</ td >
</ tr >
< tr >
2015-01-12 21:00:11 -05:00
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'category' ]; ?> </b>: </td>
< td class = " alignMiddle " >
2014-12-29 00:05:36 -05:00
< 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 >
< tr >
2015-01-12 21:00:11 -05:00
< 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>
2014-12-29 00:05:36 -05:00
</ tr >
< tr >
2015-01-12 21:00:11 -05:00
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'order' ]; ?> </b>: </td>
< td class = " alignMiddle " >
2014-12-29 00:05:36 -05:00
< 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 >
< tr >
2015-01-12 21:00:11 -05:00
< td class = " alignTop " >< b >< ? php echo $hesklang [ 'opt' ]; ?> </b>: </td>
< td >
2014-12-29 00:05:36 -05: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>)
</ td >
</ table >
2015-01-19 00:13:49 -05:00
< 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 ; ?> " />
2014-12-29 00:05:36 -05:00
</ div >
</ form >
2014-09-06 22:19:59 -04:00
</ td >
2014-12-29 00:05:36 -05:00
</ 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 " >
2014-12-29 00:05:36 -05:00
< b style = " color: #000 " >< ? php echo $hesklang [ 's_for' ]; ?> </b><br />
2015-02-05 20:39:49 -05:00
< 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 " >
2014-12-29 00:05:36 -05: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-01-19 00:13:49 -05: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
if ( $hesk_settings [ 'sequential' ])
{
?>
2015-01-19 00:13:49 -05:00
< option style = " background: #ffffff " value = " seqid " < ? php if ( $what == 'seqid' ) { echo 'selected="selected"' ;} ?> ><?php echo $hesklang['seqid']; ?></option>
2014-12-29 00:05:36 -05:00
< ? php
}
?>
2015-01-19 00:13:49 -05: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
foreach ( $hesk_settings [ 'custom_fields' ] as $k => $v )
{
$selected = ( $what == $k ) ? 'selected="selected"' : '' ;
if ( $v [ 'use' ])
{
2014-12-29 00:11:32 -05:00
if ( $modsForHesk_settings [ 'custom_field_setting' ])
{
$v [ 'name' ] = $hesklang [ $v [ 'name' ]];
}
2014-12-29 00:05:36 -05:00
$v [ 'name' ] = ( strlen ( $v [ 'name' ]) > 30 ) ? substr ( $v [ 'name' ], 0 , 30 ) . '...' : $v [ 'name' ];
2015-01-19 00:13:49 -05:00
echo '<option style="background: #ffffff" value="' . $k . '" ' . $selected . '>' . $v [ 'name' ] . '</option>' ;
2014-12-29 00:05:36 -05:00
}
}
?>
2015-01-19 00:13:49 -05: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
2014-12-29 00:05:36 -05:00
< div id = " topSubmit2 " style = " display:<?php echo $more2 ? 'none' : 'block' ; ?> " >
2015-01-19 00:13:49 -05:00
< div class = " btn-group " >
< 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>
</ div >
2014-12-29 00:05:36 -05:00
</ div >
< div id = " divShow2 " style = " display:<?php echo $more2 ? 'block' : 'none' ; ?> " >
& nbsp ; < br />
< table class = " table table-striped " border = " 0 " cellpadding = " 3 " cellspacing = " 0 " width = " 100% " >
< tr >
< td class = " alignMiddle " width = " 20% " >< b >< ? php echo $hesklang [ 'category' ]; ?> </b>: </td>
< td class = " alignMiddle " width = " 80% " >
< select class = " form-control " name = " category " >
< option value = " 0 " >< ? php echo $hesklang [ 'any_cat' ]; ?> </option>
< ? php echo $category_options ; ?>
</ select >
</ td >
</ tr >
2015-01-12 21:00:11 -05:00
< ? php
if ( $can_view_ass_others )
{
?>
< 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-01-12 21:00:11 -05:00
< option value = " 0 " >< ? php echo $hesklang [ 'anyown' ]; ?> </option>
< ? php
2015-02-22 22:16:44 -05:00
foreach ( $admins as $staff_id => $staff_name )
2015-01-12 21:00:11 -05:00
{
2015-02-22 22:16:44 -05:00
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 >
< ? php
}
?>
2014-12-29 00:05:36 -05:00
< tr >
< td class = " alignMiddle " >< b >< ? php echo $hesklang [ 'date' ]; ?> </b>: </td>
< td class = " alignMiddle " >
< 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>
</ td >
</ tr >
< tr >
< td class = " alignTop " >< b >< ? php echo $hesklang [ 's_incl' ]; ?> </b>: </td>
< td >
< label >< input type = " checkbox " name = " s_my " value = " 1 " < ? php if ( $s_my [ 2 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['s_my']; ?></label>
< ? php
if ( $can_view_ass_others )
{
?>
< 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-03-23 16:03:30 -04:00
2014-12-29 00:05:36 -05:00
if ( $can_view_unassigned )
{
?>
< 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
}
?>
< br />
< label >< input type = " checkbox " name = " archive " value = " 1 " < ? php if ( $archive [ 2 ]) echo 'checked="checked"' ; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label>
</ td >
</ tr >
< tr >
< td >< b >< ? php echo $hesklang [ 'display' ]; ?> </b>: </td>
< 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>
</ tr >
</ table >
2015-01-19 00:13:49 -05:00
< div class = " btn-group " >
< 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>
</ div >
< 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 ** -->