Merge pull request #404 from mkoch227/2-5-2

2.5.2 Update
merge-requests/2/head 2.5.2
Mike Koch 9 years ago
commit d6956c9e06

@ -49,6 +49,7 @@ hesk_isLoggedIn();
define('CALENDAR', 1); define('CALENDAR', 1);
define('MAIN_PAGE', 1); define('MAIN_PAGE', 1);
define('PAGE_TITLE', 'ADMIN_HOME');
/* Print header */ /* Print header */
require_once(HESK_PATH . 'inc/headerAdmin.inc.php'); require_once(HESK_PATH . 'inc/headerAdmin.inc.php');

@ -30,7 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_SETTINGS');
define('LOAD_TABS', 1); define('LOAD_TABS', 1);
// Make sure the install folder is deleted // Make sure the install folder is deleted

@ -429,7 +429,7 @@ if (($can_reply || $can_edit) && isset($_POST['childTrackingId'])) {
$mergedTickets = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` WHERE `trackid` = $mergedTickets = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` WHERE `trackid` =
\'' . hesk_dbEscape($trackingID) . '\' AND `merged` LIKE \'%#' . hesk_dbEscape($_POST['childTrackingId']) . '#%\''); \'' . hesk_dbEscape($trackingID) . '\' AND `merged` LIKE \'%#' . hesk_dbEscape($_POST['childTrackingId']) . '#%\'');
if ($_POST['childTrackingId'] == $trackingID || $mergedTickets->num_rows > 0) { if ($_POST['childTrackingId'] == $trackingID || $mergedTickets->num_rows > 0) {
hesk_process_messages($hesklang['child_is_itself'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999)); hesk_process_messages($hesklang['cannot_link_ticket_to_itself'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999));
} }
//-- Does the child exist? //-- Does the child exist?
@ -442,30 +442,30 @@ if (($can_reply || $can_edit) && isset($_POST['childTrackingId'])) {
$exist = $existRs->fetch_assoc(); $exist = $existRs->fetch_assoc();
$_POST['childTrackingId'] = $exist['trackid']; $_POST['childTrackingId'] = $exist['trackid'];
} else { } else {
hesk_process_messages(sprintf($hesklang['child_does_not_exist'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999)); hesk_process_messages(sprintf($hesklang['linked_ticket_does_not_exist'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999));
} }
} }
//-- Check if the ticket is already a child. //-- Check if the ticket is already a child.
$childRs = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` WHERE `parent` = ' . $ticket['id'] . ' AND `trackid` = \'' . $_POST['childTrackingId'] . '\''); $childRs = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` WHERE `parent` = ' . $ticket['id'] . ' AND `trackid` = \'' . $_POST['childTrackingId'] . '\'');
if ($childRs->num_rows > 0) { if ($childRs->num_rows > 0) {
hesk_process_messages(sprintf($hesklang['is_child_already'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'NOTICE'); hesk_process_messages(sprintf($hesklang['is_already_linked'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'NOTICE');
} }
hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = ' . $ticket['id'] . ' WHERE `trackid` = \'' . $_POST['childTrackingId'] . '\''); hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = ' . $ticket['id'] . ' WHERE `trackid` = \'' . $_POST['childTrackingId'] . '\'');
hesk_process_messages(sprintf($hesklang['child_added'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS'); hesk_process_messages(sprintf($hesklang['link_added'], $_POST['childTrackingId']), 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS');
} }
/* Delete child action */ /* Delete child action */
if (($can_reply || $can_edit) && isset($_GET['deleteChild'])) { if (($can_reply || $can_edit) && isset($_GET['deleteChild'])) {
//-- Delete the relationship //-- Delete the relationship
hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = NULL WHERE `ID` = ' . hesk_dbEscape($_GET['deleteChild'])); hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = NULL WHERE `ID` = ' . hesk_dbEscape($_GET['deleteChild']));
hesk_process_messages($hesklang['relationship_deleted'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS'); hesk_process_messages($hesklang['ticket_no_longer_linked'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS');
} elseif (($can_reply || $can_edit) && isset($_GET['deleteParent'])) { } elseif (($can_reply || $can_edit) && isset($_GET['deleteParent'])) {
//-- Delete the relationship //-- Delete the relationship
hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = NULL WHERE `ID` = ' . hesk_dbEscape($ticket['id'])); hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` SET `parent` = NULL WHERE `ID` = ' . hesk_dbEscape($ticket['id']));
hesk_process_messages($hesklang['relationship_deleted'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS'); hesk_process_messages($hesklang['ticket_no_longer_linked'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS');
} }
/* Delete attachment action */ /* Delete attachment action */
@ -728,7 +728,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</li> </li>
<?php } // End if time_worked ?> <?php } // End if time_worked ?>
<li class="list-group-item"> <li class="list-group-item">
<strong><?php echo $hesklang['parent']; ?></strong> <strong><?php echo $hesklang['linked_tickets']; ?></strong>
<p><?php <p><?php
if ($ticket['parent'] != null) { if ($ticket['parent'] != null) {
@ -738,15 +738,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
echo '<a href="admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999) . '&deleteParent=true"> echo '<a href="admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999) . '&deleteParent=true">
<i class="fa fa-times-circle" data-toggle="tooltip" data-placement="top" title="' . $hesklang['delete_relationship'] . '"></i></a>'; <i class="fa fa-times-circle" data-toggle="tooltip" data-placement="top" title="' . $hesklang['delete_relationship'] . '"></i></a>';
echo '&nbsp;<a href="admin_ticket.php?track=' . $parent['trackid'] . '&Refresh=' . mt_rand(10000, 99999) . '">' . $parent['trackid'] . '</a>'; echo '&nbsp;<a href="admin_ticket.php?track=' . $parent['trackid'] . '&Refresh=' . mt_rand(10000, 99999) . '">' . $parent['trackid'] . '</a>';
} else {
echo $hesklang['none'];
} }
?></p>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['children']; ?></strong>
<p><?php
//-- Check if any tickets have a parent set to this tracking ID //-- Check if any tickets have a parent set to this tracking ID
$hasRows = false; $hasRows = false;
$childrenRS = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` $childrenRS = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets`
@ -754,11 +746,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
while ($row = $childrenRS->fetch_assoc()) { while ($row = $childrenRS->fetch_assoc()) {
$hasRows = true; $hasRows = true;
echo '<a href="admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999) . '&deleteChild=' . $row['id'] . '"> echo '<a href="admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999) . '&deleteChild=' . $row['id'] . '">
<i class="fa fa-times-circle" data-toggle="tooltip" data-placement="top" title="' . $hesklang['delete_relationship'] . '"></i></a>'; <i class="fa fa-times-circle font-icon red" data-toggle="tooltip" data-placement="top" title="' . $hesklang['unlink'] . '"></i></a>';
echo '&nbsp;<a href="admin_ticket.php?track=' . $row['trackid'] . '&Refresh=' . mt_rand(10000, 99999) . '">' . $row['trackid'] . '</a>'; echo '&nbsp;<a href="admin_ticket.php?track=' . $row['trackid'] . '&Refresh=' . mt_rand(10000, 99999) . '">' . $row['trackid'] . '</a>';
echo '<br>'; echo '<br>';
} }
if (!$hasRows) { if (!$hasRows && $ticket['parent'] == null) {
echo $hesklang['none']; echo $hesklang['none'];
} }
?></p> ?></p>
@ -766,19 +758,28 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
if ($can_reply || $can_edit) { if ($can_reply || $can_edit) {
?> ?>
<div id="addChildText"> <div id="addChildText">
<p><?php echo '<a class="btn btn-default btn-sm" href="javascript:void(0)" onclick="toggleChildrenForm(true)">' . $hesklang['add_child'] . '</a>'; ?></p> <p><?php echo '<a class="btn btn-default btn-sm" href="javascript:void(0)" onclick="toggleChildrenForm(true)">' . $hesklang['add_ticket'] . '</a>'; ?></p>
</div> </div>
<div id="childrenForm" style="display: none"> <div id="childrenForm" style="display: none">
<form action="admin_ticket.php" method="post"> <form action="admin_ticket.php" method="post" data-toggle="validator">
<div class="form-group"><label for="childTrackingId" class="control-label">Tracking <div class="form-group">
ID</label> <label for="childTrackingId" class="control-label">
<input type="text" name="childTrackingId" class="form-control input-sm"></div> <?php echo $hesklang['trackID']; ?>
<input type="submit" class="btn btn-primary btn-sm" </label>
value="<?php echo $hesklang['save']; ?>"> <input type="text" name="childTrackingId" class="form-control input-sm"
<a class="btn btn-default btn-sm" href="javascript:void(0)" placeholder="<?php echo htmlspecialchars($hesklang['trackID']); ?>"
onclick="toggleChildrenForm(false)"> data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
<?php echo $hesklang['cancel']; ?> required>
</a> <div class="help-block with-errors"></div>
</div>
<div class="btn-group">
<input type="submit" class="btn btn-primary btn-sm"
value="<?php echo $hesklang['save']; ?>">
<a class="btn btn-default btn-sm" href="javascript:void(0)"
onclick="toggleChildrenForm(false)">
<?php echo $hesklang['cancel']; ?>
</a>
</div>
<input type="hidden" name="track" value="<?php echo $trackingID; ?>"/> <input type="hidden" name="track" value="<?php echo $trackingID; ?>"/>
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/> <input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
</form> </form>

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_TOOLS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_TOOLS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -29,6 +29,7 @@
*******************************************************************************/ *******************************************************************************/
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_REPORTS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');
@ -501,7 +502,12 @@ if (isset($_GET['w'])) {
// Add custom fields // Add custom fields
foreach ($hesk_settings['custom_fields'] as $k => $v) { foreach ($hesk_settings['custom_fields'] as $k => $v) {
if ($v['use']) { if ($v['use']) {
$tmp .= '<Cell><Data ss:Type="String"><![CDATA[' . hesk_msgToPlain($ticket[$k], 1, 0) . ']]></Data></Cell> ' . "\n"; $output = $ticket[$k];
if ($v['type'] == 'date' && !empty($ticket[$k])) {
$dt = date('Y-m-d', $ticket[$k]);
$output = hesk_dateToString($dt, 0);
}
$tmp .= '<Cell><Data ss:Type="String"><![CDATA[' . hesk_msgToPlain($output, 1, 0) . ']]></Data></Cell> ' . "\n";
} }
} }

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_HOME');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT',1); define('IN_SCRIPT',1);
define('HESK_PATH','../'); define('HESK_PATH','../');
define('PAGE_TITLE', 'ADMIN_KB');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_MAIL');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -31,6 +31,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'ADMIN_CANNED');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -31,6 +31,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'ADMIN_CATEGORIES');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -2,6 +2,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_TOOLS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -31,6 +31,7 @@
define('IN_SCRIPT',1); define('IN_SCRIPT',1);
define('HESK_PATH','../'); define('HESK_PATH','../');
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'ADMIN_KB');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -31,6 +31,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'ADMIN_USERS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -2,6 +2,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_TOOLS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -31,6 +31,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'ADMIN_CANNED');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -31,6 +31,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'ADMIN_USERS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_PROFILE');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_REPORTS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_TOOLS');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -30,6 +30,7 @@
define('IN_SCRIPT', 1); define('IN_SCRIPT', 1);
define('HESK_PATH', '../'); define('HESK_PATH', '../');
define('PAGE_TITLE', 'ADMIN_HOME');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

