|
|
@ -916,7 +916,24 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
</h1>
|
|
|
|
</h1>
|
|
|
|
<div class="pull-right">
|
|
|
|
<div class="pull-right">
|
|
|
|
<?php echo hesk_getAdminButtons($category['id']); ?>
|
|
|
|
<?php echo hesk_getAdminButtons($category['id']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only output JavaScript if we have coordinates
|
|
|
|
|
|
|
|
if (strpos($ticket['latitude'], 'E') === false):
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
var latitude = '';
|
|
|
|
|
|
|
|
latitude = <?php echo $ticket['latitude'] != '' ? $ticket['latitude'] : -1; ?>;
|
|
|
|
|
|
|
|
var longitude = '';
|
|
|
|
|
|
|
|
longitude = <?php echo $ticket['longitude'] != '' ? $ticket['longitude'] : -1; ?>;
|
|
|
|
|
|
|
|
$('#more-modal').on('shown.bs.modal', function() {
|
|
|
|
|
|
|
|
initializeMapForStaff(latitude, longitude, "<?php echo $hesklang['users_location']; ?>");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="table-bordered status-row">
|
|
|
|
<div class="table-bordered status-row">
|
|
|
@ -1298,7 +1315,6 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$dropdown = '
|
|
|
|
$dropdown = '
|
|
|
|
<div class="btn-group">
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#more-modal">
|
|
|
|
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#more-modal">
|
|
|
|
<i class="fa fa-ellipsis-h"></i> ' . hesk_htmlspecialchars($hesklang['more']) . '
|
|
|
|
<i class="fa fa-ellipsis-h"></i> ' . hesk_htmlspecialchars($hesklang['more']) . '
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
@ -1315,8 +1331,6 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
';
|
|
|
|
';
|
|
|
|
|
|
|
|
|
|
|
|
// Location and UA
|
|
|
|
// Location and UA
|
|
|
|
$has_location_or_user_agent = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($modsForHesk_settings['display_user_agent_information']
|
|
|
|
if ($modsForHesk_settings['display_user_agent_information']
|
|
|
|
&& $ticket['user_agent'] !== NULL
|
|
|
|
&& $ticket['user_agent'] !== NULL
|
|
|
|
&& $ticket['screen_resolution_height'] !== NULL
|
|
|
|
&& $ticket['screen_resolution_height'] !== NULL
|
|
|
@ -1324,22 +1338,14 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
&& $ticket['screen_resolution_width'] !== NULL
|
|
|
|
&& $ticket['screen_resolution_width'] !== NULL
|
|
|
|
&& $ticket['screen_resolution_width'] != 0
|
|
|
|
&& $ticket['screen_resolution_width'] != 0
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
$has_location_or_user_agent = true;
|
|
|
|
|
|
|
|
$dropdown .=
|
|
|
|
$dropdown .=
|
|
|
|
'<div class="panel panel-default">
|
|
|
|
'<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 style="text-transform: capitalize"><i class="fa fa-desktop fa-fw fa-2x"></i> '.$hesklang['device_information'].'</h4>
|
|
|
|
<h4 style="text-transform: capitalize"><i class="fa fa-desktop fa-fw"></i> '.$hesklang['device_information'].'</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-xs-12">
|
|
|
|
|
|
|
|
'.buildUserAgentBody($ticket['user_agent'], $ticket['screen_resolution_width'], $ticket['screen_resolution_height']).'
|
|
|
|
'.buildUserAgentBody($ticket['user_agent'], $ticket['screen_resolution_width'], $ticket['screen_resolution_height']).'
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>';
|
|
|
|
</div>';
|
|
|
|
} else if ($modsForHesk_settings['display_user_agent_information']) {
|
|
|
|
} else if ($modsForHesk_settings['display_user_agent_information']) {
|
|
|
|
$has_location_or_user_agent = true;
|
|
|
|
|
|
|
|
$dropdown .=
|
|
|
|
$dropdown .=
|
|
|
|
'<div class="panel panel-default">
|
|
|
|
'<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="panel-heading">
|
|
|
@ -1358,7 +1364,6 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
if ($modsForHesk_settings['request_location']) {
|
|
|
|
if ($modsForHesk_settings['request_location']) {
|
|
|
|
$hasLocation = true;
|
|
|
|
$hasLocation = true;
|
|
|
|
$has_location_or_user_agent = true;
|
|
|
|
|
|
|
|
if (strpos($ticket['latitude'], 'E') === false) {
|
|
|
|
if (strpos($ticket['latitude'], 'E') === false) {
|
|
|
|
$locationText = $hesklang['click_for_map'];
|
|
|
|
$locationText = $hesklang['click_for_map'];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1368,10 +1373,9 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
$dropdown .= '<div class="panel panel-default">
|
|
|
|
$dropdown .= '<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4><i class="fa fa-map-marker fa-fw"></i> ' . $locationText . '</h4>
|
|
|
|
<h4><i class="fa fa-map-marker fa-fw"></i> ' . $locationText . '</h4>
|
|
|
|
</div>
|
|
|
|
</div>';
|
|
|
|
<div class="panel-body">';
|
|
|
|
|
|
|
|
if ($hasLocation):
|
|
|
|
if ($hasLocation):
|
|
|
|
$dropdown .= '<div id="map" style="height: 500px"></div><br>
|
|
|
|
$dropdown .= '<div id="map" style="height: 500px"></div><br><div class="panel-body">
|
|
|
|
<address id="friendly-location" style="font-size: 13px"></address>
|
|
|
|
<address id="friendly-location" style="font-size: 13px"></address>
|
|
|
|
<p id="save-for-address"
|
|
|
|
<p id="save-for-address"
|
|
|
|
style="font-size: 13px;display:none">' . $hesklang['save_to_see_updated_address'] . '</p>
|
|
|
|
style="font-size: 13px;display:none">' . $hesklang['save_to_see_updated_address'] . '</p>
|
|
|
@ -1391,47 +1395,38 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
value="'. $ticket['longitude'] . '">
|
|
|
|
value="'. $ticket['longitude'] . '">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="btn-group" style="display:none" id="save-group">
|
|
|
|
<div class="btn-group" style="display: none" id="save-group">
|
|
|
|
<input type="submit" class="btn btn-success"
|
|
|
|
<input type="submit" class="btn btn-success"
|
|
|
|
value="'. $hesklang['save_location'] . '">
|
|
|
|
value="'. $hesklang['save_location'] . '">
|
|
|
|
<button class="btn btn-default" data-dismiss="modal"
|
|
|
|
<button type="button" class="btn btn-default" onclick="closeAndReset('. $ticket['latitude'] . ', '. $ticket['longitude'] . ')">' . $hesklang['reset'] . '</button>
|
|
|
|
onclick="closeAndReset('. $ticket['latitude'] . ', '. $ticket['longitude'] . ')">
|
|
|
|
|
|
|
|
'. $hesklang['close_modal_without_saving'] . '
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
|
|
|
<button id="close-button" class="btn btn-default"
|
|
|
|
|
|
|
|
data-dismiss="modal">'. $hesklang['close_modal'] . '</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>';
|
|
|
|
</div>';
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
$dropdown .= '<div class="panel-body">';
|
|
|
|
$errorCode = explode('-', $ticket['latitude']);
|
|
|
|
$errorCode = explode('-', $ticket['latitude']);
|
|
|
|
$key = 'location_unavailable_' . $errorCode[1];
|
|
|
|
$key = 'location_unavailable_' . $errorCode[1];
|
|
|
|
$dropdown .= '<h5>' . $hesklang[$key] . '</h5>';
|
|
|
|
$dropdown .= '<h5>' . $hesklang[$key] . '</h5>';
|
|
|
|
endif;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
|
|
|
|
$dropdown .= '</div>
|
|
|
|
$dropdown .= '</div></div>';
|
|
|
|
</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only output JavaScript if we have coordinates
|
|
|
|
|
|
|
|
if (strpos($ticket['latitude'], 'E') === false):
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
var latitude = '';
|
|
|
|
|
|
|
|
latitude = <?php echo $ticket['latitude'] != '' ? $ticket['latitude'] : -1; ?>;
|
|
|
|
|
|
|
|
var longitude = '';
|
|
|
|
|
|
|
|
longitude = <?php echo $ticket['longitude'] != '' ? $ticket['longitude'] : -1; ?>;
|
|
|
|
|
|
|
|
initializeMapForStaff(latitude, longitude, "<?php echo $hesklang['users_location']; ?>");
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$dropdown .= '<div class="row">';
|
|
|
|
|
|
|
|
|
|
|
|
/* Lock ticket button */
|
|
|
|
/* Lock ticket button */
|
|
|
|
if ($can_resolve) {
|
|
|
|
if ($can_resolve) {
|
|
|
|
$template = '<li><a href="lock.php?track=' . $trackingID . '&locked=%s&Refresh=' . mt_rand(10000, 99999) . '&token=' . hesk_token_echo(0) . '"><i class="fa fa-%s fa-fw"></i> %s</a></li>';
|
|
|
|
$template =
|
|
|
|
|
|
|
|
'<div class="col-md-6 col-sm-12"><a class="button-link" href="lock.php?track=' . $trackingID . '&locked=%s&Refresh=' . mt_rand(10000, 99999) . '&token=' . hesk_token_echo(0) . '">
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<h4>
|
|
|
|
|
|
|
|
<i class="fa fa-%s fa-fw"></i> %s
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</a></div>';
|
|
|
|
$dropdown .= $ticket['locked']
|
|
|
|
$dropdown .= $ticket['locked']
|
|
|
|
? sprintf($template, 0, 'unlock', $hesklang['tul'])
|
|
|
|
? sprintf($template, 0, 'unlock', $hesklang['tul'])
|
|
|
|
: sprintf($template, 1, 'lock', $hesklang['tlo']);
|
|
|
|
: sprintf($template, 1, 'lock', $hesklang['tlo']);
|
|
|
@ -1439,7 +1434,16 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
|
|
|
|
|
|
|
|
/* Tag ticket button */
|
|
|
|
/* Tag ticket button */
|
|
|
|
if ($can_archive) {
|
|
|
|
if ($can_archive) {
|
|
|
|
$template = '<li><a href="archive.php?track=' . $trackingID . '&archived=%s&Refresh=' . mt_rand(10000, 99999) . '&token=' . hesk_token_echo(0) . '"><i class="fa fa-tag fa-fw"></i> %s</a></li>';
|
|
|
|
$template =
|
|
|
|
|
|
|
|
'<div class="col-md-6 col-sm-12"><a class="button-link" href="archive.php?track=' . $trackingID . '&archived=%s&Refresh=' . mt_rand(10000, 99999) . '&token=' . hesk_token_echo(0) . '">
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<h4>
|
|
|
|
|
|
|
|
<i class="fa fa-tag fa-fw"></i> %s
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</a></div>';
|
|
|
|
|
|
|
|
|
|
|
|
$dropdown .= $ticket['archive']
|
|
|
|
$dropdown .= $ticket['archive']
|
|
|
|
? sprintf($template, 0, $hesklang['remove_archive'])
|
|
|
|
? sprintf($template, 0, $hesklang['remove_archive'])
|
|
|
@ -1448,7 +1452,16 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
|
|
|
|
|
|
|
|
/* Import to knowledgebase button */
|
|
|
|
/* Import to knowledgebase button */
|
|
|
|
if ($hesk_settings['kb_enable'] && hesk_checkPermission('can_man_kb', 0)) {
|
|
|
|
if ($hesk_settings['kb_enable'] && hesk_checkPermission('can_man_kb', 0)) {
|
|
|
|
$dropdown .= '<li><a href="manage_knowledgebase.php?a=import_article&track=' . $trackingID . '"><i class="fa fa-lightbulb-o fa-fw"></i> ' . $hesklang['import_kb'] . '</a></li>';
|
|
|
|
$dropdown .=
|
|
|
|
|
|
|
|
'<div class="col-md-6 col-sm-12"><a href="manage_knowledgebase.php?a=import_article&track=' . $trackingID . '" class="button-link">
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<h4>
|
|
|
|
|
|
|
|
<i class="fa fa-lightbulb-o fa-fw"></i> ' . $hesklang['import_kb'] . '
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</a></div>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Delete ticket */
|
|
|
|
/* Delete ticket */
|
|
|
@ -1462,7 +1475,16 @@ function hesk_getAdminButtons($category_id)
|
|
|
|
$tmp = 'delete_ticket=1';
|
|
|
|
$tmp = 'delete_ticket=1';
|
|
|
|
$txt = $hesklang['dele'];
|
|
|
|
$txt = $hesklang['dele'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$dropdown .= '<li><a href="' . $url . '?track=' . $trackingID . '&' . $tmp . '&Refresh=' . mt_rand(10000, 99999) . '&token=' . hesk_token_echo(0) . '" onclick="return hesk_confirmExecute(\'' . hesk_makeJsString($txt) . '?\');"><i class="fa fa-fw fa-times"></i> ' . $txt . '</a></li>';
|
|
|
|
$dropdown .=
|
|
|
|
|
|
|
|
'<div class="col-md-6 col-sm-12"><a class="button-link" href="' . $url . '?track=' . $trackingID . '&' . $tmp . '&Refresh=' . mt_rand(10000, 99999) . '&token=' . hesk_token_echo(0) . '" onclick="return hesk_confirmExecute(\'' . hesk_makeJsString($txt) . '?\');">
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
|
|
|
<div class="panel-body danger">
|
|
|
|
|
|
|
|
<h4>
|
|
|
|
|
|
|
|
<i class="fa fa-fw fa-times"></i> ' . $txt . '
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</a></div>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$dropdown .= '</div></div></div></div></div> ';
|
|
|
|
$dropdown .= '</div></div></div></div></div> ';
|
|
|
|
$options .= $dropdown;
|
|
|
|
$options .= $dropdown;
|
|
|
@ -2141,7 +2163,7 @@ function hesk_printCanned()
|
|
|
|
function buildUserAgentBody($user_agent, $width, $height) {
|
|
|
|
function buildUserAgentBody($user_agent, $width, $height) {
|
|
|
|
global $hesklang;
|
|
|
|
global $hesklang;
|
|
|
|
|
|
|
|
|
|
|
|
echo '
|
|
|
|
return '
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
var userAgent = platform.parse(\'' . addslashes($user_agent) . '\');
|
|
|
|
var userAgent = platform.parse(\'' . addslashes($user_agent) . '\');
|
|
|
|
console.log(userAgent);
|
|
|
|
console.log(userAgent);
|
|
|
|