|
|
|
@ -207,200 +207,199 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
|
|
|
|
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
|
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
<div class="enclosingDashboard">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div align="left" class="col-md-4">
|
|
|
|
|
<div class="moreToLeft">
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
|
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="summaryList">
|
|
|
|
|
<div class="viewTicketSidebar">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6 col-xs-12">
|
|
|
|
|
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6 col-xs-12">
|
|
|
|
|
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div align="left" class="col-md-4">
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6 col-xs-12">
|
|
|
|
|
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6 col-xs-12">
|
|
|
|
|
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-7">
|
|
|
|
|
<?php
|
|
|
|
|
/* This will handle error, success and notice messages */
|
|
|
|
|
hesk_handle_messages();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* If the ticket has been reopened by customer:
|
|
|
|
|
* - show the "Add a reply" form on top
|
|
|
|
|
* - and ask them why the form has been reopened
|
|
|
|
|
*/
|
|
|
|
|
if (isset($_SESSION['force_form_top']))
|
|
|
|
|
{
|
|
|
|
|
hesk_printCustomerReplyForm(1);
|
|
|
|
|
echo ' <p> </p> ';
|
|
|
|
|
|
|
|
|
|
unset($_SESSION['force_form_top']);
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<h3 align="left"><?php echo $hesklang['view_ticket']; ?>: <?php
|
|
|
|
|
if ($hesk_settings['sequential'])
|
|
|
|
|
{
|
|
|
|
|
echo $trackingID.' ('.$hesklang['seqid'].': '.$ticket['id'].')';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
echo $trackingID;
|
|
|
|
|
}
|
|
|
|
|
?></h3>
|
|
|
|
|
<div class="footerWithBorder"></div>
|
|
|
|
|
<div class="blankSpace"></div>
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="20" style="border-bottom: 0px;">
|
|
|
|
|
<h2><?php echo $ticket['subject']; ?></h2>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="10" style="border-width: 0px">
|
|
|
|
|
<p><?php echo $hesklang['created_on']; ?>: <?php echo hesk_date($ticket['dt'], true); ?> <?php echo $hesklang['last_update']; ?>: <?php echo hesk_date($ticket['lastchange'], true); ?></p>
|
|
|
|
|
</td>
|
|
|
|
|
<td colspan="10" style="border-width: 0px; text-align: right;">
|
|
|
|
|
<p><?php $random=rand(10000,99999);
|
|
|
|
|
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=2&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
|
|
|
|
|
else {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="medLowPriority">
|
|
|
|
|
|
|
|
|
|
<?php //This entire conditional is all just for priority
|
|
|
|
|
if ($hesk_settings['cust_urgency'])
|
|
|
|
|
{
|
|
|
|
|
$hesk_settings['ticketColumnWidth'] = 4;
|
|
|
|
|
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'" ';
|
|
|
|
|
if ($ticket['priority'] == 0) {echo 'class="criticalPriority">';}
|
|
|
|
|
elseif ($ticket['priority'] == 1) {echo 'class="highPriority">';}
|
|
|
|
|
else {echo 'class="medLowPriority">';}
|
|
|
|
|
|
|
|
|
|
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
|
|
|
|
|
|
|
|
|
|
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
|
|
|
|
|
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
|
|
|
|
|
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
|
|
|
|
|
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
|
|
|
|
|
echo '</td>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$hesk_settings['ticketColumnWidth'] = 5;
|
|
|
|
|
}
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
|
|
|
|
|
$ticketStatusKey = $ticket['statusKey'];
|
|
|
|
|
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatusKey].'</p>';
|
|
|
|
|
echo '</td>';
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['last_replier'].'</p>
|
|
|
|
|
<p class="ticketPropertyText">'.$ticket['repliername'].'</p></td>';
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
|
|
|
|
|
<p class="ticketPropertyText">'.$category['name'].'</p></td>';
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['replies'].'</p>
|
|
|
|
|
<p class="ticketPropertyText">'.$replies.'</p></td>';
|
|
|
|
|
?>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<!-- REPLIES -->
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if ($hesk_settings['new_top'])
|
|
|
|
|
{
|
|
|
|
|
$i = hesk_printCustomerTicketReplies() ? 0 : 1;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-8">
|
|
|
|
|
<?php
|
|
|
|
|
/* This will handle error, success and notice messages */
|
|
|
|
|
hesk_handle_messages();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* If the ticket has been reopened by customer:
|
|
|
|
|
* - show the "Add a reply" form on top
|
|
|
|
|
* - and ask them why the form has been reopened
|
|
|
|
|
*/
|
|
|
|
|
if (isset($_SESSION['force_form_top']))
|
|
|
|
|
{
|
|
|
|
|
$i = 1;
|
|
|
|
|
hesk_printCustomerReplyForm(1);
|
|
|
|
|
echo ' <p> </p> ';
|
|
|
|
|
|
|
|
|
|
unset($_SESSION['force_form_top']);
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<h3 align="left"><?php echo $hesklang['view_ticket']; ?>: <?php
|
|
|
|
|
if ($hesk_settings['sequential'])
|
|
|
|
|
{
|
|
|
|
|
echo $trackingID.' ('.$hesklang['seqid'].': '.$ticket['id'].')';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
echo $trackingID;
|
|
|
|
|
}
|
|
|
|
|
?></h3>
|
|
|
|
|
<div class="footerWithBorder"></div>
|
|
|
|
|
<div class="blankSpace"></div>
|
|
|
|
|
<div class="table-bordered">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<h2><?php echo $ticket['subject']; ?></h2>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6 col-sm-12">
|
|
|
|
|
<p><?php echo $hesklang['created_on']; ?>: <?php echo hesk_date($ticket['dt'], true); ?> <?php echo $hesklang['last_update']; ?>: <?php echo hesk_date($ticket['lastchange'], true); ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-2 col-md-offset-4 col-sm-12" style="text-align: right">
|
|
|
|
|
<p><?php $random=rand(10000,99999);
|
|
|
|
|
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=2&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
|
|
|
|
|
else {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="medLowPriority">
|
|
|
|
|
|
|
|
|
|
/* Make sure original message is in correct color if newest are on top */
|
|
|
|
|
$color = 'class="ticketMessageContainer"';
|
|
|
|
|
?>
|
|
|
|
|
<div class="row ticketMessageContainer">
|
|
|
|
|
<div class="col-md-3 col-xs-12">
|
|
|
|
|
<div class="ticketName"><?php echo $ticket['name']; ?></div>
|
|
|
|
|
<div class="ticketEmail"><?php echo $ticket['email']; ?></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-9 col-xs-12 pushMarginLeft">
|
|
|
|
|
<div class="ticketMessageTop withBorder">
|
|
|
|
|
<!-- Date and Action buttons -->
|
|
|
|
|
<p><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt'], true); ?><span style="float: right"><?php echo hesk_getCustomerButtons($i); ?></span></p>
|
|
|
|
|
<!-- Custom Fields Before Message -->
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
|
|
|
|
{
|
|
|
|
|
if ($v['use'] && $v['place']==0)
|
|
|
|
|
{
|
|
|
|
|
echo '
|
|
|
|
|
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ticketMessageBottom">
|
|
|
|
|
<!-- Message -->
|
|
|
|
|
<p><b><?php echo $hesklang['message']; ?>:</b></p>
|
|
|
|
|
<p class="message"><?php echo $ticket['message']; ?><br /> </p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ticketMessageTop">
|
|
|
|
|
<!-- Custom Fields after Message -->
|
|
|
|
|
<?php
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<tr class="medLowPriority">
|
|
|
|
|
|
|
|
|
|
<?php //This entire conditional is all just for priority
|
|
|
|
|
if ($hesk_settings['cust_urgency'])
|
|
|
|
|
{
|
|
|
|
|
$hesk_settings['ticketColumnWidth'] = 4;
|
|
|
|
|
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'" ';
|
|
|
|
|
if ($ticket['priority'] == 0) {echo 'class="criticalPriority">';}
|
|
|
|
|
elseif ($ticket['priority'] == 1) {echo 'class="highPriority">';}
|
|
|
|
|
else {echo 'class="medLowPriority">';}
|
|
|
|
|
|
|
|
|
|
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
|
|
|
|
|
|
|
|
|
|
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
|
|
|
|
|
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
|
|
|
|
|
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
|
|
|
|
|
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
|
|
|
|
|
echo '</td>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$hesk_settings['ticketColumnWidth'] = 5;
|
|
|
|
|
}
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
|
|
|
|
|
$ticketStatusKey = $ticket['statusKey'];
|
|
|
|
|
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatusKey].'</p>';
|
|
|
|
|
echo '</td>';
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['last_replier'].'</p>
|
|
|
|
|
<p class="ticketPropertyText">'.$ticket['repliername'].'</p></td>';
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
|
|
|
|
|
<p class="ticketPropertyText">'.$category['name'].'</p></td>';
|
|
|
|
|
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['replies'].'</p>
|
|
|
|
|
<p class="ticketPropertyText">'.$replies.'</p></td>';
|
|
|
|
|
?>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<!-- REPLIES -->
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if ($hesk_settings['new_top'])
|
|
|
|
|
{
|
|
|
|
|
$i = hesk_printCustomerTicketReplies() ? 0 : 1;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$i = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make sure original message is in correct color if newest are on top */
|
|
|
|
|
$color = 'class="ticketMessageContainer"';
|
|
|
|
|
?>
|
|
|
|
|
<div class="row ticketMessageContainer">
|
|
|
|
|
<div class="col-md-3 col-xs-12">
|
|
|
|
|
<div class="ticketName"><?php echo $ticket['name']; ?></div>
|
|
|
|
|
<div class="ticketEmail"><?php echo $ticket['email']; ?></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-9 col-xs-12 pushMarginLeft">
|
|
|
|
|
<div class="ticketMessageTop withBorder">
|
|
|
|
|
<!-- Date and Action buttons -->
|
|
|
|
|
<p><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt'], true); ?><span style="float: right"><?php echo hesk_getCustomerButtons($i); ?></span></p>
|
|
|
|
|
<!-- Custom Fields Before Message -->
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
|
|
|
|
{
|
|
|
|
|
if ($v['use'] && $v['place'])
|
|
|
|
|
if ($v['use'] && $v['place']==0)
|
|
|
|
|
{
|
|
|
|
|
echo '
|
|
|
|
|
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* Attachments */
|
|
|
|
|
hesk_listAttachments($ticket['attachments'], $i);
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ticketMessageBottom">
|
|
|
|
|
<!-- Message -->
|
|
|
|
|
<p><b><?php echo $hesklang['message']; ?>:</b></p>
|
|
|
|
|
<p class="message"><?php echo $ticket['message']; ?><br /> </p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ticketMessageTop">
|
|
|
|
|
<!-- Custom Fields after Message -->
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
|
|
|
|
{
|
|
|
|
|
if ($v['use'] && $v['place'])
|
|
|
|
|
{
|
|
|
|
|
echo '
|
|
|
|
|
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* Attachments */
|
|
|
|
|
hesk_listAttachments($ticket['attachments'], $i);
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
if ( ! $hesk_settings['new_top'])
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
if ( ! $hesk_settings['new_top'])
|
|
|
|
|
{
|
|
|
|
|
hesk_printCustomerTicketReplies();
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<!-- END REPLIES -->
|
|
|
|
|
<?php
|
|
|
|
|
// Print "Submit a reply" form?
|
|
|
|
|
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && $hesk_settings['reply_top'] == 1)
|
|
|
|
|
{
|
|
|
|
|
hesk_printCustomerTicketReplies();
|
|
|
|
|
hesk_printCustomerReplyForm();
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<!-- END REPLIES -->
|
|
|
|
|
<?php
|
|
|
|
|
// Print "Submit a reply" form?
|
|
|
|
|
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && $hesk_settings['reply_top'] == 1)
|
|
|
|
|
{
|
|
|
|
|
hesk_printCustomerReplyForm();
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
/* Print "Submit a reply" form? */
|
|
|
|
|
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && ! $hesk_settings['reply_top'])
|
|
|
|
|
{
|
|
|
|
|
hesk_printCustomerReplyForm();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* If needed update unread replies as read for staff to know */
|
|
|
|
|
if ( count($unread_replies) )
|
|
|
|
|
{
|
|
|
|
|
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `read` = '1' WHERE `id` IN ('".implode("','", $unread_replies)."')");
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div> <!-- End col-md-7 -->
|
|
|
|
|
</div> <!-- End row -->
|
|
|
|
|
</div> <!-- End enclosingDashboard-->
|
|
|
|
|
<?php
|
|
|
|
|
/* Print "Submit a reply" form? */
|
|
|
|
|
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && ! $hesk_settings['reply_top'])
|
|
|
|
|
{
|
|
|
|
|
hesk_printCustomerReplyForm();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* If needed update unread replies as read for staff to know */
|
|
|
|
|
if ( count($unread_replies) )
|
|
|
|
|
{
|
|
|
|
|
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `read` = '1' WHERE `id` IN ('".implode("','", $unread_replies)."')");
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div> <!-- End col-md-7 -->
|
|
|
|
|
</div> <!-- End row -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|