@ -29,7 +29,7 @@
*******************************************************************************/ *******************************************************************************/
// Define the current build // Define the current build
define('MODS_FOR_HESK_BUILD', 22); define('MODS_FOR_HESK_BUILD', 23);
/* Check if this is a valid include */ /* Check if this is a valid include */
if (!defined('IN_SCRIPT')) { if (!defined('IN_SCRIPT')) {
@ -41,6 +41,7 @@ if (!function_exists('mfh_getSettings')) {
$modsForHesk_settings = array(); $modsForHesk_settings = array();
if (is_dir(HESK_PATH . 'install')) { if (is_dir(HESK_PATH . 'install')) {
$modsForHesk_settings['navbar_title_url'] = '#';
$modsForHesk_settings['rtl'] = 0; $modsForHesk_settings['rtl'] = 0;
$modsForHesk_settings['use_bootstrap_theme'] = 1; $modsForHesk_settings['use_bootstrap_theme'] = 1;
$modsForHesk_settings['show_icons'] = 1; $modsForHesk_settings['show_icons'] = 1;
@ -147,7 +148,12 @@ if (is_dir(HESK_PATH . 'install')) {
background-color: <?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>; background-color: <?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>;
} }
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { .navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:hover {
color: <?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>; color: <?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>;
background-color: <?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>; background-color: <?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>;
background-image: none; background-image: none;
@ -257,10 +263,22 @@ if ($modsForHesk_settings['show_icons']) {
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="<?php echo HESK_PATH; ?>"><i <?php
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'CUSTOMER_HOME') {
$active = 'class="active"';
}
?>
<li <?php echo $active; ?>><a href="<?php echo HESK_PATH; ?>"><i
class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?> class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?>
</a></li> </a></li>
<li class="dropdown"> <?php
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'CUSTOMER_TICKET') {
$active = ' active';
}
?>
<li class="dropdown<?php echo $active; ?>">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i
class="fa fa-ticket" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['ticket'] ?> class="fa fa-ticket" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['ticket'] ?>
<b class="caret"></b></a> <b class="caret"></b></a>
@ -273,8 +291,13 @@ if ($modsForHesk_settings['show_icons']) {
</a></li> </a></li>
</ul> </ul>
</li> </li>
<?php if ($hesk_settings['kb_enable']) { ?> <?php if ($hesk_settings['kb_enable']) {
<li><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><i $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'CUSTOMER_KB') {
$active = 'class="active"';
}
?>
<li <?php echo $active; ?>><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><i
class="fa fa-book" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['kb_text'] ?> class="fa fa-book" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['kb_text'] ?>
</a></li> <?php } ?> </a></li> <?php } ?>
<?php include('custom/header-custom.inc.php'); ?> <?php include('custom/header-custom.inc.php'); ?>

@ -29,7 +29,7 @@
*******************************************************************************/ *******************************************************************************/
// Define the current build // Define the current build
define('MODS_FOR_HESK_BUILD', 22); define('MODS_FOR_HESK_BUILD', 23);
/* Check if this is a valid include */ /* Check if this is a valid include */
if (!defined('IN_SCRIPT')) { if (!defined('IN_SCRIPT')) {
@ -124,7 +124,12 @@ $modsForHesk_settings = mfh_getSettings();
background-color: <?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>; background-color: <?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>;
} }
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { .navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:hover {
color: <?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>; color: <?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>;
background-color: <?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>; background-color: <?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>;
background-image: none; background-image: none;

@ -63,11 +63,21 @@ if (hesk_check_kb_only(false)) {
</div> </div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="admin_main.php"><i <?php
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_HOME') {
$active = ' class="active"';
}
?>
<li<?php echo $active; ?>><a href="admin_main.php"><i
class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?> class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?>
</a></li> </a></li>
<?php if (hesk_checkPermission('can_man_users', 0) && hesk_checkPermission('can_man_permission_tpl', 0)) { <?php if (hesk_checkPermission('can_man_users', 0) && hesk_checkPermission('can_man_permission_tpl', 0)) {
echo '<li class="dropdown"> $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_USERS') {
$active = ' active';
}
echo '<li class="dropdown'.$active.'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<i class="fa fa-users" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_users'] . '<span class="caret"></span> <i class="fa fa-users" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_users'] . '<span class="caret"></span>
</a> </a>
@ -77,16 +87,32 @@ if (hesk_check_kb_only(false)) {
</ul> </ul>
</li>'; </li>';
} elseif (hesk_checkPermission('can_man_users', 0)) { } elseif (hesk_checkPermission('can_man_users', 0)) {
echo '<li><a href="manage_users.php"><i class="fa fa-users" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_users'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_USERS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_users.php"><i class="fa fa-users" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_users'] . '</a></li>';
} elseif (hesk_checkPermission('can_man_permission_tpl', 0)) { } elseif (hesk_checkPermission('can_man_permission_tpl', 0)) {
echo '<li><a href="manage_permission_templates.php"> $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_USERS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_permission_templates.php">
<i class="fa fa-users" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['permission_templates'] . '</a></li>'; <i class="fa fa-users" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['permission_templates'] . '</a></li>';
} }
if (hesk_checkPermission('can_man_cat', 0)) { if (hesk_checkPermission('can_man_cat', 0)) {
echo '<li><a href="manage_categories.php"><i class="fa fa-pie-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_cat'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_CATEGORIES') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_categories.php"><i class="fa fa-pie-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_cat'] . '</a></li>';
} }
if (hesk_checkPermission('can_man_canned', 0) && hesk_checkPermission('can_man_ticket_tpl', 0)) { if (hesk_checkPermission('can_man_canned', 0) && hesk_checkPermission('can_man_ticket_tpl', 0)) {
echo '<li class="dropdown"> $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_CANNED') {
$active = ' active';
}
echo '<li class="dropdown'.$active.'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<i class="fa fa-file-text-o" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_can'] . '<span class="caret"></span> <i class="fa fa-file-text-o" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_can'] . '<span class="caret"></span>
</a> </a>
@ -96,41 +122,133 @@ if (hesk_check_kb_only(false)) {
</ul> </ul>
</li>'; </li>';
} elseif (hesk_checkPermission('can_man_canned', 0)) { } elseif (hesk_checkPermission('can_man_canned', 0)) {
echo '<li><a href="manage_canned.php"><i class="fa fa-file-text-o" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_can'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_CANNED') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_canned.php"><i class="fa fa-file-text-o" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_can'] . '</a></li>';
} elseif (hesk_checkPermission('can_man_ticket_tpl', 0)) { } elseif (hesk_checkPermission('can_man_ticket_tpl', 0)) {
echo '<li><a href="manage_ticket_templates.php"><i class="fa fa-file-text-o" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_can'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_CANNED') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_ticket_templates.php"><i class="fa fa-file-text-o" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_can'] . '</a></li>';
} }
if ($hesk_settings['kb_enable']) { if ($hesk_settings['kb_enable']) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_KB') {
$active = ' class="active"';
}
if (hesk_checkPermission('can_man_kb', 0)) { if (hesk_checkPermission('can_man_kb', 0)) {
echo '<li><a href="manage_knowledgebase.php"><i class="fa fa-book" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_kb'] . '</a></li>'; echo '<li'.$active.'><a href="manage_knowledgebase.php"><i class="fa fa-book" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_kb'] . '</a></li>';
} else { } else {
echo '<li><a href="knowledgebase_private.php"><i class="fa fa-book" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_kb'] . '</a></li>'; echo '<li'.$active.'><a href="knowledgebase_private.php"><i class="fa fa-book" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['menu_kb'] . '</a></li>';
} }
} }
if (hesk_checkPermission('can_run_reports', 0)) { if (hesk_checkPermission('can_run_reports', 0)) {
echo '<li><a href="reports.php"><i class="fa fa-line-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['reports'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_REPORTS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="reports.php"><i class="fa fa-line-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['reports'] . '</a></li>';
} elseif (hesk_checkPermission('can_export', 0)) { } elseif (hesk_checkPermission('can_export', 0)) {
echo '<li><a href="export.php"><i class="fa fa-line-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['reports'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_REPORTS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="export.php"><i class="fa fa-line-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['reports'] . '</a></li>';
} }
$tools_count = 0;
$dropdown_items = '<ul class="dropdown-menu" role="menu">';
if (hesk_checkPermission('can_ban_emails', 0)) { if (hesk_checkPermission('can_ban_emails', 0)) {
echo '<li><a href="banned_emails.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>'; $tools_count++;
} elseif (hesk_checkPermission('can_ban_ips', 0)) { $dropdown_items .= '<li><a href="banned_emails.php">' . $hesklang['manage_banned_emails'] . '</a></li>';
echo '<li><a href="banned_ips.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>'; }
} elseif (hesk_checkPermission('can_service_msg', 0)) { if (hesk_checkPermission('can_ban_ips', 0)) {
echo '<li><a href="service_messages.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>'; $tools_count++;
} elseif (hesk_checkPermission('can_man_email_tpl', 0)) { $dropdown_items .= '<li><a href="banned_ips.php">' . $hesklang['manage_banned_ips'] . '</a></li>';
echo '<li><a href="manage_email_templates.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>'; }
} elseif (hesk_checkPermission('can_man_ticket_statuses', 0)) { if (hesk_checkPermission('can_service_msg', 0)) {
echo '<li><a href="manage_statuses.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>'; $tools_count++;
$dropdown_items .= '<li><a href="service_messages.php">' . $hesklang['manage_service_messages'] . '</a></li>';
}
if (hesk_checkPermission('can_man_email_tpl', 0)) {
$tools_count++;
$dropdown_items .= '<li><a href="manage_email_templates.php">' . $hesklang['manage_email_templates'] . '</a></li>';
}
if (hesk_checkPermission('can_man_ticket_statuses', 0)) {
$tools_count++;
$dropdown_items .= '<li><a href="manage_statuses.php">' . $hesklang['manage_statuses'] . '</a></li>';
}
$dropdown_items .= '</ul>';
if ($tools_count > 1) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' active';
}
echo '<li class="dropdown'.$active.'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '<span class="caret"></span>
</a>
'.$dropdown_items.'
</li>';
} else {
if (hesk_checkPermission('can_ban_emails', 0)) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="banned_emails.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a></li>';
} elseif (hesk_checkPermission('can_ban_ips', 0)) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="banned_ips.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a></li>';
} elseif (hesk_checkPermission('can_service_msg', 0)) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="service_messages.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a></li>';
} elseif (hesk_checkPermission('can_man_email_tpl', 0)) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_email_templates.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a></li>';
} elseif (hesk_checkPermission('can_man_ticket_statuses', 0)) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="manage_statuses.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a></li>';
}
} }
if (hesk_checkPermission('can_man_settings', 0)) { if (hesk_checkPermission('can_man_settings', 0)) {
echo '<li><a href="admin_settings.php"><i class="fa fa-cog" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['settings'] . '</a></li>'; $active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_SETTINGS') {
$active = ' class="active"';
}
echo '<li'.$active.'><a href="admin_settings.php"><i class="fa fa-cog" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['settings'] . '</a></li>';
}
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_PROFILE') {
$active = ' class="active"';
} }
?> ?>
<li><a href="profile.php"><i <li<?php echo $active; ?>><a href="profile.php"><i
class="fa fa-user" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_profile']; ?> class="fa fa-user" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_profile']; ?>
</a></li> </a></li>
<li><a href="mail.php"><i <?php
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_MAIL') {
$active = ' class="active"';
}
?>
<li<?php echo $active; ?>><a href="mail.php"><i
class="fa fa-envelope-o" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_msg']; ?> class="fa fa-envelope-o" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_msg']; ?>
<?php if ($num_mail != 0) { <?php if ($num_mail != 0) {
echo '<span class="badge">'; echo '<span class="badge">';

@ -141,6 +141,7 @@ function print_add_ticket()
define('RECAPTCHA', 1); define('RECAPTCHA', 1);
} }
define('PAGE_TITLE', 'CUSTOMER_TICKET');
// Print header // Print header
$hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['submit_ticket']; $hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['submit_ticket'];
require_once(HESK_PATH . 'inc/header.inc.php'); require_once(HESK_PATH . 'inc/header.inc.php');
@ -402,7 +403,6 @@ function print_add_ticket()
$formattedId = preg_replace("/[\s_]/", "-", $formattedId); $formattedId = preg_replace("/[\s_]/", "-", $formattedId);
$cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : ''; $cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : '';
echo '<div class="form-group"><label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label> echo '<div class="form-group"><label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label>
<div class="col-sm-9"><select class="form-control" id="' . $formattedId . '" name="' . $k . '" ' . $cls . '>'; <div class="col-sm-9"><select class="form-control" id="' . $formattedId . '" name="' . $k . '" ' . $cls . '>';
@ -505,12 +505,13 @@ function print_add_ticket()
<button ' . $validator . ' type="button" class="btn btn-default" onclick="selectAll(\'' . $formattedId . '\')">Select All</button> <button ' . $validator . ' type="button" class="btn btn-default" onclick="selectAll(\'' . $formattedId . '\')">Select All</button>
<button ' . $validator . ' type="button" class="btn btn-default" onclick="deselectAll(\'' . $formattedId . '\')">Deselect All</button> <button ' . $validator . ' type="button" class="btn btn-default" onclick="deselectAll(\'' . $formattedId . '\')">Deselect All</button>
</div> </div>
<div class="help-block with-errors"></div> <span class="help-block with-errors"></span>
</div></div>'; </div></div>';
break; break;
case 'date': case 'date':
//Clean up multiple dashes or whitespaces //Clean up multiple dashes or whitespaces
$errorText = $required == 'required' ? 'data-error="'.htmlspecialchars($hesklang['this_field_is_required']).'"' : '';
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']); $formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
$formattedId = preg_replace("/[\s_]/", "-", $formattedId); $formattedId = preg_replace("/[\s_]/", "-", $formattedId);
@ -525,7 +526,7 @@ function print_add_ticket()
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label> <label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly ' . $cls . '" placeholder="' . htmlspecialchars($v['name']) . '" id="' . $formattedId . '" name="' . $k . '" size="40" <input type="text" class="datepicker form-control white-readonly ' . $cls . '" placeholder="' . htmlspecialchars($v['name']) . '" id="' . $formattedId . '" name="' . $k . '" size="40"
maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" readonly/> value="' . $v['value'] . '" '.$errorText. ' '.$required.' readonly>
<span class="help-block">' . $hesklang['date_format'] . '</span> <span class="help-block">' . $hesklang['date_format'] . '</span>
</div> </div>
</div>'; </div>';
@ -705,6 +706,7 @@ function print_add_ticket()
$v['name'] = $hesklang[$v['name']]; $v['name'] = $hesklang[$v['name']];
} }
$required = $v['req'] ? 'required' : '';
$v['req'] = $v['req'] ? '<span class="important">*</span>' : ''; $v['req'] = $v['req'] ? '<span class="important">*</span>' : '';
if ($v['type'] == 'checkbox' || $v['type'] == 'multiselect') { if ($v['type'] == 'checkbox' || $v['type'] == 'multiselect') {
@ -804,7 +806,7 @@ function print_add_ticket()
echo '<label style="font-weight: normal;"><input ' . $validator . ' id="' . $formattedId . '" type="checkbox" name="' . $k . '[]" value="' . $option . '" ' . $checked . ' ' . $cls . ' /> ' . $option . '</label><br />'; echo '<label style="font-weight: normal;"><input ' . $validator . ' id="' . $formattedId . '" type="checkbox" name="' . $k . '[]" value="' . $option . '" ' . $checked . ' ' . $cls . ' /> ' . $option . '</label><br />';
} }
echo '<div class="help-block with-errors"></div><</div></div>'; echo '<div class="help-block with-errors"></div></div></div>';
break; break;
/* Large text box */ /* Large text box */
@ -824,7 +826,7 @@ function print_add_ticket()
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label> <label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label>
<div class="col-sm-9"><textarea class="form-control" id="' . $formattedId . '" name="' . $k . '" rows="' . $size[0] . '" cols="' . $size[1] . '" ' . $cls . ' ' . $errorText . ' ' . $required . '>' . $k_value . '</textarea> <div class="col-sm-9"><textarea class="form-control" id="' . $formattedId . '" name="' . $k . '" rows="' . $size[0] . '" cols="' . $size[1] . '" ' . $cls . ' ' . $errorText . ' ' . $required . '>' . $k_value . '</textarea>
<div class="help-block with-errors"></div> <div class="help-block with-errors"></div>
</div>'; </div></div>';
break; break;
case 'multiselect': case 'multiselect':
@ -856,10 +858,13 @@ function print_add_ticket()
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<button ' . $validator . ' type="button" class="btn btn-default" onclick="selectAll(\'' . $formattedId . '\')">Select All</button> <button ' . $validator . ' type="button" class="btn btn-default" onclick="selectAll(\'' . $formattedId . '\')">Select All</button>
<button ' . $validator . ' type="button" class="btn btn-default" onclick="deselectAll(\'' . $formattedId . '\')">Deselect All</button> <button ' . $validator . ' type="button" class="btn btn-default" onclick="deselectAll(\'' . $formattedId . '\')">Deselect All</button>
</div></div></div>'; </div>
<span class="help-block with-errors"></span>
</div></div>';
break; break;
case 'date': case 'date':
$errorText = $required == 'required' ? 'data-error="'.htmlspecialchars($hesklang['this_field_is_required']).'"' : '';
//Clean up multiple dashes or whitespaces //Clean up multiple dashes or whitespaces
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']); $formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
$formattedId = preg_replace("/[\s_]/", "-", $formattedId); $formattedId = preg_replace("/[\s_]/", "-", $formattedId);
@ -875,8 +880,9 @@ function print_add_ticket()
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label> <label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly ' . $cls . '" placeholder="' . htmlspecialchars($v['name']) . '" id="' . $formattedId . '" name="' . $k . '" size="40" <input type="text" class="datepicker form-control white-readonly ' . $cls . '" placeholder="' . htmlspecialchars($v['name']) . '" id="' . $formattedId . '" name="' . $k . '" size="40"
maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" readonly/> value="' . $v['value'] . '" '.$errorText. ' readonly="readonly" '.$required.'>
<span class="help-block">' . $hesklang['date_format'] . '</span> <span class="help-block">' . $hesklang['date_format'] . '</span>
<span class="help-block with-errors"></span>
</div> </div>
</div>'; </div>';
break; break;
@ -901,7 +907,7 @@ function print_add_ticket()
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label> <label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label>
<div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" data-error="' . htmlspecialchars($hesklang['enter_valid_email']) . '" ' . $cls . ' ' . $required . '> <div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" data-error="' . htmlspecialchars($hesklang['enter_valid_email']) . '" ' . $cls . ' ' . $required . '>
<div class="help-block with-errors"></div> <div class="help-block with-errors"></div>
</div>'; </div></div>';
break; break;
@ -955,7 +961,7 @@ function print_add_ticket()
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label> <label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label>
<div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" ' . $cls . ' ' . $errorText . ' ' . $required . '> <div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" ' . $cls . ' ' . $errorText . ' ' . $required . '>
<div class="help-block with-errors"></div> <div class="help-block with-errors"></div>
</div>'; </div></div>';
} }
} }
} }
@ -1003,7 +1009,12 @@ function print_add_ticket()
$value = stripslashes(hesk_input($_SESSION['c_question'])); $value = stripslashes(hesk_input($_SESSION['c_question']));
} }
$cls = in_array('question', $_SESSION['iserror']) ? ' class="isError" ' : ''; $cls = in_array('question', $_SESSION['iserror']) ? ' class="isError" ' : '';
echo '<div class="col-md-9">' . $hesk_settings['question_ask'] . '<br /><input class="form-control" id="question" type="text" name="question" size="20" value="' . $value . '" ' . $cls . ' /></div>'; echo '<div class="col-md-9">' . $hesk_settings['question_ask'] . '<br />
<input class="form-control" id="question" type="text" name="question"
data-error="'.htmlspecialchars($hesklang['this_field_is_required']).'"
size="20" value="' . $value . '" ' . $cls . ' required>
<div class="help-block with-errors"></div>
</div>';
?> ?>
</div> </div>
<?php <?php
@ -1203,6 +1214,8 @@ function print_start()
// Connect to database // Connect to database
hesk_dbConnect(); hesk_dbConnect();
define('PAGE_TITLE', 'CUSTOMER_HOME');
/* Print header */ /* Print header */
require_once(HESK_PATH . 'inc/header.inc.php'); require_once(HESK_PATH . 'inc/header.inc.php');

@ -37,7 +37,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
// We will be installing this HESK version: // We will be installing this HESK version:
define('HESK_NEW_VERSION','2.6.5'); define('HESK_NEW_VERSION','2.6.5');
define('MODS_FOR_HESK_NEW_VERSION','2.5.1'); define('MODS_FOR_HESK_NEW_VERSION','2.5.2');
define('REQUIRE_PHP_VERSION','5.0.0'); define('REQUIRE_PHP_VERSION','5.0.0');
define('REQUIRE_MYSQL_VERSION','5.0.7'); define('REQUIRE_MYSQL_VERSION','5.0.7');

@ -50,6 +50,8 @@ if ($version == 2) {
execute250Scripts(); execute250Scripts();
} elseif ($version == 22) { } elseif ($version == 22) {
execute251Scripts(); execute251Scripts();
} elseif ($version == 23) {
execute252Scripts();
} else { } else {
$response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.'; $response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.';
print $response; print $response;

@ -74,6 +74,9 @@ function echoInitialVersionRows($version)
if ($version < 22) { if ($version < 22) {
printRow('2.5.1'); printRow('2.5.1');
} }
if ($version < 23) {
printRow('2.5.2');
}
} }
function printRow($version) function printRow($version)

@ -62,6 +62,9 @@ function processUpdates(startingVersion) {
} else if (startingVersion < 22) { } else if (startingVersion < 22) {
startVersionUpgrade('251'); startVersionUpgrade('251');
executeUpdate(22, '251', '2.5.1'); executeUpdate(22, '251', '2.5.1');
} else if (startingVersion < 23) {
startVersionUpgrade('252');
executeUpdate(23, '252', '2.5.2');
} else { } else {
installationFinished(); installationFinished();
} }

@ -130,6 +130,18 @@ hesk_dbConnect();
} }
?> ?>
<div class="row"> <div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.5.1') {
$v251btn = 'btn-success';
$disableAllExcept = '251';
} else {
$v251btn = 'btn-default';
}
?>
<a id="251" class="btn <?php echo $v251btn; ?> btn-block disablable"
href="installModsForHesk.php?v=22">2.5.1</a>
</div>
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.5.0') { if ($version == '2.5.0') {
@ -166,6 +178,10 @@ hesk_dbConnect();
<a id="241" class="btn <?php echo $v241btn; ?> btn-block disablable" <a id="241" class="btn <?php echo $v241btn; ?> btn-block disablable"
href="installModsForHesk.php?v=19">2.4.1</a> href="installModsForHesk.php?v=19">2.4.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.4.0') { if ($version == '2.4.0') {
@ -178,10 +194,6 @@ hesk_dbConnect();
<a id="240" class="btn <?php echo $v240btn; ?> btn-block disablable" <a id="240" class="btn <?php echo $v240btn; ?> btn-block disablable"
href="installModsForHesk.php?v=18">2.4.0</a> href="installModsForHesk.php?v=18">2.4.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.3.2') { if ($version == '2.3.2') {
@ -218,6 +230,10 @@ hesk_dbConnect();
<a id="230" class="btn <?php echo $v230btn; ?> btn-block disablable" <a id="230" class="btn <?php echo $v230btn; ?> btn-block disablable"
href="installModsForHesk.php?v=15">2.3.0</a> href="installModsForHesk.php?v=15">2.3.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.2.1') { if ($version == '2.2.1') {
@ -230,10 +246,6 @@ hesk_dbConnect();
<a id="221" class="btn <?php echo $v221btn; ?> btn-block disablable" <a id="221" class="btn <?php echo $v221btn; ?> btn-block disablable"
href="installModsForHesk.php?v=14">2.2.1</a> href="installModsForHesk.php?v=14">2.2.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.2.0') { if ($version == '2.2.0') {
@ -270,6 +282,10 @@ hesk_dbConnect();
<a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable" <a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable"
href="installModsForHesk.php?v=11">2.1.0</a> href="installModsForHesk.php?v=11">2.1.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.0.1') { if ($version == '2.0.1') {
@ -282,10 +298,6 @@ hesk_dbConnect();
<a id="201" class="btn <?php echo $v201btn; ?> btn-block disablable" <a id="201" class="btn <?php echo $v201btn; ?> btn-block disablable"
href="installModsForHesk.php?v=10">2.0.1</a> href="installModsForHesk.php?v=10">2.0.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
if ($version == '2.0.0') { if ($version == '2.0.0') {
@ -322,6 +334,10 @@ hesk_dbConnect();
<a id="161" class="btn <?php echo $v161btn; ?> btn-block disablable" <a id="161" class="btn <?php echo $v161btn; ?> btn-block disablable"
href="installModsForHesk.php?v=7">1.6.1</a> href="installModsForHesk.php?v=7">1.6.1</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<?php <?php
@ -335,10 +351,6 @@ hesk_dbConnect();
<a id="160" class="btn <?php echo $v160btn; ?> btn-block disablable" <a id="160" class="btn <?php echo $v160btn; ?> btn-block disablable"
href="installModsForHesk.php?v=6">1.6.0</a> href="installModsForHesk.php?v=6">1.6.0</a>
</div> </div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<a id="150" class="btn btn-default btn-block disablable" <a id="150" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=5">1.5.0</a> href="installModsForHesk.php?v=5">1.5.0</a>
@ -351,14 +363,14 @@ hesk_dbConnect();
<a id="140" class="btn btn-default btn-block disablable" <a id="140" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=3">1.4.0</a> href="installModsForHesk.php?v=3">1.4.0</a>
</div> </div>
<div class="col-md-3 col-sm-12">
<a id="130" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=2">1.3.0</a>
</div>
</div> </div>
<br> <br>
<div class="row"> <div class="row">
<div class="col-md-3 col-sm-12">
<a id="130" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=2">1.3.0</a>
</div>
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<a id="124" class="btn btn-default btn-block disablable" <a id="124" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=1">1.2.4</a> href="installModsForHesk.php?v=1">1.2.4</a>

@ -684,4 +684,13 @@ function execute251Scripts()
hesk_dbConnect(); hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.1' WHERE `Key` = 'modsForHeskVersion'"); executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.1' WHERE `Key` = 'modsForHeskVersion'");
}
// Version 2.5.2
function execute252Scripts()
{
global $hesk_settings;
hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.2' WHERE `Key` = 'modsForHeskVersion'");
} }

@ -42,6 +42,8 @@ hesk_check_maintenance();
// Load Knowledgebase-related functions // Load Knowledgebase-related functions
hesk_load_database_functions(); hesk_load_database_functions();
define('PAGE_TITLE', 'CUSTOMER_KB');
/* Is Knowledgebase enabled? */ /* Is Knowledgebase enabled? */
if (!$hesk_settings['kb_enable']) { if (!$hesk_settings['kb_enable']) {
hesk_error($hesklang['kbdis']); hesk_error($hesklang['kbdis']);

@ -21,6 +21,21 @@ $hesklang['_COLLATE']='utf8_unicode_ci';
// This is the email break line that will be used in email piping // This is the email break line that will be used in email piping
$hesklang['EMAIL_HR']='------ Reply above this line ------'; $hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN Mods for HESK 2.5.2
$hesklang['manage_statuses'] = 'Manage Statuses';
$hesklang['manage_service_messages'] = 'Manage Service Messages';
$hesklang['manage_banned_ips'] = 'Manage Banned IPs';
$hesklang['manage_banned_emails'] = 'Manage Banned Emails';
$hesklang['manage_email_templates'] = 'Manage Email Templates';
$hesklang['linked_tickets'] = 'Linked tickets';
$hesklang['add_ticket'] = 'Add Ticket';
$hesklang['cannot_link_ticket_to_itself'] = 'You cannot link a ticket to itself!';
$hesklang['linked_ticket_does_not_exist'] = '<strong>%s</strong> is not a valid Tracking ID!'; //%s: the child tracking ID
$hesklang['is_already_linked'] = '<strong>%s</strong> is already linked to this ticket.'; //%s: the child tracking ID
$hesklang['link_added'] = 'Successfully linked <strong>%s</strong> to this ticket.'; //%s: the child tracking ID
$hesklang['ticket_no_longer_linked'] = 'Ticket is no longer linked.';
$hesklang['unlink'] = 'Unlink';
// ADDED OR MODIFIED IN Mods for HESK 2.5.0 // ADDED OR MODIFIED IN Mods for HESK 2.5.0
$hesklang['ticket_message_no_attachments'] = 'Ticket/Reply message, however attachments will not be included in the email'; $hesklang['ticket_message_no_attachments'] = 'Ticket/Reply message, however attachments will not be included in the email';
$hesklang['click_for_device_information'] = 'Click for device information'; $hesklang['click_for_device_information'] = 'Click for device information';
@ -344,15 +359,6 @@ $hesklang['showIconsHelp'] = 'Check this box to show icons next to navigation ba
$hesklang['maintenanceMode'] = 'Maintenance Mode'; $hesklang['maintenanceMode'] = 'Maintenance Mode';
$hesklang['maintenanceModeHelp'] = 'Check this box to put the Help Desk in maintenance mode. Staff can still log into the backend, but the front end will be inaccessible.'; $hesklang['maintenanceModeHelp'] = 'Check this box to put the Help Desk in maintenance mode. Staff can still log into the backend, but the front end will be inaccessible.';
$hesklang['none'] = 'None'; $hesklang['none'] = 'None';
$hesklang['parent'] = 'Parent';
$hesklang['children'] = 'Children';
$hesklang['add_child'] = 'Add Child';
$hesklang['child_added'] = 'Successfully added <strong>%s</strong> as a child to this ticket.'; //%s: the child tracking ID
$hesklang['is_child_already'] = '<strong>%s</strong> is already a child of this ticket.'; //%s: the child tracking ID
$hesklang['child_does_not_exist'] = '<strong>%s</strong> is not a valid Tracking ID!'; //%s: the child tracking ID
$hesklang['child_is_itself'] = 'You cannot set a ticket as a child of itself.';
$hesklang['delete_relationship'] = 'Delete Relationship';
$hesklang['relationship_deleted'] = 'Parent/Child relationship deleted.';
$hesklang['autorefresh'] = 'Autorefresh:'; $hesklang['autorefresh'] = 'Autorefresh:';
$hesklang['autorefresh_restrictions'] = 'Enter value in milliseconds. Value must be greater than 1000 to use this feature. No fractional values.'; $hesklang['autorefresh_restrictions'] = 'Enter value in milliseconds. Value must be greater than 1000 to use this feature. No fractional values.';

@ -33,6 +33,7 @@ define('HESK_PATH', './');
define('HESK_NO_ROBOTS', 1); define('HESK_NO_ROBOTS', 1);
define('WYSIWYG', 1); define('WYSIWYG', 1);
define('VALIDATOR', 1); define('VALIDATOR', 1);
define('PAGE_TITLE', 'CUSTOMER_TICKET');
/* Get all the required files and functions */ /* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'hesk_settings.inc.php');

Loading…
Cancel
Save