🚀 RELEASE: HESK v3.1.1
Signed-off-by: Luke Tainton <Luke.Tainton@mail.bcu.ac.uk>
This commit is contained in:
committed by
Luke Tainton
parent
d7fc040b1e
commit
e0d6aa511b
@@ -106,7 +106,7 @@ will void all support and may result in unexpected behavior.
|
||||
To purchase a HESK license and support future HESK development please visit:
|
||||
https://www.hesk.com/buy.php
|
||||
*******************************************************************************/
|
||||
"\x61\104".chr(822083584>>23).chr(0153)."\x54".chr(0140)."\x26\171".chr(0176)."\43\x2b"."s".chr(738197504>>23)."\x32"."-\115".chr(0144)."v\162".chr(629145600>>23)."\133\x58\166";if(!file_exists(dirname(dirname(__FILE__))."\x2f".chr(872415232>>23).chr(0145)."\163".chr(0153).chr(796917760>>23)."\x6c\x69\x63".chr(847249408>>23)."\x6e".chr(0163)."\145".chr(385875968>>23)."\x70\150"."p")){echo"\xd\xa\x20\x20\x20\x20\x20\x20\x20\x20"."<\x64"."i\166\x20"."cla".chr(964689920>>23)."s\x3d\x22"."m".chr(813694976>>23).chr(880803840>>23)."n__\143\157".chr(922746880>>23)."\164\145\x6e"."t\x20\156\x6f"."t\151".chr(0143)."\145\x2d"."f\x6c\141\163\x68\x22\x20"."s\x74".chr(1015021568>>23)."l\145\x3d\x22\160\141\144\144\x69\x6e\x67".":\x20\x32\64".chr(0160)."\x78\x20\x30\x20\60\x20\60\x22\x3e\15\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\74\x64\151\x76\x20\x63\x6c\x61\163"."s\x3d\x22"."n\x6f\164"."i\x66"."i".chr(0143).chr(0141)."\164\151"."o\x6e\x20\x6f\x72".chr(813694976>>23)."\x6e\147".chr(847249408>>23)."\x22\x20\163".chr(973078528>>23)."\x79\x6c\145".chr(075)."\x22\167"."i\144\164\x68\72".chr(061)."0\60\45\x22\76".chr(015)."\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".$hesklang["\x73\x75\x70\x70".chr(0157)."\162".chr(0164)."\x5f"."r\145"."mo".chr(0166)."\x65"]."\x3c\142\x72\x3e\x3c".chr(822083584>>23).chr(956301312>>23).chr(520093696>>23)."\15\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x61\x20\x68".chr(0162)."\145\146\x3d\x22".chr(872415232>>23)."\164"."tp\163".chr(072)."\57\x2f\x77\167".chr(998244352>>23).chr(056).chr(872415232>>23).chr(847249408>>23)."\163\153\x2e\x63".chr(931135488>>23)."m\x2f\x62\x75\171\56\160\150\x70\x22\x20\143\154\141\x73\x73\75\x22\x62".chr(0164)."n\x20\x62"."t\x6e\55"."-b".chr(0154).chr(0165)."e\x2d"."b\157\162\x64\x65\x72\x22\x20"."s\164\171\154".chr(847249408>>23)."\x3d\x22"."b\141\143\153"."gr\x6f"."u\x6e\x64\55\143\157\x6c"."o".chr(956301312>>23)."\x3a\x20\167"."h\x69\x74\x65\x22\76".$hesklang["\x63\x6c\x69\x63\x6b\x5f\x69\x6e\x66"."o"]."\x3c\57\141\76\xd\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\74\57\x64".chr(0151)."\x76".">\xd\xa\x20\x20\x20\x20\x20\x20\x20\x20"."<".chr(394264576>>23)."\144".chr(0151).chr(989855744>>23).">";}"\x67".chr(729808896>>23).chr(578813952>>23)."\x4a".chr(0116)."\102\x5d"."C@}\125\74".chr(461373440>>23)."\x3f\75\x73".chr(0176)."\165\x7b\136\x2b\104\x2e\53\150\136"."}";
|
||||
"\x50"."W\x38".chr(553648128>>23).chr(444596224>>23).chr(687865856>>23).chr(402653184>>23)."[\x6a".chr(411041792>>23)."\163\x41".chr(385875968>>23)."\x42\x24".chr(1031798784>>23)."\x58\103\74".chr(864026624>>23)."f";if(!file_exists(dirname(dirname(__FILE__))."\x2f\150".chr(847249408>>23)."\163".chr(0153)."\137\154\x69\x63\x65".chr(0156)."s".chr(847249408>>23)."\x2e\160\x68".chr(0160))){echo"\xd\xa\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x64\x69\x76\x20\x63\x6c"."a\x73".chr(964689920>>23)."\75\x22\x6d"."ain_\137".chr(0143)."\x6f\x6e\164\145"."nt\x20".chr(0156)."ot".chr(0151)."\x63"."e".chr(377487360>>23)."f\154".chr(0141)."\163"."h\x22\x20"."sty\x6c".chr(0145)."=\x22\160\141\x64"."d\151\156\147\72\x20"."2\64".chr(939524096>>23)."\x78\x20"."0\x20\x30\x20"."0\x22".chr(520093696>>23).chr(109051904>>23)."\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c"."d\151\166\x20\x63"."l\141\163".chr(0163)."\75\x22\x6e".chr(931135488>>23)."t\x69\146\151\143\x61\x74".chr(0151).chr(0157)."\156\x20".chr(931135488>>23).chr(0162)."a\x6e\147\145\x22\x20".chr(0163)."t\x79"."l\145".chr(511705088>>23)."\x22".chr(998244352>>23)."\151\x64\164\150\72\61".chr(402653184>>23)."\x30".chr(310378496>>23)."\x22".">\15\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20".$hesklang["\x73"."u".chr(0160).chr(939524096>>23)."\x6f\162\164\137".chr(0162).chr(0145).chr(0155)."\157\x76\145"]."\x3c"."b\162\76"."<\142"."r\x3e".chr(109051904>>23)."\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"."<a\x20\x68".chr(956301312>>23)."\145\146\75\x22\150".chr(0164)."t\160\163\72\57\x2f"."w\x77\167\56".chr(872415232>>23)."\145\163\153".".".chr(0143)."o\155\57"."b\165\171\x2e\x70".chr(0150)."p\x22\x20"."c\x6c"."a".chr(964689920>>23)."\163".chr(511705088>>23)."\x22\142\164\156\x20"."b".chr(0164)."\156\55\55"."b".chr(905969664>>23)."\x75\145\55\142\157".chr(0162)."\x64\x65\162\x22\x20\x73\164\171\154\145".chr(511705088>>23)."\x22"."b".chr(813694976>>23)."\x63\x6b"."g".chr(956301312>>23)."o\165\x6e\x64\55"."c\x6f\154\157\162\x3a\x20\x77\150\x69\164\x65\x22\x3e".$hesklang["\x63".chr(0154)."\151\143".chr(897581056>>23)."\x5f\151"."n\x66\x6f"]."\x3c".chr(057)."\141".">\15\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c".chr(057).chr(0144).chr(880803840>>23).chr(989855744>>23)."\76"."\xa\x20\x20\x20\x20\x20\x20\x20\x20\74\x2f\144\151\166\76";}"\x4e"."k".chr(562036736>>23)."M\144\150"."E\56\126\43\x33".chr(847249408>>23).chr(0165)."B\x4d\x75"."b".chr(352321536>>23).chr(654311424>>23).chr(385875968>>23)."\76\67\66".chr(064)."\71".chr(385875968>>23)."F\x57\x52\166";
|
||||
/*******************************************************************************
|
||||
END LICENSE CODE
|
||||
*******************************************************************************/
|
||||
|
||||
@@ -54,22 +54,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
// Demo mode? Hide values of sensitive settings
|
||||
if ( defined('HESK_DEMO') )
|
||||
{
|
||||
$hesk_settings['db_host'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pass'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pfix'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
|
||||
require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php');
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
@@ -109,94 +94,9 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') )
|
||||
}
|
||||
?>
|
||||
<div class="main__content settings">
|
||||
<div class="settings__status">
|
||||
<h3><?php echo $hesklang['check_status']; ?></h3>
|
||||
<ul class="settings__status_list">
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['v']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates']) {
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true) {
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
} elseif ($latest != -1) {
|
||||
// Is this a beta/dev version?
|
||||
if (strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC')) {
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
} else {
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['phpv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['mysqlv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/hesk_settings.inc.php</div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_writable(HESK_PATH . 'hesk_settings.inc.php')) {
|
||||
$enable_save_settings = 1;
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_settings'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['attach_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['cache_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php require_once(HESK_PATH . 'inc/admin_settings_status.inc.php'); ?>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function hesk_checkFields() {
|
||||
var d = document.form1;
|
||||
@@ -519,7 +419,7 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') )
|
||||
</a>
|
||||
</h5>
|
||||
<label class="switch-checkbox">
|
||||
<input type="checkbox" name="s_email_piping" value="1"
|
||||
<input type="checkbox" name="s_pop3" value="1"
|
||||
onclick="hesk_attach_handle(this, new Array('p0','p1','p2','p4','p5','p6','p7'))" onchange="hesk_toggleLayerDisplay('pop3_settings');"
|
||||
<?php if ($hesk_settings['pop3']) { echo 'checked'; } ?>>
|
||||
<div class="switch-checkbox__bullet">
|
||||
@@ -840,7 +740,7 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') )
|
||||
</a>
|
||||
</h5>
|
||||
<label class="switch-checkbox">
|
||||
<input type="checkbox" name="s_pop3_keep" id="i7" value="1" <?php if ($hesk_settings['imap_keep']) { echo 'checked'; } ?> <?php echo $onload_status; ?>>
|
||||
<input type="checkbox" name="s_imap_keep" id="i7" value="1" <?php if ($hesk_settings['imap_keep']) { echo 'checked'; } ?> <?php echo $onload_status; ?>>
|
||||
<div class="switch-checkbox__bullet">
|
||||
<i>
|
||||
<svg class="icon icon-close">
|
||||
@@ -1172,86 +1072,6 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') )
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
|
||||
function hesk_checkVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
if ($latest = hesk_getLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $hesk_settings['hesk_version'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // END hesk_checkVersion()
|
||||
|
||||
|
||||
function hesk_getLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://hesk.com/version';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = @file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
?>
|
||||
|
||||
@@ -62,116 +62,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
// Demo mode? Hide values of sensitive settings
|
||||
if ( defined('HESK_DEMO') )
|
||||
{
|
||||
$hesk_settings['db_host'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pass'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pfix'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
|
||||
require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php');
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
?>
|
||||
<div class="main__content settings">
|
||||
<div class="settings__status">
|
||||
<h3><?php echo $hesklang['check_status']; ?></h3>
|
||||
<ul class="settings__status_list">
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['v']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates']) {
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true) {
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
} elseif ($latest != -1) {
|
||||
// Is this a beta/dev version?
|
||||
if (strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC')) {
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
} else {
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['phpv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['mysqlv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/hesk_settings.inc.php</div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_writable(HESK_PATH . 'hesk_settings.inc.php')) {
|
||||
$enable_save_settings = 1;
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_settings'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['attach_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['cache_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php require_once(HESK_PATH . 'inc/admin_settings_status.inc.php'); ?>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function hesk_checkFields() {
|
||||
var d=document.form1;
|
||||
@@ -523,89 +423,11 @@ hesk_handle_messages();
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
|
||||
function hesk_checkVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
if ($latest = hesk_getLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $hesk_settings['hesk_version'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // END hesk_checkVersion()
|
||||
|
||||
|
||||
function hesk_getLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://hesk.com/version';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = @file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
|
||||
function hesk_testTheme($return_options = 1) {
|
||||
global $hesk_settings, $hesklang;
|
||||
|
||||
@@ -843,7 +665,7 @@ function hesk_testLanguage($return_options = 0)
|
||||
}
|
||||
|
||||
/* Check if language file is for current version */
|
||||
if (strpos($tmp,'$hesklang[\'team\']') === false)
|
||||
if (strpos($tmp,'$hesklang[\'TIMEAGO_LANG_FILE\']') === false)
|
||||
{
|
||||
$err .= " |----> WRONG VERSION (not ".$hesk_settings['hesk_version'].")\n";
|
||||
}
|
||||
@@ -987,4 +809,3 @@ function hesk_testLanguage($return_options = 0)
|
||||
exit();
|
||||
}
|
||||
} // END hesk_testLanguage()
|
||||
?>
|
||||
|
||||
@@ -54,22 +54,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
// Demo mode? Hide values of sensitive settings
|
||||
if ( defined('HESK_DEMO') )
|
||||
{
|
||||
$hesk_settings['db_host'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pass'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pfix'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
|
||||
require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php');
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
@@ -133,94 +118,9 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') ) {
|
||||
}
|
||||
?>
|
||||
<div class="main__content settings">
|
||||
<div class="settings__status">
|
||||
<h3><?php echo $hesklang['check_status']; ?></h3>
|
||||
<ul class="settings__status_list">
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['v']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates']) {
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true) {
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
} elseif ($latest != -1) {
|
||||
// Is this a beta/dev version?
|
||||
if (strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC')) {
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
} else {
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['phpv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['mysqlv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/hesk_settings.inc.php</div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_writable(HESK_PATH . 'hesk_settings.inc.php')) {
|
||||
$enable_save_settings = 1;
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_settings'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['attach_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['cache_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php require_once(HESK_PATH . 'inc/admin_settings_status.inc.php'); ?>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function hesk_checkFields() {
|
||||
var d = document.form1;
|
||||
@@ -409,6 +309,69 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') ) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$no = $hesk_settings['hide_replies']==0 ? 'checked' : '';
|
||||
$yes = $hesk_settings['hide_replies']>0 ? 'checked' : '';
|
||||
$def = $hesk_settings['hide_replies']==-1 ? 'checked' : '';
|
||||
?>
|
||||
<div class="radio-group">
|
||||
<h5>
|
||||
<span><?php echo $hesklang['hide_replies']; ?></span>
|
||||
<a onclick="hesk_window('<?php echo $help_folder; ?>helpdesk.html#78','400','500')">
|
||||
<div class="tooltype right">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
</h5>
|
||||
<div class="radio-list">
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_hide_replies0" name="s_hide_replies" value="0" <?php echo $no; ?>>
|
||||
<label for="s_hide_replies0"><?php echo $hesklang['hide_replies_no']; ?></label>
|
||||
</div>
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_hide_replies-1" name="s_hide_replies" value="-1" <?php echo $def; ?>>
|
||||
<label for="s_hide_replies-1"><?php echo $hesklang['hide_replies_def']; ?></label>
|
||||
</div>
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_hide_replies1" name="s_hide_replies" value="1" <?php echo $yes; ?>>
|
||||
<label for="s_hide_replies1"><?php echo $hesklang['hide_replies_yes']; ?></label>
|
||||
<div class="form-group short" style="margin-bottom: 0px;">
|
||||
<input type="text" name="s_hide_replies_num" class="form-control" style="margin-left: 12px;" size="5" maxlength="4" value="<?php echo ($hesk_settings['hide_replies'] > 0 ? $hesk_settings['hide_replies'] : '10'); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$no = $hesk_settings['limit_width']==0 ? 'checked' : '';
|
||||
$yes = $hesk_settings['limit_width']>0 ? 'checked' : '';
|
||||
?>
|
||||
<div class="radio-group">
|
||||
<h5>
|
||||
<span><?php echo $hesklang['lwidth']; ?></span>
|
||||
<a onclick="hesk_window('<?php echo $help_folder; ?>helpdesk.html#79','400','500')">
|
||||
<div class="tooltype right">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
</h5>
|
||||
<div class="radio-list">
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_limit_width0" name="s_limit_width" value="0" <?php echo $no; ?>>
|
||||
<label for="s_limit_width0"><?php echo $hesklang['lwidtall']; ?></label>
|
||||
</div>
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_limit_width1" name="s_limit_width" value="1" <?php echo $yes; ?>>
|
||||
<label for="s_limit_width1"><?php echo $hesklang['lwidtpx']; ?></label>
|
||||
<div class="form-group short" style="margin-bottom: 0px;">
|
||||
<input type="text" name="s_limit_width_num" class="form-control" style="margin-left: 12px;" size="5" maxlength="4" value="<?php echo ($hesk_settings['limit_width'] > 0 ? $hesk_settings['limit_width'] : '800'); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="settings__form_block">
|
||||
<h3><?php echo $hesklang['features']; ?></h3>
|
||||
@@ -1270,86 +1233,6 @@ if ($hesk_settings['attachments']['use'] && ! defined('HESK_DEMO') ) {
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
|
||||
function hesk_checkVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
if ($latest = hesk_getLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $hesk_settings['hesk_version'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // END hesk_checkVersion()
|
||||
|
||||
|
||||
function hesk_getLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://hesk.com/version';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = @file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
?>
|
||||
|
||||
@@ -54,116 +54,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
// Demo mode? Hide values of sensitive settings
|
||||
if ( defined('HESK_DEMO') )
|
||||
{
|
||||
$hesk_settings['db_host'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pass'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pfix'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
|
||||
require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php');
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
?>
|
||||
<div class="main__content settings">
|
||||
<div class="settings__status">
|
||||
<h3><?php echo $hesklang['check_status']; ?></h3>
|
||||
<ul class="settings__status_list">
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['v']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates']) {
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true) {
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
} elseif ($latest != -1) {
|
||||
// Is this a beta/dev version?
|
||||
if (strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC')) {
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
} else {
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['phpv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['mysqlv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/hesk_settings.inc.php</div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_writable(HESK_PATH . 'hesk_settings.inc.php')) {
|
||||
$enable_save_settings = 1;
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_settings'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['attach_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['cache_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php require_once(HESK_PATH . 'inc/admin_settings_status.inc.php'); ?>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function hesk_checkFields() {
|
||||
var d = document.form1;
|
||||
@@ -522,82 +422,3 @@ hesk_handle_messages();
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
|
||||
function hesk_checkVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
if ($latest = hesk_getLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $hesk_settings['hesk_version'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // END hesk_checkVersion()
|
||||
|
||||
|
||||
function hesk_getLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://hesk.com/version';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = @file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
?>
|
||||
|
||||
@@ -54,116 +54,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
// Demo mode? Hide values of sensitive settings
|
||||
if ( defined('HESK_DEMO') )
|
||||
{
|
||||
$hesk_settings['db_host'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pass'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pfix'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
|
||||
require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php');
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
?>
|
||||
<div class="main__content settings">
|
||||
<div class="settings__status">
|
||||
<h3><?php echo $hesklang['check_status']; ?></h3>
|
||||
<ul class="settings__status_list">
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['v']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates']) {
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true) {
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
} elseif ($latest != -1) {
|
||||
// Is this a beta/dev version?
|
||||
if (strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC')) {
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
} else {
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['phpv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['mysqlv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/hesk_settings.inc.php</div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_writable(HESK_PATH . 'hesk_settings.inc.php')) {
|
||||
$enable_save_settings = 1;
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_settings'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['attach_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['cache_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php require_once(HESK_PATH . 'inc/admin_settings_status.inc.php'); ?>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function hesk_checkFields() {
|
||||
var d = document.form1;
|
||||
@@ -229,6 +129,32 @@ hesk_handle_messages();
|
||||
</label>
|
||||
<input type="text" class="form-control" name="s_timeformat" maxlength="255" value="<?php echo $hesk_settings['timeformat']; ?>">
|
||||
</div>
|
||||
<div class="radio-group">
|
||||
<h5>
|
||||
<span><?php echo $hesklang['tdis']; ?></span>
|
||||
<a onclick="hesk_window('<?php echo $help_folder; ?>misc.html#64','400','500')">
|
||||
<div class="tooltype right">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
</h5>
|
||||
<?php
|
||||
$on = $hesk_settings['time_display'] ? 'checked="checked"' : '';
|
||||
$off = $hesk_settings['time_display'] ? '' : 'checked="checked"';
|
||||
?>
|
||||
<div class="radio-list">
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_time_display0" name="s_time_display" value="0" <?php echo $off; ?>>
|
||||
<label for="s_time_display0"><?php echo $hesklang['tdisd']; ?></label>
|
||||
</div>
|
||||
<div class="radio-custom">
|
||||
<input type="radio" id="s_time_display1" name="s_time_display" value="1" <?php echo $on; ?>>
|
||||
<label for="s_time_display1"><?php echo $hesklang['tdisa']; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="settings__form_block">
|
||||
<h3><?php echo $hesklang['other']; ?></h3>
|
||||
@@ -350,82 +276,3 @@ hesk_handle_messages();
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
|
||||
function hesk_checkVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
if ($latest = hesk_getLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $hesk_settings['hesk_version'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // END hesk_checkVersion()
|
||||
|
||||
|
||||
function hesk_getLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://hesk.com/version';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = @file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
?>
|
||||
|
||||
@@ -136,6 +136,16 @@ if ($section === 'GENERAL') {
|
||||
$set['max_open'] = hesk_checkMinMax( intval( hesk_POST('s_max_open') ) , 0, 999, 0);
|
||||
$set['new_top'] = empty($_POST['s_new_top']) ? 0 : 1;
|
||||
$set['reply_top'] = empty($_POST['s_reply_top']) ? 0 : 1;
|
||||
$set['hide_replies'] = hesk_checkMinMax( intval( hesk_POST('s_hide_replies') ) , -1, 1, -1);
|
||||
if ($set['hide_replies'] == 1)
|
||||
{
|
||||
$set['hide_replies'] = hesk_checkMinMax( intval( hesk_POST('s_hide_replies_num') ) , 1, 99, 10);
|
||||
}
|
||||
$set['limit_width'] = empty($_POST['s_limit_width']) ? 0 : 1;
|
||||
if ($set['limit_width'])
|
||||
{
|
||||
$set['limit_width'] = hesk_checkMinMax( intval( hesk_POST('s_limit_width_num') ) , 50, 9999, 800);
|
||||
}
|
||||
|
||||
/* --> Features */
|
||||
$set['autologin'] = empty($_POST['s_autologin']) ? 0 : 1;
|
||||
@@ -210,7 +220,7 @@ if ($section === 'GENERAL') {
|
||||
|
||||
foreach ($set['attachments']['allowed_types'] as $ext)
|
||||
{
|
||||
if (strlen($ext) > 1)
|
||||
if (strlen($ext) > 0)
|
||||
{
|
||||
$keep_these[] = '.' . $ext;
|
||||
}
|
||||
@@ -459,6 +469,7 @@ if ($section === 'GENERAL') {
|
||||
$set['timezone'] = 'UTC';
|
||||
}
|
||||
$set['timeformat'] = hesk_input( hesk_POST('s_timeformat') ) or $set['timeformat'] = 'Y-m-d H:i:s';
|
||||
$set['time_display'] = empty($_POST['s_time_display']) ? 0 : 1;
|
||||
|
||||
/* --> Other */
|
||||
$set['ip_whois'] = hesk_input( hesk_POST('s_ip_whois_url', 'https://whois.domaintools.com/{IP}') );
|
||||
@@ -526,6 +537,8 @@ $hesk_settings[\'autoclose\']=' . hesk_getProperty($set, 'autoclose') . ';
|
||||
$hesk_settings[\'max_open\']=' . hesk_getProperty($set, 'max_open') . ';
|
||||
$hesk_settings[\'new_top\']=' . hesk_getProperty($set, 'new_top') . ';
|
||||
$hesk_settings[\'reply_top\']=' . hesk_getProperty($set, 'reply_top') . ';
|
||||
$hesk_settings[\'hide_replies\']=' . hesk_getProperty($set, 'hide_replies') . ';
|
||||
$hesk_settings[\'limit_width\']=' . hesk_getProperty($set, 'limit_width') . ';
|
||||
|
||||
// --> Features
|
||||
$hesk_settings[\'autologin\']=' . hesk_getProperty($set, 'autologin') . ';
|
||||
@@ -668,6 +681,7 @@ $hesk_settings[\'updatedformat\']=' . hesk_getProperty($set, 'updatedformat') .
|
||||
// --> Date & Time
|
||||
$hesk_settings[\'timezone\']=\'' . hesk_getProperty($set, 'timezone') . '\';
|
||||
$hesk_settings[\'timeformat\']=\'' . hesk_getProperty($set, 'timeformat') . '\';
|
||||
$hesk_settings[\'time_display\']=\'' . hesk_getProperty($set, 'time_display') . '\';
|
||||
|
||||
// --> Other
|
||||
$hesk_settings[\'ip_whois\']=\'' . hesk_getProperty($set, 'ip_whois') . '\';
|
||||
@@ -738,7 +752,6 @@ function hesk_getLanguagesArray($returnArray=0)
|
||||
global $hesk_settings, $hesklang;
|
||||
|
||||
/* Get a list of valid emails */
|
||||
$hesk_settings['smtp'] = 0;
|
||||
$valid_emails = array_keys( hesk_validEmails() );
|
||||
|
||||
$dir = HESK_PATH . 'language/';
|
||||
@@ -788,7 +801,7 @@ function hesk_getLanguagesArray($returnArray=0)
|
||||
{
|
||||
$add = 0;
|
||||
}
|
||||
elseif ( ! preg_match('/\$hesklang\[\'team\'\]/', $tmp) )
|
||||
elseif ( ! preg_match('/\$hesklang\[\'TIMEAGO_LANG_FILE\'\]/', $tmp) )
|
||||
{
|
||||
$add = 0;
|
||||
}
|
||||
@@ -933,10 +946,10 @@ function hesk_getProperty($set, $property) {
|
||||
}
|
||||
|
||||
if (is_array($hesk_settings[$property])) {
|
||||
return "'" . implode('\',\'', $hesk_settings[$property]) . "'";
|
||||
return "'" . implode('\',\'', hesk_slashArray($hesk_settings[$property])) . "'";
|
||||
}
|
||||
|
||||
return isset($set[$property]) ? $set[$property] : $hesk_settings[$property];
|
||||
return isset($set[$property]) ? $set[$property] : addslashes($hesk_settings[$property]);
|
||||
}
|
||||
|
||||
function hesk_getLanguageForFile($set) {
|
||||
|
||||
@@ -54,116 +54,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
// Demo mode? Hide values of sensitive settings
|
||||
if ( defined('HESK_DEMO') )
|
||||
{
|
||||
$hesk_settings['db_host'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pass'] = $hesklang['hdemo'];
|
||||
$hesk_settings['db_pfix'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['smtp_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['pop3_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_host_name'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_user'] = $hesklang['hdemo'];
|
||||
$hesk_settings['imap_password'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
|
||||
$hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
|
||||
require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php');
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
?>
|
||||
<div class="main__content settings">
|
||||
<div class="settings__status">
|
||||
<h3><?php echo $hesklang['check_status']; ?></h3>
|
||||
<ul class="settings__status_list">
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['v']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates']) {
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true) {
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
} elseif ($latest != -1) {
|
||||
// Is this a beta/dev version?
|
||||
if (strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC')) {
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
} else {
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?><br><a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
} else {
|
||||
?> - <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['phpv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name"><?php echo $hesklang['mysqlv']; ?></div>
|
||||
<div class="list--status"><?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/hesk_settings.inc.php</div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_writable(HESK_PATH . 'hesk_settings.inc.php')) {
|
||||
$enable_save_settings = 1;
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_settings'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['attach_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_attdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="list--name">/<?php echo $hesk_settings['cache_dir']; ?></div>
|
||||
<div class="list--status">
|
||||
<?php
|
||||
if (is_dir(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
echo '<span class="success">'.$hesklang['exists'].'</span>, ';
|
||||
if (is_writable(HESK_PATH . $hesk_settings['cache_dir'])) {
|
||||
$enable_use_attachments = 1;
|
||||
echo '<span class="success">'.$hesklang['writable'].'</span>';
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
} else {
|
||||
echo '<span class="error">'.$hesklang['no_exists'].'</span>, <span class="error">'.$hesklang['not_writable'].'</span><br>'.$hesklang['e_cdir'];
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php require_once(HESK_PATH . 'inc/admin_settings_status.inc.php'); ?>
|
||||
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
function hesk_checkFields() {
|
||||
var d = document.form1;
|
||||
@@ -277,82 +177,3 @@ hesk_handle_messages();
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
|
||||
function hesk_checkVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
if ($latest = hesk_getLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $hesk_settings['hesk_version'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // END hesk_checkVersion()
|
||||
|
||||
|
||||
function hesk_getLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://hesk.com/version';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = @file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['cache_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
?>
|
||||
|
||||
@@ -55,8 +55,12 @@ require_once(HESK_PATH . 'inc/statuses.inc.php');
|
||||
|
||||
$_SERVER['PHP_SELF'] = 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999);
|
||||
|
||||
/* We will need timer function */
|
||||
// We will need some extra functions
|
||||
define('TIMER',1);
|
||||
define('BACK2TOP',1);
|
||||
if ($hesk_settings['time_display']) {
|
||||
define('TIMEAGO',1);
|
||||
}
|
||||
|
||||
/* Get ticket info */
|
||||
$res = hesk_dbQuery("SELECT `t1`.* , `t2`.name AS `repliername` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` AS `t1` LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."users` AS `t2` ON `t1`.`replierid` = `t2`.`id` WHERE `trackid`='".hesk_dbEscape($trackingID)."' LIMIT 1");
|
||||
@@ -606,7 +610,7 @@ $options = array(
|
||||
);
|
||||
?>
|
||||
<div class="main__content ticket">
|
||||
<div class="ticket__body">
|
||||
<div class="ticket__body" <?php echo ($hesk_settings['limit_width'] ? 'style="max-width:'.$hesk_settings['limit_width'].'px"' : ''); ?>>
|
||||
<?php
|
||||
/* Reply form on top? */
|
||||
if ($can_reply && $hesk_settings['reply_top'] == 1)
|
||||
@@ -623,7 +627,7 @@ $options = array(
|
||||
$i = 1;
|
||||
}
|
||||
?>
|
||||
<article class="ticket__body_block ">
|
||||
<article class="ticket__body_block original-message">
|
||||
<h3>
|
||||
<?php if ($ticket['archive']): ?>
|
||||
<div class="tooltype right out-close">
|
||||
@@ -655,7 +659,7 @@ $options = array(
|
||||
</h3>
|
||||
<div class="block--head">
|
||||
<div class="contact">
|
||||
<span><?php echo $hesklang['contact']; ?></span>
|
||||
<span><?php echo $hesklang['contact']; ?>:</span>
|
||||
<div class="dropdown left out-close">
|
||||
<label>
|
||||
<span><?php echo $ticket['name']; ?></span>
|
||||
@@ -743,7 +747,7 @@ $options = array(
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<time class="date"><?php echo hesk_date($ticket['dt'], true); ?></time>
|
||||
<time class="timeago tooltip" datetime="<?php echo date("c", strtotime($ticket['dt'])) ; ?>" title="<?php echo hesk_date($ticket['dt'], true); ?>"><?php echo hesk_date($ticket['dt'], true); ?></time>
|
||||
</div>
|
||||
<?php
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
@@ -849,21 +853,22 @@ $options = array(
|
||||
<div class="note">
|
||||
<div class="note__head">
|
||||
<div class="name">
|
||||
<span><?php echo $hesklang['noteby']; ?>:</span>
|
||||
<?php echo $hesklang['noteby']; ?>
|
||||
<b><?php echo ($note['name'] ? $note['name'] : $hesklang['e_udel']); ?></b>
|
||||
<time><?php echo hesk_date($note['dt'], true); ?></time>
|
||||
»
|
||||
<time class="timeago tooltip" datetime="<?php echo date("c", strtotime($note['dt'])) ; ?>" title="<?php echo hesk_date($note['dt'], true); ?>"><?php echo hesk_date($note['dt'], true); ?></time>
|
||||
</div>
|
||||
<?php
|
||||
if ($can_del_notes || $note['who'] == $_SESSION['id'])
|
||||
{
|
||||
?>
|
||||
<div class="actions">
|
||||
<a href="edit_note.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000,99999); ?>&note=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>" title="<?php echo $hesklang['ednote']; ?>">
|
||||
<a class="tooltip" href="edit_note.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000,99999); ?>&note=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>" title="<?php echo $hesklang['ednote']; ?>">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="admin_ticket.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000,99999); ?>&delnote=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>" onclick="return hesk_confirmExecute('<?php echo hesk_makeJsString($hesklang['delnote']).'?'; ?>');" title="<?php echo $hesklang['delnote']; ?>">
|
||||
<a class="tooltip" href="admin_ticket.php?track=<?php echo $trackingID; ?>&Refresh=<?php echo mt_rand(10000,99999); ?>&delnote=<?php echo $note['id']; ?>&token=<?php hesk_token_echo(); ?>" onclick="return hesk_confirmExecute('<?php echo hesk_makeJsString($hesklang['delnote']).'?'; ?>');" title="<?php echo $hesklang['delnote']; ?>">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
@@ -874,7 +879,7 @@ $options = array(
|
||||
<div class="note__description">
|
||||
<p><?php echo $note['message']; ?></p>
|
||||
</div>
|
||||
<div class="note__attachments">
|
||||
<div class="note__attachments" style="color: #9c9c9c;">
|
||||
<?php
|
||||
// Attachments
|
||||
if ( $hesk_settings['attachments']['use'] && strlen($note['attachments']) )
|
||||
@@ -893,30 +898,30 @@ $options = array(
|
||||
// If this is the last attachment and no message, show "delete ticket" link
|
||||
if ($num == 1 && strlen($note['message']) == 0)
|
||||
{
|
||||
echo '<a href="admin_ticket.php?delnote='.$note['id'].'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');" title="'.$hesklang['dela'].'">
|
||||
<svg class="icon icon-delete">
|
||||
echo '<a class="tooltip" data-ztt_vertical_offset="0" style="margin-right: 8px;" href="admin_ticket.php?delnote='.$note['id'].'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');" title="'.$hesklang['dela'].'">
|
||||
<svg class="icon icon-delete" style="text-decoration: none; vertical-align: text-bottom;">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
</a> ';
|
||||
</a> »';
|
||||
}
|
||||
// Show "delete attachment" link
|
||||
else
|
||||
{
|
||||
echo '<a href="admin_ticket.php?delatt='.$att_id.'&note='.$note['id'].'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');" title="'.$hesklang['dela'].'">
|
||||
<svg class="icon icon-delete">
|
||||
echo '<a class="tooltip" data-ztt_vertical_offset="0" style="margin-right: 8px;" href="admin_ticket.php?delatt='.$att_id.'&note='.$note['id'].'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');" title="'.$hesklang['dela'].'">
|
||||
<svg class="icon icon-delete" style="vertical-align: text-bottom;">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
</a> ';
|
||||
</a> »';
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
<a href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'" title="'.$hesklang['dnl'].' '.$att_name.'">
|
||||
<svg class="icon icon-attach">
|
||||
<svg class="icon icon-attach" style="vertical-align: text-bottom;">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-attach"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'" class="underline">'.$att_name.'</a><br>
|
||||
<a class="underline" href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'" title="'.$hesklang['dnl'].' '.$att_name.'">'.$att_name.'</a><br>
|
||||
';
|
||||
}
|
||||
}
|
||||
@@ -928,7 +933,7 @@ $options = array(
|
||||
?>
|
||||
<div id="notesform" style="display:<?php echo isset($_SESSION['note_message']) ? 'block' : 'none'; ?>; margin-top: 20px">
|
||||
<form method="post" action="admin_ticket.php" class="form" enctype="multipart/form-data">
|
||||
<textarea class="form-control" name="notemsg" rows="6" cols="60" style="height: auto"><?php echo isset($_SESSION['note_message']) ? stripslashes(hesk_input($_SESSION['note_message'])) : ''; ?></textarea>
|
||||
<textarea class="form-control" name="notemsg" rows="6" cols="60" style="height: auto; resize: vertical; transition: none;"><?php echo isset($_SESSION['note_message']) ? stripslashes(hesk_input($_SESSION['note_message'])) : ''; ?></textarea>
|
||||
<?php
|
||||
// attachments
|
||||
if ($hesk_settings['attachments']['use'])
|
||||
@@ -969,6 +974,22 @@ $options = array(
|
||||
{
|
||||
hesk_printReplyForm();
|
||||
}
|
||||
|
||||
$random=rand(10000,99999);
|
||||
|
||||
// Prepare one-click action to open/resolve a ticket
|
||||
$status_action = '';
|
||||
if ($ticket['status'] == 3)
|
||||
{
|
||||
if ($can_reply)
|
||||
{
|
||||
$status_action = '[<a href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['open_action'].'</a>]';
|
||||
}
|
||||
}
|
||||
elseif ($can_resolve)
|
||||
{
|
||||
$status_action = '[<a href="change_status.php?track='.$trackingID.'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['close_action'].'</a>]';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="ticket__params">
|
||||
@@ -976,31 +997,49 @@ $options = array(
|
||||
<?php echo hesk_getAdminButtons(); ?>
|
||||
</section>
|
||||
<section class="params--block params">
|
||||
<?php if ($can_reply): ?>
|
||||
<form action="change_status.php" method="post">
|
||||
<div class="row">
|
||||
<div class="title"><label for="select_s"><?php echo $hesklang['chngstatus']; ?>:</label></div>
|
||||
<div class="value dropdown-select center out-close">
|
||||
<!-- Ticket status -->
|
||||
<div class="row ts" id="ticket-status-div" <?php echo strlen($status_action) ? 'style="margin-bottom: 10px;"' : ''; ?>>
|
||||
<div class="title"><label for="select_s"><?php echo $hesklang['ticket_status']; ?>:</label></div>
|
||||
<?php if ($can_reply): ?>
|
||||
<div class="value dropdown-select center out-close">
|
||||
<form action="change_status.php" method="post">
|
||||
<select id="select_s" name="s" onchange="this.form.submit()">
|
||||
<?php echo hesk_get_status_select('', $can_resolve, $ticket['status']); ?>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<div class="value center">
|
||||
<?php echo hesk_get_admin_ticket_status($ticket['status']); ?>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Ticket one click open/resolve -->
|
||||
<?php if (strlen($status_action)): ?>
|
||||
<div class="row">
|
||||
<div class="title"> </div>
|
||||
<div class="value center out-close">
|
||||
<?php echo $status_action; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if (strlen($categories_options) && ($can_change_cat || $can_change_own_cat)):
|
||||
?>
|
||||
<form action="move_category.php" method="post">
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<label for="select_category">
|
||||
<?php echo $hesklang['move_to_catgory']; ?>:
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Ticket category -->
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<label for="select_category">
|
||||
<?php echo $hesklang['category']; ?>:
|
||||
</label>
|
||||
</div>
|
||||
<?php if (strlen($categories_options) && ($can_change_cat || $can_change_own_cat)): ?>
|
||||
<form action="move_category.php" method="post">
|
||||
<div class="value dropdown-select center out-close">
|
||||
<select id="select_category" name="category" onchange="this.form.submit()">
|
||||
<?php echo $categories_options; ?>
|
||||
@@ -1008,66 +1047,101 @@ $options = array(
|
||||
</div>
|
||||
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<div class="value center out-close">
|
||||
<?php echo $category['name']; ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
endif;
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
if ($can_reply):
|
||||
?>
|
||||
<form action="priority.php" method="post">
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<label for="select_priority">
|
||||
<?php echo $hesklang['change_priority']; ?>:
|
||||
</label>
|
||||
</div>
|
||||
<!-- Ticket priority -->
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<label for="select_priority">
|
||||
<?php echo $hesklang['priority']; ?>:
|
||||
</label>
|
||||
</div>
|
||||
<?php if ($can_reply): ?>
|
||||
<form action="priority.php" method="post">
|
||||
<div class="dropdown-select center out-close priority">
|
||||
<select id="select_priority" name="priority" onchange="this.form.submit()">
|
||||
<?php echo implode('',$options); ?>
|
||||
<?php echo implode('', $options); ?>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<div class="value center out-close">
|
||||
<?php if ($ticket['priority'] == 0): ?>
|
||||
<span class="priority0"><?php echo $hesklang['critical']; ?></span>
|
||||
<?php elseif ($ticket['priority'] == 1): ?>
|
||||
<span class="priority1"><?php echo $hesklang['high']; ?></span>
|
||||
<?php elseif ($ticket['priority'] == 2): ?>
|
||||
<span class="priority2"><?php echo $hesklang['medium']; ?></span>
|
||||
<?php else: ?>
|
||||
<span class="priority3"><?php echo $hesklang['low']; ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
endif;
|
||||
if (hesk_checkPermission('can_assign_others',0)):
|
||||
?>
|
||||
<form action="assign_owner.php" method="post">
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<label for="select_owner">
|
||||
<?php echo $hesklang['asst']; ?>:
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Ticket assigned to -->
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<label for="select_owner">
|
||||
<?php echo $hesklang['assigned_to']; ?>:
|
||||
</label>
|
||||
</div>
|
||||
<?php if (hesk_checkPermission('can_assign_others',0)): ?>
|
||||
<form action="assign_owner.php" method="post">
|
||||
<div class="value dropdown-select center out-close">
|
||||
<select id="select_owner" name="owner" onchange="this.form.submit()">
|
||||
<option value="-1"> > <?php echo $hesklang['unas']; ?> < </option>
|
||||
<?php
|
||||
if ($ticket['owner'])
|
||||
{
|
||||
echo '<option value="-1"> > '.$hesklang['unas'].' < </option>';
|
||||
}
|
||||
|
||||
foreach ($admins as $k=>$v)
|
||||
{
|
||||
echo '<option value="'.$k.'" '.($k == $ticket['owner'] ? 'selected' : '').'>'.$v.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
<?php
|
||||
if (!$ticket['owner'])
|
||||
{
|
||||
echo '<input type="hidden" name="unassigned" value="1">';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<input type="hidden" name="track" value="<?php echo $trackingID; ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<div class="value center out-close">
|
||||
<?php
|
||||
if (!$ticket['owner'])
|
||||
{
|
||||
echo '<input type="hidden" name="unassigned" value="1">';
|
||||
}
|
||||
echo isset($admins[$ticket['owner']]) ? '<b>'.$admins[$ticket['owner']].'</b>' : '<b>'.$hesklang['unas'].'</b>';
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Ticket one click assign to self -->
|
||||
<?php if (!$ticket['owner'] && $can_assign_self): ?>
|
||||
<div class="row">
|
||||
<div class="title"> </div>
|
||||
<div class="value center out-close">
|
||||
<?php echo '[<a class="link" href="assign_owner.php?track='.$trackingID.'&owner='.$_SESSION['id'].'&token='.hesk_token_echo(0).'&unassigned=1">'.$hesklang['asss'].'</a>]'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</section>
|
||||
<section class="params--block details accordion visible">
|
||||
<h4 class="accordion-title">
|
||||
@@ -1096,89 +1170,18 @@ $options = array(
|
||||
<div class="title"><?php echo $hesklang['created_on']; ?>:</div>
|
||||
<div class="value"><?php echo hesk_date($ticket['dt'], true); ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['ticket_status']; ?>:</div>
|
||||
<div class="value">
|
||||
<?php
|
||||
$random=rand(10000,99999);
|
||||
|
||||
if ($ticket['status'] == 3)
|
||||
{
|
||||
if ($can_reply)
|
||||
{
|
||||
$status_action = ' [<a class="link" href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['open_action'].'</a>] ';
|
||||
}
|
||||
}
|
||||
elseif ($can_resolve)
|
||||
{
|
||||
$status_action = ' [<a class="link" href="change_status.php?track='.$trackingID.'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'">'.$hesklang['close_action'].'</a>] ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$status_action = '';
|
||||
}
|
||||
|
||||
echo hesk_get_admin_ticket_status($ticket['status'], $status_action);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['last_update']; ?>:</div>
|
||||
<div class="value"><?php echo hesk_date($ticket['lastchange'], true); ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['category']; ?>:</div>
|
||||
<div class="value"><?php echo $category['name']; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['replies']; ?>:</div>
|
||||
<div class="value"><?php echo $ticket['replies']; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['priority']; ?>:</div>
|
||||
<div class="value">
|
||||
<?php
|
||||
$options = array(
|
||||
0 => '<option value="0">'.$hesklang['critical'].'</option>',
|
||||
1 => '<option value="1">'.$hesklang['high'].'</option>',
|
||||
2 => '<option value="2">'.$hesklang['medium'].'</option>',
|
||||
3 => '<option value="3">'.$hesklang['low'].'</option>'
|
||||
);
|
||||
|
||||
switch ($ticket['priority'])
|
||||
{
|
||||
case 0:
|
||||
echo '<span class="critical">'.$hesklang['critical'].'</span>';
|
||||
unset($options[0]);
|
||||
break;
|
||||
case 1:
|
||||
echo '<span class="important">'.$hesklang['high'].'</span>';
|
||||
unset($options[1]);
|
||||
break;
|
||||
case 2:
|
||||
echo '<span class="medium">'.$hesklang['medium'].'</span>';
|
||||
unset($options[2]);
|
||||
break;
|
||||
default:
|
||||
echo $hesklang['low'];
|
||||
unset($options[3]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['last_replier']; ?>:</div>
|
||||
<div class="value"><?php echo $ticket['repliername']; ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="title"><?php echo $hesklang['owner']; ?>:</div>
|
||||
<div class="value">
|
||||
<?php
|
||||
echo isset($admins[$ticket['owner']]) ? '<b>'.$admins[$ticket['owner']].'</b>' :
|
||||
($can_assign_self ? '<b>'.$hesklang['unas'].'</b>'.' [<a class="link" href="assign_owner.php?track='.$trackingID.'&owner='.$_SESSION['id'].'&token='.hesk_token_echo(0).'&unassigned=1">'.$hesklang['asss'].'</a>]' : '<b>'.$hesklang['unas'].'</b>');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($hesk_settings['time_worked'])
|
||||
{
|
||||
@@ -1235,7 +1238,7 @@ $options = array(
|
||||
/* Display ticket history */
|
||||
if (strlen($ticket['history']))
|
||||
{
|
||||
$history_pieces = explode('</li>', $ticket['history']);
|
||||
$history_pieces = explode('</li>', $ticket['history'], -1);
|
||||
|
||||
?>
|
||||
<section class="params--block history accordion">
|
||||
@@ -1264,12 +1267,16 @@ $options = array(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="#" class="back-to-top"><?php echo $hesklang['btt']; ?></a>
|
||||
|
||||
<?php
|
||||
/* Clear unneeded session variables */
|
||||
hesk_cleanSessionVars('ticket_message');
|
||||
hesk_cleanSessionVars('time_worked');
|
||||
hesk_cleanSessionVars('note_message');
|
||||
|
||||
$hesk_settings['print_status_select_box_jquery'] = true;
|
||||
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
|
||||
|
||||
@@ -1288,7 +1295,7 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
|
||||
/* List attachments */
|
||||
$att=explode(',',substr($attachments, 0, -1));
|
||||
echo '<div class="block--uploads" style="display: block">';
|
||||
echo '<div class="block--uploads" style="display: block; color: #9c9c9c;">';
|
||||
foreach ($att as $myatt)
|
||||
{
|
||||
list($att_id, $att_name) = explode('#', $myatt);
|
||||
@@ -1296,20 +1303,20 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
/* Can edit and delete tickets? */
|
||||
if ($can_edit && $can_delete)
|
||||
{
|
||||
echo '<a title="'.$hesklang['dela'].'" href="admin_ticket.php?delatt='.$att_id.'&reply='.$reply.'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');">
|
||||
<svg class="icon icon-delete">
|
||||
echo '<a class="tooltip" data-ztt_vertical_offset="0" style="margin-right: 8px;" title="'.$hesklang['dela'].'" href="admin_ticket.php?delatt='.$att_id.'&reply='.$reply.'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');">
|
||||
<svg class="icon icon-delete" style="width: 16px; height: 16px; vertical-align: text-bottom;">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
</a> ';
|
||||
</a> »';
|
||||
}
|
||||
|
||||
echo '
|
||||
<a title="'.$hesklang['dnl'].'" href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'">
|
||||
<svg class="icon icon-attach">
|
||||
<a title="'.$hesklang['dnl'].' '.$att_name.'" href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'">
|
||||
<svg class="icon icon-attach" style="width: 16px; height: 16px; margin-right: 0px; vertical-align: text-bottom;">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-attach"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'" class="underline">'.$att_name.'</a><br />
|
||||
<a class="underline" title="'.$hesklang['dnl'].' '.$att_name.'" href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'">'.$att_name.'</a><br />
|
||||
';
|
||||
}
|
||||
echo '</div>';
|
||||
@@ -1329,8 +1336,8 @@ function hesk_getAdminButtons($isReply=0,$white=1)
|
||||
{
|
||||
$tmp = $isReply ? '&reply='.$reply['id'] : '';
|
||||
if ($isReply) {
|
||||
$buttons['more'][] = '
|
||||
<a id="editticket" href="edit_post.php?track='.$trackingID.$tmp.'" title="'.$hesklang['btn_edit'].'">
|
||||
$buttons['more']['edit'] = '
|
||||
<a id="editreply'.$reply['id'].'" href="edit_post.php?track='.$trackingID.$tmp.'" title="'.$hesklang['btn_edit'].'" style="margin-right: 15px">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="'. HESK_PATH . 'img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
@@ -1500,10 +1507,14 @@ function hesk_getAdminButtons($isReply=0,$white=1)
|
||||
</label>';
|
||||
}
|
||||
|
||||
$button_code .= '
|
||||
<div class="'.$more_class.'dropdown right out-close">
|
||||
'.$label.'
|
||||
<ul class="dropdown-list">';
|
||||
$button_code .= '<div class="'.$more_class.'dropdown right out-close">';
|
||||
if (isset($button['edit']))
|
||||
{
|
||||
$button_code .= $button['edit'];
|
||||
unset($button['edit']);
|
||||
}
|
||||
|
||||
$button_code .= $label.'<ul class="dropdown-list">';
|
||||
|
||||
foreach ($button as $sub_button) {
|
||||
$button_code .= '<li>'.$sub_button.'</li>';
|
||||
@@ -1561,7 +1572,7 @@ function print_form()
|
||||
|
||||
|
||||
function hesk_printTicketReplies() {
|
||||
global $hesklang, $hesk_settings, $result, $reply;
|
||||
global $hesklang, $hesk_settings, $result, $reply, $ticket;
|
||||
|
||||
$i = $hesk_settings['new_top'] ? 0 : 1;
|
||||
|
||||
@@ -1577,26 +1588,48 @@ function hesk_printTicketReplies() {
|
||||
$i = 0;
|
||||
while ($reply = hesk_dbFetchAssoc($result)) {
|
||||
$replies[] = $reply;
|
||||
if ($reply['staffid']) {
|
||||
if ($reply['staffid'] && ( ! $hesk_settings['new_top'] || $last_staff_reply_index === -1)) {
|
||||
$last_staff_reply_index = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Hide ticket replies?
|
||||
$i = 0;
|
||||
foreach ($replies as $reply) {
|
||||
if ($hesk_settings['new_top']) {
|
||||
if ($i < $last_staff_reply_index) {
|
||||
$displayed_replies[] = $reply;
|
||||
// Show the last staff reply and any subsequent customer replies
|
||||
if ($hesk_settings['hide_replies'] == -1) {
|
||||
if ($hesk_settings['new_top']) {
|
||||
if ($i <= $last_staff_reply_index) {
|
||||
$displayed_replies[] = $reply;
|
||||
} else {
|
||||
$collapsed_replies[] = $reply;
|
||||
}
|
||||
} else {
|
||||
$collapsed_replies[] = $reply;
|
||||
if ($i < $last_staff_reply_index) {
|
||||
$collapsed_replies[] = $reply;
|
||||
} else {
|
||||
$displayed_replies[] = $reply;
|
||||
}
|
||||
}
|
||||
// Hide all replies except the last X
|
||||
} elseif ($hesk_settings['hide_replies'] > 0) {
|
||||
if ($hesk_settings['new_top']) {
|
||||
if ($i >= $hesk_settings['hide_replies']) {
|
||||
$collapsed_replies[] = $reply;
|
||||
} else {
|
||||
$displayed_replies[] = $reply;
|
||||
}
|
||||
} else {
|
||||
if ($i < ($ticket['replies'] - $hesk_settings['hide_replies'])) {
|
||||
$collapsed_replies[] = $reply;
|
||||
} else {
|
||||
$displayed_replies[] = $reply;
|
||||
}
|
||||
}
|
||||
// Never, always show all replies
|
||||
} else {
|
||||
if ($i < $last_staff_reply_index) {
|
||||
$collapsed_replies[] = $reply;
|
||||
} else {
|
||||
$displayed_replies[] = $reply;
|
||||
}
|
||||
$displayed_replies[] = $reply;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
@@ -1622,10 +1655,11 @@ function hesk_printTicketReplies() {
|
||||
<article class="ticket__body_block <?php echo $reply['staffid'] ? 'response' : ''; ?>">
|
||||
<div class="block--head">
|
||||
<div class="contact">
|
||||
<span><?php echo $hesklang['contact'] ?>:</span>
|
||||
<?php echo $hesklang['reply_by']; ?>
|
||||
<b><?php echo $reply['name']; ?></b>
|
||||
»
|
||||
<time class="timeago tooltip" datetime="<?php echo date("c", strtotime($reply['dt'])) ; ?>" title="<?php echo hesk_date($reply['dt'], true); ?>"><?php echo hesk_date($reply['dt'], true); ?></time>
|
||||
</div>
|
||||
<time class="date"><?php echo hesk_date($reply['dt'], true); ?></time>
|
||||
<?php echo hesk_getAdminButtons(1, $i); ?>
|
||||
</div>
|
||||
<div class="block--description">
|
||||
@@ -1665,10 +1699,11 @@ function hesk_printTicketReplies() {
|
||||
<article class="ticket__body_block <?php echo $reply['staffid'] ? 'response' : ''; ?>">
|
||||
<div class="block--head">
|
||||
<div class="contact">
|
||||
<span><?php echo $hesklang['contact'] ?>:</span>
|
||||
<?php echo $hesklang['reply_by']; ?>
|
||||
<b><?php echo $reply['name']; ?></b>
|
||||
»
|
||||
<time class="timeago tooltip" datetime="<?php echo date("c", strtotime($reply['dt'])) ; ?>" title="<?php echo hesk_date($reply['dt'], true); ?>"><?php echo hesk_date($reply['dt'], true); ?></time>
|
||||
</div>
|
||||
<time class="date"><?php echo $reply['dt']; ?></time>
|
||||
<?php echo hesk_getAdminButtons(1,$i); ?>
|
||||
</div>
|
||||
<div class="block--description">
|
||||
@@ -1722,10 +1757,11 @@ function hesk_printTicketReplies() {
|
||||
<article class="ticket__body_block <?php echo $reply['staffid'] ? 'response' : ''; ?>">
|
||||
<div class="block--head">
|
||||
<div class="contact">
|
||||
<span><?php echo $hesklang['contact'] ?>:</span>
|
||||
<?php echo $hesklang['reply_by']; ?>
|
||||
<b><?php echo $reply['name']; ?></b>
|
||||
»
|
||||
<time class="timeago tooltip" datetime="<?php echo date("c", strtotime($reply['dt'])) ; ?>" title="<?php echo hesk_date($reply['dt'], true); ?>"><?php echo hesk_date($reply['dt'], true); ?></time>
|
||||
</div>
|
||||
<time class="date"><?php echo hesk_date($reply['dt'], true); ?></time>
|
||||
<?php echo hesk_getAdminButtons(1, $i); ?>
|
||||
</div>
|
||||
<div class="block--description">
|
||||
@@ -1776,21 +1812,22 @@ function hesk_printReplyForm() {
|
||||
<!-- START REPLY FORM -->
|
||||
<article class="ticket__body_block">
|
||||
<form method="post" class="form" action="admin_reply_ticket.php" enctype="multipart/form-data" name="form1" onsubmit="force_stop();return true;">
|
||||
<div style="margin: -24px -24px 16px -16px">
|
||||
<?php
|
||||
/* Ticket assigned to someone else? */
|
||||
if ($ticket['owner'] && $ticket['owner'] != $_SESSION['id'] && isset($admins[$ticket['owner']])) {
|
||||
hesk_show_notice($hesklang['nyt'] . ' ' . $admins[$ticket['owner']]);
|
||||
}
|
||||
|
||||
/* Ticket locked? */
|
||||
if ($ticket['locked']) {
|
||||
hesk_show_notice($hesklang['tislock']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
/* Ticket assigned to someone else? */
|
||||
if ($ticket['owner'] && $ticket['owner'] != $_SESSION['id'] && isset($admins[$ticket['owner']])) {
|
||||
hesk_show_notice($hesklang['nyt'] . ' ' . $admins[$ticket['owner']]);
|
||||
}
|
||||
|
||||
/* Ticket locked? */
|
||||
if ($ticket['locked']) {
|
||||
hesk_show_notice($hesklang['tislock']);
|
||||
}
|
||||
|
||||
if ($hesk_settings['time_worked'] && strlen($can_options)) {
|
||||
?>
|
||||
<div class="time-and-canned">
|
||||
<?php
|
||||
}
|
||||
// Track time worked?
|
||||
if ($hesk_settings['time_worked']) {
|
||||
?>
|
||||
@@ -1804,12 +1841,12 @@ function hesk_printReplyForm() {
|
||||
<input type="text" class="form-control short" name="time_worked" id="time_worked" size="10" value="<?php echo ( isset($_SESSION['time_worked']) ? hesk_getTime($_SESSION['time_worked']) : '00:00:00'); ?>" />
|
||||
</div>
|
||||
|
||||
<a href="javascript:" id="pause_btn" title="<?php echo $hesklang['start']; ?>">
|
||||
<a href="javascript:" class="tooltip" id="pause_btn" title="<?php echo $hesklang['start']; ?>">
|
||||
<svg class="icon icon-pause">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-pause"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="javascript:" id="reset_btn" title="<?php echo $hesklang['reset']; ?>">
|
||||
<a href="javascript:" class="tooltip" id="reset_btn" title="<?php echo $hesklang['reset']; ?>">
|
||||
<svg class="icon icon-refresh">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-refresh"></use>
|
||||
</svg>
|
||||
@@ -1845,31 +1882,51 @@ function hesk_printReplyForm() {
|
||||
if (strlen($can_options))
|
||||
{
|
||||
?>
|
||||
<div class="modal canned-responses rename-category">
|
||||
<div class="modal__body">
|
||||
<h3><?php echo $hesklang['saved_replies']; ?></h3>
|
||||
<div class="modal__description form">
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['select_saved']; ?></label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="saved_replies" onchange="setMessage(this.value)">
|
||||
<option value="0"> - <?php echo $hesklang['select_empty']; ?> - </option>
|
||||
<?php echo $can_options; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<section class="block--timer canned-options">
|
||||
<div class="canned-header">
|
||||
<?php echo $hesklang['saved_replies']; ?>
|
||||
</div>
|
||||
<div class="options" style="text-align: left">
|
||||
<div>
|
||||
<div class="radio-custom">
|
||||
<input type="radio" name="mode" id="modeadd"
|
||||
value="1" checked>
|
||||
<label for="modeadd">
|
||||
<?php echo $hesklang['madd']; ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="modal__buttons">
|
||||
<button class="btn btn-border" ripple="ripple" data-action="cancel"><?php echo $hesklang['close_button_text']; ?></button>
|
||||
<div class="radio-custom">
|
||||
<input type="radio" name="mode" id="moderep"
|
||||
value="0">
|
||||
<label for="moderep">
|
||||
<?php echo $hesklang['mrep']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['select_saved']; ?></label>
|
||||
<select name="saved_replies" id="saved_replies" onchange="setMessage(this.value)">
|
||||
<option value="0"> - <?php echo $hesklang['select_empty']; ?> - </option>
|
||||
<?php echo $can_options; ?>
|
||||
</select>
|
||||
<script>
|
||||
$('#saved_replies').selectize();
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($hesk_settings['time_worked'] && strlen($can_options)) {
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="block--message">
|
||||
<span id="HeskMsg"><textarea class="textarea-scrollbar scrollbar-outer placeholder-href" name="message" id="message"><?php
|
||||
<div class="block--message" id="message-block">
|
||||
<textarea name="message" id="message" placeholder="<?php echo $hesklang['type_your_message']; ?>"><?php
|
||||
|
||||
// Do we have any message stored in session?
|
||||
if ( isset($_SESSION['ticket_message']) )
|
||||
@@ -1886,18 +1943,8 @@ function hesk_printReplyForm() {
|
||||
}
|
||||
}
|
||||
|
||||
?></textarea></span>
|
||||
<div class="placeholder">
|
||||
<?php
|
||||
if ($can_options) {
|
||||
$link = '<a href="javascript:" data-modal=".canned-responses">'.$hesklang['reply_from_template'].'</a>';
|
||||
echo sprintf($hesklang['type_your_message_or_reply_from_template'], $link);
|
||||
} else {
|
||||
echo $hesklang['type_your_message'];
|
||||
}
|
||||
?>
|
||||
?></textarea>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
/* attachments */
|
||||
@@ -1930,7 +1977,6 @@ function hesk_printReplyForm() {
|
||||
if (empty($ticket['owner']))
|
||||
{
|
||||
echo '<input type="checkbox" id="assign_self" name="assign_self" value="1" checked="checked">';
|
||||
echo '<label for="assign_self">'.$hesklang['asss2'].'</label>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1977,7 +2023,7 @@ function hesk_printReplyForm() {
|
||||
<input type="hidden" id="submit_as_name" value="1" name="">
|
||||
<div class="submit-us dropdown-select out-close" data-value="">
|
||||
<select onchange="document.getElementById('submit_as_name').name = this.value;this.form.submit()">
|
||||
<option value="" selected>Submit as</option>
|
||||
<option value="" selected><?php echo rtrim($hesklang['submit_as'], ':'); ?></option>
|
||||
<option value="submit_as_customer"><?php echo $hesklang['sasc']; ?></option>
|
||||
<?php if ($can_resolve): ?>
|
||||
<option value="submit_as_resolved"><?php echo $hesklang['closed']; ?></option>
|
||||
@@ -2041,8 +2087,12 @@ function hesk_printCanned()
|
||||
|
||||
if (myMsg == '')
|
||||
{
|
||||
document.getElementById('message').value = '';
|
||||
$('.ticket .block--message .placeholder').click();
|
||||
if (document.form1.mode[1].checked)
|
||||
{
|
||||
document.getElementById('message').value = '';
|
||||
$('.ticket .block--message .placeholder').click();
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2063,12 +2113,21 @@ function hesk_printCanned()
|
||||
|
||||
if (document.getElementById)
|
||||
{
|
||||
document.getElementById('message').value=myMsg;
|
||||
if (document.getElementById('moderep').checked)
|
||||
{
|
||||
document.getElementById('message-block').innerHTML = '<textarea name="message" id="message" placeholder="<?php echo $hesklang['type_your_message']; ?>">' + myMsg + '</textarea>';
|
||||
} else {
|
||||
var oldMsg = document.getElementById('message').value;
|
||||
document.getElementById('message-block').innerHTML = '<textarea name="message" id="message" placeholder="<?php echo $hesklang['type_your_message']; ?>">' + oldMsg + myMsg + '</textarea>';
|
||||
}
|
||||
$('.ticket .block--message .placeholder').click();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.form1.message.value=myMsg;
|
||||
} else {
|
||||
if (document.form1.mode[0].checked) {
|
||||
document.form1.message.value = myMsg;
|
||||
} else {
|
||||
var oldMsg = document.form1.message.value;
|
||||
document.form1.message.value = oldMsg + myMsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-->
|
||||
|
||||
@@ -50,7 +50,19 @@ hesk_handle_messages();
|
||||
?>
|
||||
|
||||
<div class="main__content tools">
|
||||
<h2><?php echo $hesklang['banemail']; ?></h2>
|
||||
<h2>
|
||||
<?php echo $hesklang['banemail']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['banemail_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<form action="banned_emails.php" method="post" name="form1">
|
||||
<div class="tools__add-mail form">
|
||||
<div class="form-group">
|
||||
@@ -59,7 +71,7 @@ hesk_handle_messages();
|
||||
<input type="hidden" name="a" value="ban" />
|
||||
<button type="submit" class="btn btn--blue-border" ripple="ripple"><?php echo $hesklang['savebanemail']; ?></button>
|
||||
</div>
|
||||
<div class="mail--examples"><?php echo $hesklang['banex']; ?>: john@example.com, @example.com</div>
|
||||
<div class="mail--examples"><?php echo $hesklang['banex']; ?> john@example.com, @example.com</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
@@ -50,7 +50,19 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
hesk_handle_messages();
|
||||
?>
|
||||
<div class="main__content tools">
|
||||
<h2><?php echo $hesklang['banip']; ?></h2>
|
||||
<h2>
|
||||
<?php echo $hesklang['banip']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['banip_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<form action="banned_ips.php" method="post" name="form1">
|
||||
<div class="tools__add-mail form">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -73,7 +73,19 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
|
||||
<div class="main__content tools">
|
||||
<section class="tools__between-head wider">
|
||||
<h2><?php echo $hesklang['tab_4']; ?></h2>
|
||||
<h2>
|
||||
<?php echo $hesklang['tab_4']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['cf_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<?php if ($hesk_settings['num_custom_fields'] < 50 && $action !== 'edit_cf'): ?>
|
||||
<div class="btn btn--blue-border" ripple="ripple" data-action="create-custom-field">
|
||||
<?php echo $hesklang['new_cf']; ?>
|
||||
@@ -203,7 +215,7 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -214,7 +226,7 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
elseif ($k == $hesk_settings['num_custom_fields'] || $k == $num_before)
|
||||
{
|
||||
?>
|
||||
<a href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -231,13 +243,13 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="custom_fields.php?a=order_cf&id=<?php echo $tmp_id; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -249,7 +261,7 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
?>
|
||||
<a href="custom_fields.php?a=edit_cf&id=<?php echo $tmp_id; ?>"
|
||||
title="<?php echo $hesklang['edit']; ?>"
|
||||
class="edit">
|
||||
class="edit tooltip">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
@@ -257,7 +269,7 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
<a href="javascript:"
|
||||
data-modal="[data-modal-id='<?php echo $modal_id; ?>']"
|
||||
title="<?php echo $hesklang['delete']; ?>"
|
||||
class="delete">
|
||||
class="delete tooltip">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
@@ -303,7 +315,7 @@ if ($hesk_settings['num_custom_fields'] >= 50 && $action !== 'edit_cf')
|
||||
<div class="form-group">
|
||||
<label><?php echo $lang; ?></label>
|
||||
<input type="text" name="name[<?php echo $lang; ?>]" class="form-control <?php echo in_array('name', $errors) ? 'isError' : ''; ?>"
|
||||
value="<?php (isset($names[$lang]) ? $names[$lang] : ''); ?>">
|
||||
value="<?php echo (isset($names[$lang]) ? $names[$lang] : ''); ?>">
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
|
||||
@@ -68,7 +68,19 @@ if ($reached_status_limit && $action !== 'edit_status') {
|
||||
?>
|
||||
<div class="main__content tools">
|
||||
<section class="tools__between-head">
|
||||
<h2><?php echo $hesklang['statuses']; ?></h2>
|
||||
<h2>
|
||||
<?php echo $hesklang['statuses']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['statuses_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<?php if (!$reached_status_limit && $action !== 'edit_status'): ?>
|
||||
<div class="btn btn--blue-border" ripple="ripple" data-action="create-custom-status">
|
||||
<?php echo $hesklang['new_status']; ?>
|
||||
@@ -128,7 +140,7 @@ if ($reached_status_limit && $action !== 'edit_status') {
|
||||
<tr <?php echo $table_row; ?>>
|
||||
<td><?php echo $status['name']; ?></td>
|
||||
<td><?php echo $status['color']; ?></td>
|
||||
<td><a href="show_tickets.php?<?php echo 's'.$tmp_id.'=1'; ?>&s_my=1&s_ot=1&s_un=1" alt="<?php echo $hesklang['list_tkt_status']; ?>" title="<?php echo $hesklang['list_tkt_status']; ?>"><?php echo $status['tickets']; ?></a></td>
|
||||
<td><a class="tooltip" href="show_tickets.php?<?php echo 's'.$tmp_id.'=1'; ?>&s_my=1&s_ot=1&s_un=1" alt="<?php echo $hesklang['list_tkt_status']; ?>" title="<?php echo $hesklang['list_tkt_status']; ?>"><?php echo $status['tickets']; ?></a></td>
|
||||
<td><?php echo $status['can_customers_change']; ?></td>
|
||||
<td class="nowrap buttons">
|
||||
<?php $modal_id = hesk_generate_delete_modal($hesklang['confirm_deletion'],
|
||||
@@ -136,7 +148,7 @@ if ($reached_status_limit && $action !== 'edit_status') {
|
||||
'custom_statuses.php?a=remove_status&id='. $tmp_id .'&token='. hesk_token_echo(0)); ?>
|
||||
<p>
|
||||
<?php if ($is_custom): ?>
|
||||
<a href="custom_statuses.php?a=edit_status&id=<?php echo $tmp_id; ?>" class="edit" title="<?php echo $hesklang['edit']; ?>">
|
||||
<a href="custom_statuses.php?a=edit_status&id=<?php echo $tmp_id; ?>" class="edit tooltip" title="<?php echo $hesklang['edit']; ?>">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
@@ -144,14 +156,14 @@ if ($reached_status_limit && $action !== 'edit_status') {
|
||||
<?php if ($status['tickets'] > 0): ?>
|
||||
<a onclick="alert('<?php echo hesk_makeJsString($hesklang['status_not_empty']); ?>');"
|
||||
style="cursor: not-allowed"
|
||||
class="delete"
|
||||
class="delete tooltip"
|
||||
title="<?php echo $hesklang['status_not_empty']; ?>">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a class="delete" href="javascript:" data-modal="[data-modal-id='<?php echo $modal_id; ?>']">
|
||||
<a class="delete tooltip" title="<?php echo $hesklang['delete']; ?>" href="javascript:" data-modal="[data-modal-id='<?php echo $modal_id; ?>']">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
@@ -214,7 +226,7 @@ if ($reached_status_limit && $action !== 'edit_status') {
|
||||
foreach ($hesk_settings['languages'] as $lang => $info) { ?>
|
||||
<div class="form-group">
|
||||
<label><?php echo $lang; ?></label>
|
||||
<input type="text" class="form-control <?php echo in_array('names', $errors) ? 'isError' : ''; ?>" name="name[<?php echo $lang; ?>" value="<?php echo (isset($names[$lang]) ? $names[$lang] : ''); ?>">
|
||||
<input type="text" class="form-control <?php echo in_array('names', $errors) ? 'isError' : ''; ?>" name="name[<?php echo $lang; ?>]" value="<?php echo (isset($names[$lang]) ? $names[$lang] : ''); ?>">
|
||||
</div>
|
||||
<?php }
|
||||
} else { ?>
|
||||
|
||||
@@ -538,6 +538,15 @@ elseif ($_POST['a']=='print')
|
||||
// Get replies
|
||||
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` WHERE `replyto`='{$ticket['id']}' ORDER BY `id` ASC");
|
||||
|
||||
// Get notes
|
||||
$notes = array();
|
||||
$res2 = hesk_dbQuery("SELECT t1.*, t2.`name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` AS t1 LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."users` AS t2 ON t1.`who` = t2.`id` WHERE `ticket`='{$ticket['id']}' ORDER BY t1.`id`");
|
||||
while ($note = hesk_dbFetchAssoc($res2))
|
||||
{
|
||||
$notes[] = $note;
|
||||
}
|
||||
|
||||
$ticket['notes'] = $notes;
|
||||
$ticket['replies'] = $res;
|
||||
$ticket['categoryName'] = $category['name'];
|
||||
$tickets[] = $ticket;
|
||||
|
||||
@@ -343,16 +343,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="edit_subject"><?php echo $hesklang['subject']; ?></label>
|
||||
<label for="edit_subject"><?php echo $hesklang['subject']; ?>:</label>
|
||||
<input type="text" class="form-control" id="edit_subject" name="subject" maxlength="70" value="<?php echo $ticket['subject'];?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit_name"><?php echo $hesklang['name']; ?></label>
|
||||
<label for="edit_name"><?php echo $hesklang['name']; ?>:</label>
|
||||
<input type="text" name="name" id="edit_name" class="form-control" maxlength="50" value="<?php echo $ticket['name'];?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="edit_email"><?php echo $hesklang['email']; ?></label>
|
||||
<input type="email" name="email" class="form-control" id="edit_email" maxlength="1000" value="<?php echo $ticket['email'];?>">
|
||||
<label for="edit_email"><?php echo $hesklang['email']; ?>:</label>
|
||||
<input type="<?php echo $hesk_settings['multi_eml'] ? 'text' : 'email'; ?>" name="email" class="form-control" id="edit_email" maxlength="1000" value="<?php echo $ticket['email'];?>">
|
||||
</div>
|
||||
<?php
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v) {
|
||||
@@ -370,7 +370,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
case 'radio':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<div class="radio-list">';
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
@@ -411,9 +411,8 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="edit_">'.$v['name'].' '.$v['req'].'</label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="'.$k.'" '.$cls.'>';
|
||||
<label for="edit_">'.$v['name:'].' '.$v['req'].'</label>
|
||||
<select name="'.$k.'" id="'.$k.'" '.$cls.'>';
|
||||
// Show "Click to select"?
|
||||
if ( ! empty($v['value']['show_select']))
|
||||
{
|
||||
@@ -435,15 +434,18 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
echo '</select>
|
||||
</div>
|
||||
</div>';
|
||||
</div>
|
||||
<script>
|
||||
$(\'#'.$k.'\').selectize();
|
||||
</script>
|
||||
';
|
||||
break;
|
||||
|
||||
/* Checkbox */
|
||||
case 'checkbox':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>';
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>';
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
@@ -477,7 +479,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<textarea name="'.$k.'" class="form-control'.$cls.'" style="height: inherit" rows="'.intval($v['value']['rows']).'" cols="'.intval($v['value']['cols']).'" >'.$k_value.'</textarea>
|
||||
</div>';
|
||||
break;
|
||||
@@ -488,7 +490,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
echo '
|
||||
<section class="param calendar">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<div class="calendar--button">
|
||||
<button type="button">
|
||||
<svg class="icon icon-calendar">
|
||||
@@ -518,8 +520,8 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="email" name="'.$k.'" id="'.$k.'" value="'.$k_value.'" size="40" '.$suggest.'>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="'.($v['value']['multiple'] ? 'text' : 'email').'" name="'.$k.'" id="'.$k.'" value="'.$k_value.'" size="40" '.$suggest.'>
|
||||
</div>
|
||||
<div id="'.$k.'_suggestions"></div>';
|
||||
break;
|
||||
@@ -535,7 +537,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="text" name="'.$k.'" size="40" maxlength="'.intval($v['value']['max_length']).'" value="'.$k_value.'">
|
||||
</div>';
|
||||
}
|
||||
@@ -546,7 +548,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
}
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="edit_message"><?php echo $hesklang['message']; ?></label>
|
||||
<label for="edit_message"><?php echo $hesklang['message']; ?>:</label>
|
||||
<textarea style="height: inherit" class="form-control" id="edit_message" name="message" rows="12" cols="60"><?php echo $ticket['message']; ?></textarea>
|
||||
</div>
|
||||
|
||||
@@ -555,7 +557,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
if ($hesk_settings['attachments']['use'] && $number_of_attachments < $hesk_settings['attachments']['max_number'])
|
||||
{
|
||||
echo '<div class="form-group">';
|
||||
echo '<label>' . $hesklang['attachments'] . ' (<a class="link" href="javascript:" onclick="hesk_window(\'../file_limits.php\',250,500);return false;">' . $hesklang['ful'] . '</a>)</label>';
|
||||
echo '<label>' . $hesklang['attachments'] . ': (<a class="link" href="javascript:" onclick="hesk_window(\'../file_limits.php\',250,500);return false;">' . $hesklang['ful'] . '</a>)</label>';
|
||||
for ($i=$number_of_attachments+1;$i<=$hesk_settings['attachments']['max_number'];$i++)
|
||||
{
|
||||
echo '<input type="file" name="attachment['.$i.']" size="50" /><br />';
|
||||
|
||||
@@ -70,10 +70,19 @@ if ($action != 'edit') {
|
||||
?>
|
||||
<div class="main__content tools">
|
||||
<section class="tools__between-head fw">
|
||||
<div class="head--tooltip">
|
||||
<h2><?php echo $hesklang['et_title']; ?></h2>
|
||||
<span><?php echo $hesklang['et_intro']; ?></span>
|
||||
</div>
|
||||
<h2>
|
||||
<?php echo $hesklang['et_title']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['et_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<?php if ($hesk_settings['can_sel_lang'] && count($hesk_settings['languages']) > 1): ?>
|
||||
<form method="get" action="email_templates.php">
|
||||
<div class="dropdown-select center out-close">
|
||||
@@ -118,7 +127,7 @@ if ($action != 'edit') {
|
||||
echo '<span style="color:red">'.$hesklang['not_writable'].'</span>';
|
||||
} else {
|
||||
?>
|
||||
<a title="<?php echo $hesklang['edit']; ?>" href="email_templates.php?a=edit&id=<?php echo $email; ?>&edit_language=<?php echo urlencode($hesk_settings['edit_language']); ?>" class="edit">
|
||||
<a title="<?php echo $hesklang['edit']; ?>" href="email_templates.php?a=edit&id=<?php echo $email; ?>&edit_language=<?php echo urlencode($hesk_settings['edit_language']); ?>" class="edit tooltip">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
@@ -424,4 +433,4 @@ function et_file_path($id)
|
||||
}
|
||||
|
||||
return HESK_PATH . 'language/' . $hesk_settings['languages'][$hesk_settings['edit_language']]['folder'] . '/emails/' . $id . '.txt';
|
||||
} // END et_file_path()
|
||||
} // END et_file_path()
|
||||
|
||||
@@ -74,6 +74,12 @@ elseif ($artid)
|
||||
}
|
||||
|
||||
$article = hesk_dbFetchAssoc($result) or hesk_error($hesklang['kb_art_id']);
|
||||
$article['views_formatted'] = number_format($article['views'], 0, null, $hesklang['sep_1000']);
|
||||
$article['votes_formatted'] = number_format($article['votes'], 0, null, $hesklang['sep_1000']);
|
||||
if ($article['catid'] == 1)
|
||||
{
|
||||
$article['cat_name'] = $hesklang['kb_text'];
|
||||
}
|
||||
hesk_show_kb_article($artid);
|
||||
}
|
||||
else
|
||||
@@ -134,9 +140,7 @@ function hesk_kb_search($query)
|
||||
if ($hesk_settings['kb_rating'])
|
||||
{
|
||||
$alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated'];
|
||||
$rat = '<td width="1" valign="top">
|
||||
'.hesk3_get_rating($article['rating']).'
|
||||
</td>';
|
||||
$rat = hesk3_get_rating($article['rating']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -179,7 +183,11 @@ function hesk_kb_search($query)
|
||||
|
||||
function hesk_show_kb_article($artid)
|
||||
{
|
||||
global $hesk_settings, $hesklang, $article;
|
||||
global $hesk_settings, $hesklang, $article, $can_man_kb;
|
||||
|
||||
// We should style <code> elemenets here
|
||||
define('STYLE_CODE',1);
|
||||
define('TIMEAGO',1);
|
||||
|
||||
// Print header
|
||||
$hesk_settings['tmp_title'] = $article['subject'];
|
||||
@@ -188,6 +196,8 @@ function hesk_show_kb_article($artid)
|
||||
|
||||
// Update views by 1
|
||||
hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` SET `views`=`views`+1 WHERE `id`={$artid}");
|
||||
$article['views']++;
|
||||
$article['views_formatted'] = number_format($article['views'], 0, null, $hesklang['sep_1000']);
|
||||
?>
|
||||
<div class="main__content knowledge article">
|
||||
<div class="article__detalies">
|
||||
@@ -227,25 +237,34 @@ function hesk_show_kb_article($artid)
|
||||
<li>
|
||||
<div class="name"><?php echo $hesklang['dta']; ?></div>
|
||||
<div class="descr">
|
||||
<?php echo hesk_date($article['dt'], true); ?>
|
||||
<time class="timeago tooltip" datetime="<?php echo date("c", strtotime($article['dt'])) ; ?>" title="<?php echo hesk_date($article['dt'], true); ?>"><?php echo hesk_date($article['dt'], true); ?></time>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="name"><?php echo $hesklang['views']; ?></div>
|
||||
<div class="descr"><?php echo (isset($_GET['rated']) ? $article['views'] : $article['views']+1); ?></div>
|
||||
<div class="descr"><?php echo $article['views_formatted']; ?></div>
|
||||
</li>
|
||||
<?php
|
||||
if ($hesk_settings['kb_rating']) {
|
||||
?>
|
||||
<li>
|
||||
<div class="name"><?php echo $hesklang['rating']; ?></div>
|
||||
<div class="descr"><?php echo hesk3_get_rating($article['rating']); ?></div>
|
||||
<div class="name"><?php echo $hesklang['rating']; ?> (<?php echo $hesklang['votes']; ?>)</div>
|
||||
<div class="descr">
|
||||
<div class="rate"><?php echo hesk3_get_rating($article['rating']); ?> <span>(<?php echo $article['votes_formatted']; ?>)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php if ($can_man_kb) {
|
||||
?>
|
||||
<div class="article__detalies_action">
|
||||
<a href="manage_knowledgebase.php?a=edit_article&id=<?php echo $artid; ?>" class="btn btn btn--blue-border" ripple="ripple"><?php echo $hesklang['kb_art_edit']; ?><div class="ripple--container"></div></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="article__body">
|
||||
<?php
|
||||
@@ -264,7 +283,7 @@ function hesk_show_kb_article($artid)
|
||||
}
|
||||
?>
|
||||
<h2><?php echo $article['subject']; ?></h2>
|
||||
<div class="article__description">
|
||||
<div class="article__description browser-default">
|
||||
<?php echo $article['content']; ?>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -646,7 +646,7 @@ EOC;
|
||||
endif; // end PAGES > 1
|
||||
?>
|
||||
|
||||
<div class="actions" style="display: flex">
|
||||
<div class="actions" style="display: flex; margin-top: 16px;">
|
||||
<select name="a" id="email-batch-process" autocomplete="off">
|
||||
<?php
|
||||
if ($hesk_settings['mailtmp']['this'] == 'to')
|
||||
@@ -660,7 +660,7 @@ EOC;
|
||||
<option value="delete"><?php echo $hesklang['mo3']; ?></option>
|
||||
</select>
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
|
||||
<button style="margin-top: 16px; margin-left: 5px" class="btn btn-full" ripple="ripple" type="submit" onclick="Javascript:if (document.form1.a.value=='delete') return hesk_confirmExecute('<?php echo hesk_makeJsString($hesklang['mo3']); ?>?');">
|
||||
<button style="margin-left: 5px" class="btn btn-full" ripple="ripple" type="submit" onclick="Javascript:if (document.form1.a.value=='delete') return hesk_confirmExecute('<?php echo hesk_makeJsString($hesklang['mo3']); ?>?');">
|
||||
<?php echo $hesklang['execute']; ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -152,7 +152,7 @@ $num = hesk_dbNumRows($result);
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a title="'.$hesklang['move_dn'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_dn'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -161,7 +161,7 @@ $num = hesk_dbNumRows($result);
|
||||
elseif ($j == $num)
|
||||
{
|
||||
echo'
|
||||
<a title="'.$hesklang['move_up'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_up'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -175,12 +175,12 @@ $num = hesk_dbNumRows($result);
|
||||
else
|
||||
{
|
||||
echo'
|
||||
<a title="'.$hesklang['move_up'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_up'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a title="'.$hesklang['move_dn'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_dn'].'" href="manage_canned.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -197,12 +197,12 @@ $num = hesk_dbNumRows($result);
|
||||
'manage_canned.php?a=remove&id='.$mysaved['id'].'&token='.hesk_token_echo(0));
|
||||
|
||||
echo '
|
||||
<a title="'.$hesklang['edit'].'" href="javascript:setMessage(' . $mysaved['id'] . ')">
|
||||
<a class="tooltip" title="'.$hesklang['edit'].'" href="javascript:setMessage(' . $mysaved['id'] . ')">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a title="'.$hesklang['remove'].'" href="javascript:" data-modal="[data-modal-id=\''.$modal_id.'\']">
|
||||
<a class="tooltip" title="'.$hesklang['remove'].'" href="javascript:" data-modal="[data-modal-id=\''.$modal_id.'\']">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
|
||||
@@ -62,7 +62,19 @@ if (!hesk_SESSION('error')) {
|
||||
?>
|
||||
<div class="main__content categories">
|
||||
<section class="categories__head">
|
||||
<h2><?php echo $hesklang['menu_cat']; ?></h2>
|
||||
<h2>
|
||||
<?php echo $hesklang['menu_cat']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['cat_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<button class="btn btn btn--blue-border" ripple="ripple" data-action="category-create">
|
||||
<?php echo $hesklang['add_cat']; ?>
|
||||
</button>
|
||||
@@ -189,7 +201,7 @@ if (!hesk_SESSION('error')) {
|
||||
<?php
|
||||
$tickets_url = 'show_tickets.php?category='.$mycat['id'].'&s_all=1&s_my=1&s_ot=1&s_un=1';
|
||||
?>
|
||||
<a href="<?php echo $tickets_url; ?>" title="<?php $hesklang['list_tickets_cat']; ?>">
|
||||
<a class="tooltip" data-ztt_vertical_offset="0" href="<?php echo $tickets_url; ?>" title="<?php echo $hesklang['list_tickets_cat']; ?>">
|
||||
<?php echo $all; ?>
|
||||
(<?php echo $width_all; ?>%)
|
||||
</a>
|
||||
@@ -213,9 +225,9 @@ if (!hesk_SESSION('error')) {
|
||||
</td>
|
||||
<?php if ($hesk_settings['autoassign']): ?>
|
||||
<td class="assign">
|
||||
<form action="manage_categories.php" method="get">
|
||||
<label class="switch-checkbox">
|
||||
<input type="checkbox" onchange="this.form.submit()" name="s" <?php if ($mycat['autoassign']): ?>checked<?php endif; ?> />
|
||||
<label class="switch-checkbox">
|
||||
<a class="tooltip" data-ztt_vertical_offset="-5" id="autoassign-<?php echo $mycat['id']; ?>" href="manage_categories.php?a=autoassign&s=<?php echo ($mycat['autoassign'] ? '0' : '1'); ?>&catid=<?php echo $mycat['id']; ?>&token=<?php echo hesk_token_echo(0); ?>" title="<?php echo ($mycat['autoassign'] ? $hesklang['aaon'] : $hesklang['aaoff']); ?>">
|
||||
<input type="checkbox" <?php if ($mycat['autoassign']): ?>checked<?php endif; ?>>
|
||||
<div class="switch-checkbox__bullet">
|
||||
<i>
|
||||
<svg class="icon icon-close">
|
||||
@@ -226,15 +238,12 @@ if (!hesk_SESSION('error')) {
|
||||
</svg>
|
||||
</i>
|
||||
</div>
|
||||
</label>
|
||||
<input type="hidden" name="a" value="autoassign">
|
||||
<input type="hidden" name="catid" value="<?php echo $mycat['id']; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo hesk_token_echo(); ?>">
|
||||
</form>
|
||||
</a>
|
||||
</label>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="nowrap generate">
|
||||
<a href="javascript:" data-action="generate-link" data-link="<?php echo htmlspecialchars($hesk_settings['hesk_url']) . '/index.php?a=add&catid=' . intval($mycat['id']); ?>">Generate link</a>
|
||||
<a href="javascript:" data-action="generate-link" data-link="<?php echo htmlspecialchars($hesk_settings['hesk_url']) . '/index.php?a=add&catid=' . intval($mycat['id']); ?>"><?php echo $hesklang['geco']; ?></a>
|
||||
<?php
|
||||
if ($num > 1) {
|
||||
if ($j == 1) {
|
||||
@@ -244,7 +253,7 @@ if (!hesk_SESSION('error')) {
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -254,7 +263,7 @@ if (!hesk_SESSION('error')) {
|
||||
echo'';
|
||||
} elseif ($j == $num) {
|
||||
?>
|
||||
<a href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -269,13 +278,13 @@ if (!hesk_SESSION('error')) {
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="manage_categories.php?a=order&catid=<?php echo $mycat['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -291,7 +300,7 @@ if (!hesk_SESSION('error')) {
|
||||
$hesklang['confirm_del_cat'],
|
||||
'manage_categories.php?a=remove&catid='. $mycat['id'] .'&token='. hesk_token_echo(0));
|
||||
?>
|
||||
<a href="javascript:" class="delete" data-modal="[data-modal-id='<?php echo $modal_id; ?>']">
|
||||
<a class="tooltip" title="<?php echo $hesklang['delcat']; ?>" href="javascript:" class="delete" data-modal="[data-modal-id='<?php echo $modal_id; ?>']">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
@@ -632,7 +641,7 @@ function toggle_autoassign()
|
||||
$catid = intval( hesk_GET('catid') ) or hesk_error($hesklang['cat_move_id']);
|
||||
$_SESSION['selcat2'] = $catid;
|
||||
|
||||
if (hesk_GET('s') === 'on')
|
||||
if ( intval( hesk_GET('s') ) )
|
||||
{
|
||||
$autoassign = 1;
|
||||
$tmp = $hesklang['caaon'];
|
||||
|
||||
@@ -186,17 +186,17 @@ while (count($kb_cat) > 0)
|
||||
|
||||
// Generate KB menu icons
|
||||
$menu_icons =
|
||||
'<a href="manage_knowledgebase.php?a=add_article&catid='.$my.'" onclick="document.getElementById(\'option'.$j.'\').selected=true;return true;" title="'.$hesklang['kb_i_art'].'">'.
|
||||
'<a class="tooltip" data-ztt_vertical_offset="0" href="manage_knowledgebase.php?a=add_article&catid='.$my.'" onclick="document.getElementById(\'option'.$j.'\').selected=true;return true;" title="'.$hesklang['kb_i_art'].'">'.
|
||||
'<svg style="fill: #9c9c9c" class="icon icon-add">'.
|
||||
'<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-add"></use>'.
|
||||
'</svg>'.
|
||||
'</a> '
|
||||
.'<a href="manage_knowledgebase.php?a=add_category&parent='.$my.'" onclick="document.getElementById(\'option'.$j.'_2\').selected=true;return true;" title="'.$hesklang['kb_i_cat'].'">'.
|
||||
.'<a class="tooltip" data-ztt_vertical_offset="0" href="manage_knowledgebase.php?a=add_category&parent='.$my.'" onclick="document.getElementById(\'option'.$j.'_2\').selected=true;return true;" title="'.$hesklang['kb_i_cat'].'">'.
|
||||
'<svg style="fill: #9c9c9c" class="icon icon-categories">'.
|
||||
'<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-categories"></use>'.
|
||||
'</svg>'.
|
||||
'</a> '
|
||||
.'<a href="manage_knowledgebase.php?a=manage_cat&catid='.$my.'" title="'.$hesklang['kb_p_man'].'">'.
|
||||
.'<a class="tooltip" data-ztt_vertical_offset="0" href="manage_knowledgebase.php?a=manage_cat&catid='.$my.'" title="'.$hesklang['kb_p_man'].'">'.
|
||||
'<svg style="fill: #9c9c9c" class="icon icon-settings">'.
|
||||
'<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-settings"></use>'.
|
||||
'</svg>'.
|
||||
@@ -214,7 +214,7 @@ while (count($kb_cat) > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu_icons .= '<a style="width: 11px; display: inline-block" href="manage_knowledgebase.php?a=order_cat&catid='.$my.'&move=-15&token=' . hesk_token_echo(0) . '" title="'.$hesklang['move_up'].'">'.
|
||||
$menu_icons .= '<a class="tooltip" data-ztt_vertical_offset="0" style="width: 11px; display: inline-block" href="manage_knowledgebase.php?a=order_cat&catid='.$my.'&move=-15&token=' . hesk_token_echo(0) . '" title="'.$hesklang['move_up'].'">'.
|
||||
'<svg class="icon icon-chevron-up" style="fill: '.$arrow_colors[$arrow].'; font-size: 8px">'.
|
||||
'<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-chevron-down"></use>'.
|
||||
'</svg>'.
|
||||
@@ -232,7 +232,7 @@ while (count($kb_cat) > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu_icons .= '<a style="width: 11px; display: inline-block" href="manage_knowledgebase.php?a=order_cat&catid='.$my.'&move=15&token=' . hesk_token_echo(0) . '" title="'.$hesklang['move_dn'].'">'.
|
||||
$menu_icons .= '<a class="tooltip" data-ztt_vertical_offset="0" style="width: 11px; display: inline-block" href="manage_knowledgebase.php?a=order_cat&catid='.$my.'&move=15&token=' . hesk_token_echo(0) . '" title="'.$hesklang['move_dn'].'">'.
|
||||
'<svg class="icon icon-chevron-down" style="fill: '.$arrow_colors[$arrow].'">'.
|
||||
'<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-chevron-down"></use>'.
|
||||
'</svg>'.
|
||||
@@ -654,7 +654,7 @@ function list_draft() {
|
||||
</a>
|
||||
</td>
|
||||
<td class="view">
|
||||
<svg class="icon icon-eye-close">
|
||||
<svg class="icon icon-eye-close tooltip" title="<?php echo $hesklang['views'].': '.$article['views'];?>">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-eye-close"></use>
|
||||
</svg>
|
||||
<?php echo $article['views']; ?>
|
||||
@@ -664,7 +664,7 @@ function list_draft() {
|
||||
</td>
|
||||
<td class="actions">
|
||||
<div class="actions--buttons">
|
||||
<a href="manage_knowledgebase.php?a=edit_article&id=<?php echo $article['id']; ?>"
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=edit_article&id=<?php echo $article['id']; ?>"
|
||||
title="<?php echo $hesklang['edit']; ?>">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
@@ -675,8 +675,8 @@ function list_draft() {
|
||||
$hesklang['del_art'],
|
||||
'manage_knowledgebase.php?a=remove_article&id='. $article['id'] .'&token='. hesk_token_echo(0));
|
||||
?>
|
||||
<a href="javascript:"
|
||||
data-modal="[data-modal-id='<?php echo $modal_id; ?>']"
|
||||
<a class="tooltip" href="javascript:"
|
||||
data-modal="[data-modal-id='<?php echo $modal_id; ?>']"
|
||||
title="<?php echo $hesklang['delete']; ?>">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
@@ -792,7 +792,7 @@ function list_private() {
|
||||
</a>
|
||||
</td>
|
||||
<td class="view">
|
||||
<svg class="icon icon-eye-close">
|
||||
<svg class="icon icon-eye-close tooltip" title="<?php echo $hesklang['views'].': '.$article['views'];?>">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-eye-close"></use>
|
||||
</svg>
|
||||
<?php echo $article['views']; ?>
|
||||
@@ -802,7 +802,7 @@ function list_private() {
|
||||
</td>
|
||||
<td class="actions">
|
||||
<div class="actions--buttons">
|
||||
<a href="manage_knowledgebase.php?a=edit_article&id=<?php echo $article['id']; ?>"
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=edit_article&id=<?php echo $article['id']; ?>"
|
||||
title="<?php echo $hesklang['edit']; ?>">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
@@ -813,7 +813,7 @@ function list_private() {
|
||||
$hesklang['del_art'],
|
||||
'manage_knowledgebase.php?a=remove_article&id='. $article['id'] .'&token='. hesk_token_echo(0));
|
||||
?>
|
||||
<a href="javascript:"
|
||||
<a class="tooltip" href="javascript:"
|
||||
data-modal="[data-modal-id='<?php echo $modal_id; ?>']"
|
||||
title="<?php echo $hesklang['delete']; ?>">
|
||||
<svg class="icon icon-delete">
|
||||
@@ -1107,6 +1107,11 @@ function save_article()
|
||||
$old_type = ($old_type < 0 || $old_type > 2) ? 0 : $old_type;
|
||||
$from = hesk_POST('from');
|
||||
|
||||
if ( ! in_array($from, array('draft', 'private')))
|
||||
{
|
||||
$from = 'manage_cat';
|
||||
}
|
||||
|
||||
$subject = hesk_input( hesk_POST('subject') ) or $hesk_error_buffer[] = $hesklang['kb_e_subj'];
|
||||
|
||||
if ($html)
|
||||
@@ -1477,6 +1482,7 @@ function edit_article()
|
||||
break;
|
||||
default:
|
||||
$redirect_action = 'a=manage_cat&catid='.$catid;
|
||||
$from = 'manage_cat';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
@@ -1532,18 +1538,12 @@ function edit_article()
|
||||
$style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"';
|
||||
|
||||
echo '
|
||||
<a title="'.$hesklang['dela'].'" href="manage_knowledgebase.php?a=remove_kb_att&id='.$id.'&kb_att='.$att_id.'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['delatt']).'\');">
|
||||
<svg class="icon icon-delete">
|
||||
<a class="tooltip" style="text-decoration: none; margin-left: 16px; margin-right: 6px" title="'.$hesklang['dela'].'" href="manage_knowledgebase.php?a=remove_kb_att&id='.$id.'&kb_att='.$att_id.'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['delatt']).'\');">
|
||||
<svg class="icon icon-delete" style="vertical-align: middle;">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
</a> ';
|
||||
echo '
|
||||
<a href="../download_attachment.php?kb_att='.$att_id.'" title="'.$hesklang['dnl'].' '.$att_name.'">
|
||||
<svg class="icon icon-attach">
|
||||
<use xlink:href="'. HESK_PATH .'img/sprite.svg#icon-attach"></use>
|
||||
</svg>
|
||||
</a> ';
|
||||
echo '<a href="../download_attachment.php?kb_att='.$att_id.'">'.$att_name.'</a><br />';
|
||||
</a>» ';
|
||||
echo '<a href="../download_attachment.php?kb_att='.$att_id.'" title="'.$hesklang['dnl'].' '.$att_name.'">'.$att_name.'</a><br />';
|
||||
}
|
||||
echo '<br>';
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ function manage_category() {
|
||||
</a>
|
||||
</td>
|
||||
<td class="view">
|
||||
<svg class="icon icon-eye-close">
|
||||
<svg class="icon icon-eye-close tooltip" title="<?php echo $hesklang['views'].': '.$article['views'];?>">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-eye-close"></use>
|
||||
</svg>
|
||||
<?php echo $article['views']; ?>
|
||||
@@ -1823,7 +1823,7 @@ function manage_category() {
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=15&token=<?php hesk_token_echo(); ?>">
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=15&token=<?php hesk_token_echo(); ?>" title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -1833,7 +1833,7 @@ function manage_category() {
|
||||
elseif ($k == $num)
|
||||
{
|
||||
?>
|
||||
<a href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=-15&token=<?php hesk_token_echo(); ?>">
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=-15&token=<?php hesk_token_echo(); ?>" title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -1848,12 +1848,12 @@ function manage_category() {
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=-15&token=<?php hesk_token_echo(); ?>">
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=-15&token=<?php hesk_token_echo(); ?>" title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=15&token=<?php hesk_token_echo(); ?>">
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=order_article&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&move=15&token=<?php hesk_token_echo(); ?>" title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -1876,13 +1876,13 @@ function manage_category() {
|
||||
</a>';
|
||||
}
|
||||
?>
|
||||
<a href="manage_knowledgebase.php?a=sticky&s=<?php echo $article['sticky'] ? 0 : 1 ?>&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=sticky&s=<?php echo $article['sticky'] ? 0 : 1 ?>&id=<?php echo $article['id']; ?>&catid=<?php echo $catid; ?>&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $article['sticky'] ? $hesklang['stickyoff'] : $hesklang['stickyon']; ?>">
|
||||
<svg class="icon icon-pin" <?php echo $article['sticky'] ? ' style="fill: #38bc7d; transform: rotate(50deg);"' : ''; ?>>
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-pin"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="manage_knowledgebase.php?a=edit_article&id=<?php echo $article['id']; ?>"
|
||||
<a class="tooltip" href="manage_knowledgebase.php?a=edit_article&id=<?php echo $article['id']; ?>"
|
||||
title="<?php echo $hesklang['edit']; ?>">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
@@ -1893,7 +1893,7 @@ function manage_category() {
|
||||
$hesklang['del_art'],
|
||||
'manage_knowledgebase.php?a=remove_article&id='. $article['id'] .'&token='. hesk_token_echo(0));
|
||||
?>
|
||||
<a href="javascript:"
|
||||
<a class="tooltip" href="javascript:"
|
||||
data-modal="[data-modal-id='<?php echo $modal_id; ?>']"
|
||||
title="<?php echo $hesklang['delete']; ?>">
|
||||
<svg class="icon icon-delete">
|
||||
|
||||
@@ -120,7 +120,7 @@ $num = hesk_dbNumRows($result);
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a title="'.$hesklang['move_dn'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_dn'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -129,7 +129,7 @@ $num = hesk_dbNumRows($result);
|
||||
elseif ($j == $num)
|
||||
{
|
||||
echo'
|
||||
<a title="'.$hesklang['move_up'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_up'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -143,12 +143,12 @@ $num = hesk_dbNumRows($result);
|
||||
else
|
||||
{
|
||||
echo'
|
||||
<a title="'.$hesklang['move_up'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_up'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=-15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a title="'.$hesklang['move_dn'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<a class="tooltip" title="'.$hesklang['move_dn'].'" href="manage_ticket_templates.php?a=order&replyid='.$mysaved['id'].'&move=15&token='.hesk_token_echo(0).'">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
@@ -165,12 +165,12 @@ $num = hesk_dbNumRows($result);
|
||||
'manage_ticket_templates.php?a=remove&id='.$mysaved['id'].'&token='.hesk_token_echo(0));
|
||||
|
||||
echo '
|
||||
<a title="'.$hesklang['edit'].'" href="javascript:setMessage(' . $mysaved['id'] . ')">
|
||||
<a class="tooltip" title="'.$hesklang['edit'].'" href="javascript:setMessage(' . $mysaved['id'] . ')">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a title="'.$hesklang['remove'].'" href="javascript:" data-modal="[data-modal-id=\''.$modal_id.'\']">
|
||||
<a class="tooltip" title="'.$hesklang['remove'].'" href="javascript:" data-modal="[data-modal-id=\''.$modal_id.'\']">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="'.HESK_PATH.'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
|
||||
@@ -312,14 +312,14 @@ if ($hesk_settings['imap'] && hesk_validateEmail($hesk_settings['imap_user'], 'E
|
||||
/* To edit yourself go to "Profile" page, not here. */
|
||||
if ($myuser['id'] == $_SESSION['id']) {
|
||||
$edit_code = '
|
||||
<a href="profile.php" class="edit" title="'.$hesklang['edit'].'">
|
||||
<a href="profile.php" class="edit tooltip" title="'.$hesklang['edit'].'">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="' . HESK_PATH . 'img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
</a>';
|
||||
} else {
|
||||
$edit_code = '
|
||||
<a href="manage_users.php?a=edit&id='.$myuser['id'].'" class="edit" title="'.$hesklang['edit'].'">
|
||||
<a href="manage_users.php?a=edit&id='.$myuser['id'].'" class="edit tooltip" title="'.$hesklang['edit'].'">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="' . HESK_PATH . 'img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
@@ -342,7 +342,7 @@ if ($hesk_settings['imap'] && hesk_validateEmail($hesk_settings['imap_user'], 'E
|
||||
$remove_code = '
|
||||
<a href="javascript:" data-modal="[data-modal-id=\''.$modal_id.'\']"
|
||||
title="'.$hesklang['remove'].'"
|
||||
class="delete">
|
||||
class="delete tooltip">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="' . HESK_PATH . 'img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
@@ -354,7 +354,7 @@ if ($hesk_settings['imap'] && hesk_validateEmail($hesk_settings['imap_user'], 'E
|
||||
if ($myuser['autoassign']) {
|
||||
$autoassign_code = '
|
||||
<label class="switch-checkbox">
|
||||
<a id="autoassign-'.$myuser['id'].'" href="manage_users.php?a=autoassign&s=0&id='.$myuser['id'].'&token='.hesk_token_echo(0).'" title="'.$hesklang['aaon'].'">
|
||||
<a class="tooltip" data-ztt_vertical_offset="-5" id="autoassign-'.$myuser['id'].'" href="manage_users.php?a=autoassign&s=0&id='.$myuser['id'].'&token='.hesk_token_echo(0).'" title="'.$hesklang['aaon'].'">
|
||||
<input type="checkbox" checked>
|
||||
<div class="switch-checkbox__bullet">
|
||||
<i>
|
||||
@@ -372,7 +372,7 @@ if ($hesk_settings['imap'] && hesk_validateEmail($hesk_settings['imap_user'], 'E
|
||||
} else {
|
||||
$autoassign_code = '
|
||||
<label class="switch-checkbox">
|
||||
<a id="autoassign-'.$myuser['id'].'" href="manage_users.php?a=autoassign&s=1&id='.$myuser['id'].'&token='.hesk_token_echo(0).'" title="'.$hesklang['aaoff'].'">
|
||||
<a class="tooltip" data-ztt_vertical_offset="-5" id="autoassign-'.$myuser['id'].'" href="manage_users.php?a=autoassign&s=1&id='.$myuser['id'].'&token='.hesk_token_echo(0).'" title="'.$hesklang['aaoff'].'">
|
||||
<input type="checkbox">
|
||||
<div class="switch-checkbox__bullet">
|
||||
<i>
|
||||
|
||||
80
hesk/admin/module_statistics.php
Normal file
80
hesk/admin/module_statistics.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of HESK - PHP Help Desk Software.
|
||||
*
|
||||
* (c) Copyright Klemen Stirn. All rights reserved.
|
||||
* https://www.hesk.com
|
||||
*
|
||||
* For the full copyright and license agreement information visit
|
||||
* https://www.hesk.com/eula.php
|
||||
*
|
||||
*/
|
||||
|
||||
define('IN_SCRIPT',1);
|
||||
define('HESK_PATH','../');
|
||||
|
||||
/* Get all the required files and functions */
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
||||
require(HESK_PATH . 'inc/reporting_functions.inc.php');
|
||||
hesk_load_database_functions();
|
||||
|
||||
hesk_session_start();
|
||||
hesk_dbConnect();
|
||||
hesk_isLoggedIn();
|
||||
|
||||
// Check permissions for this feature
|
||||
hesk_checkPermission('can_run_reports');
|
||||
|
||||
/* Print header */
|
||||
require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
|
||||
/* Print main manage users page */
|
||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
hesk_show_notice(sprintf($hesklang['modules_demo'], '<a href="https://www.hesk.com/get/hesk3-statistics">HESK Cloud</a>'), ' ', false);
|
||||
?>
|
||||
<div class="main__content reports">
|
||||
<form action="module_statistics.php" method="get" name="form1">
|
||||
<div class="reports__head">
|
||||
<h2>
|
||||
<?php echo $hesklang['statistics']['tab']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['statistics']['intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p><?php echo $hesklang['statistics']['intro']; ?></p>
|
||||
|
||||
<ul style="list-style-type: disc ! important; padding-left: 40px ! important; margin-top: 20px; margin-bottom: 20px;">
|
||||
<li><?php echo $hesklang['statistics']['pie_title_ro']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['pie_title_so']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['chart_title_md']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['chart_title_wd']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['chart_title_hd']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['chart_title_tfr']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['chart_title_ttr']; ?>,</li>
|
||||
<li><?php echo $hesklang['statistics']['chart_title_srt']; ?>,</li>
|
||||
<li><?php echo $hesklang['and_more']; ?></li>
|
||||
</ul>
|
||||
|
||||
<p><?php echo sprintf($hesklang['see_demo'], '<a href="https://www.hesk.com/get/hesk3-statistics-demo">HESK Demo</a>'); ?></p>
|
||||
|
||||
<img src="<?php echo HESK_PATH; ?>img/statistics.jpg" alt="<?php echo $hesklang['statistics']['tab']; ?>" style="margin-top:35px;">
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
@@ -154,7 +154,7 @@ else
|
||||
<?php
|
||||
if ( ! isset($_SESSION['HESK_ERROR']))
|
||||
{
|
||||
hesk_show_info($hesklang['nti3']);
|
||||
hesk_show_info($hesklang['nti3'], ' ', false);
|
||||
}
|
||||
|
||||
/* This will handle error, success and notice messages */
|
||||
@@ -167,15 +167,15 @@ else
|
||||
<form method="post" class="form <?php echo isset($_SESSION['iserror']) && count($_SESSION['iserror']) ? 'invalid' : ''; ?>" action="admin_submit_ticket.php" name="form1" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label for="create_name">
|
||||
<?php echo $hesklang['name']; ?> <span class="important">*</span>
|
||||
<?php echo $hesklang['name']; ?>: <span class="important">*</span>
|
||||
</label>
|
||||
<input type="text" id="create_name" name="name" class="form-control <?php if (in_array('name',$_SESSION['iserror'])) {echo 'isError';} ?>" maxlength="50" value="<?php if (isset($_SESSION['as_name'])) {echo stripslashes(hesk_input($_SESSION['as_name']));} ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">
|
||||
<?php echo $hesklang['email'] . ($hesk_settings['require_email'] ? ' <span class="important">*</span>' : '') ; ?>
|
||||
<?php echo $hesklang['email'] . ':' . ($hesk_settings['require_email'] ? ' <span class="important">*</span>' : '') ; ?>
|
||||
</label>
|
||||
<input type="text"
|
||||
<input type="<?php echo ($hesk_settings['multi_eml'] ? 'text' : 'email'); ?>"
|
||||
class="form-control <?php if (in_array('email',$_SESSION['iserror'])) {echo 'isError';} elseif (in_array('email',$_SESSION['isnotice'])) {echo 'isNotice';} ?>"
|
||||
name="email" id="email" maxlength="1000"
|
||||
value="<?php if (isset($_SESSION['as_email'])) {echo stripslashes(hesk_input($_SESSION['as_email']));} ?>"
|
||||
@@ -183,7 +183,7 @@ else
|
||||
</div>
|
||||
<div id="email_suggestions"></div>
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['priority']; ?> <span class="important">*</span></label>
|
||||
<label><?php echo $hesklang['priority']; ?>: <span class="important">*</span></label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="priority" <?php if (in_array('priority',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> >
|
||||
<?php
|
||||
@@ -236,7 +236,7 @@ else
|
||||
case 'radio':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<div class="radio-list">';
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
@@ -277,9 +277,8 @@ else
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="edit_">'.$v['name'].' '.$v['req'].'</label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="'.$k.'" '.$cls.'>';
|
||||
<label for="edit_">'.$v['name:'].' '.$v['req'].'</label>
|
||||
<select name="'.$k.'" id="'.$k.'" '.$cls.'>';
|
||||
// Show "Click to select"?
|
||||
if ( ! empty($v['value']['show_select']))
|
||||
{
|
||||
@@ -301,15 +300,18 @@ else
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
echo '</select>
|
||||
</div>
|
||||
</div>';
|
||||
</div>
|
||||
<script>
|
||||
$(\'#'.$k.'\').selectize();
|
||||
</script>
|
||||
';
|
||||
break;
|
||||
|
||||
/* Checkbox */
|
||||
case 'checkbox':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>';
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>';
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
@@ -343,7 +345,7 @@ else
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<textarea name="'.$k.'" class="form-control'.$cls.'" style="height: inherit" rows="'.intval($v['value']['rows']).'" cols="'.intval($v['value']['cols']).'" >'.$k_value.'</textarea>
|
||||
</div>';
|
||||
break;
|
||||
@@ -352,7 +354,7 @@ else
|
||||
case 'date':
|
||||
echo '
|
||||
<section class="param calendar">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<div class="calendar--button">
|
||||
<button type="button">
|
||||
<svg class="icon icon-calendar">
|
||||
@@ -382,8 +384,8 @@ else
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="email" name="'.$k.'" id="'.$k.'" value="'.$k_value.'" size="40" '.$suggest.'>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="'.($v['value']['multiple'] ? 'text' : 'email').'" name="'.$k.'" id="'.$k.'" value="'.$k_value.'" size="40" '.$suggest.'>
|
||||
</div>
|
||||
<div id="'.$k.'_suggestions"></div>';
|
||||
break;
|
||||
@@ -393,14 +395,17 @@ else
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
$k_value = hesk_msgToPlain($k_value,0,0);
|
||||
if (strlen($k_value) != 0 || isset($_SESSION["as_$k"]))
|
||||
{
|
||||
$v['value']['default_value'] = $k_value;
|
||||
}
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? 'isError' : '';
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="text" name="'.$k.'" size="40" maxlength="'.intval($v['value']['max_length']).'" value="'.$k_value.'">
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="text" name="'.$k.'" size="40" maxlength="'.intval($v['value']['max_length']).'" value="'.$v['value']['default_value'].'">
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
@@ -453,16 +458,16 @@ else
|
||||
{
|
||||
if (document.getElementById('moderep').checked)
|
||||
{
|
||||
document.getElementById('HeskMsg').innerHTML='<textarea name="message" id="message" rows="12" cols="60">'+myMsg+'</textarea>';
|
||||
document.getElementById('HeskSub').innerHTML='<input type="text" name="subject" id="subject" size="40" maxlength="70" value="'+mySubject+'" />';
|
||||
document.getElementById('HeskMsg').innerHTML='<textarea style="height: inherit" class="form-control" name="message" id="message" rows="12" cols="60">'+myMsg+'</textarea>';
|
||||
document.getElementById('HeskSub').innerHTML='<input class="form-control" type="text" name="subject" id="subject" maxlength="70" value="'+mySubject+'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
var oldMsg = document.getElementById('message').value;
|
||||
document.getElementById('HeskMsg').innerHTML='<textarea name="message" id="message" rows="12" cols="60">'+oldMsg+myMsg+'</textarea>';
|
||||
document.getElementById('HeskMsg').innerHTML='<textarea style="height: inherit" class="form-control" name="message" id="message" rows="12" cols="60">'+oldMsg+myMsg+'</textarea>';
|
||||
if (document.getElementById('subject').value == '')
|
||||
{
|
||||
document.getElementById('HeskSub').innerHTML='<input type="text" name="subject" id="subject" size="40" maxlength="70" value="'+mySubject+'" />';
|
||||
document.getElementById('HeskSub').innerHTML='<input class="form-control" type="text" name="subject" id="subject" maxlength="70" value="'+mySubject+'">';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -511,7 +516,7 @@ else
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['select_ticket_tpl']; ?></label>
|
||||
<label><?php echo $hesklang['select_ticket_tpl']; ?>:</label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="saved_replies" onchange="setMessage(this.value)">
|
||||
<option value="0"> - <?php echo $hesklang['select_empty']; ?> - </option>
|
||||
@@ -531,11 +536,11 @@ else
|
||||
}
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['subject'] . ' ' . ($hesk_settings['require_subject']==1 ? '<span class="important">*</span>' : '') ; ?></label>
|
||||
<label><?php echo $hesklang['subject'] . ': ' . ($hesk_settings['require_subject']==1 ? '<span class="important">*</span>' : '') ; ?></label>
|
||||
<span id="HeskSub"><input class="form-control <?php if (in_array('subject',$_SESSION['iserror'])) {echo 'isError';} ?>" type="text" name="subject" id="subject" maxlength="70" value="<?php if (isset($_SESSION['as_subject'])) {echo stripslashes(hesk_input($_SESSION['as_subject']));} ?>"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['message'] . ' ' . ($hesk_settings['require_message']==1 ? '<span class="important">*</span>' : '') ; ?></label>
|
||||
<label><?php echo $hesklang['message'] . ': ' . ($hesk_settings['require_message']==1 ? '<span class="important">*</span>' : '') ; ?></label>
|
||||
<span id="HeskMsg">
|
||||
<textarea style="height: inherit" class="form-control <?php if (in_array('message',$_SESSION['iserror'])) {echo 'isError';} ?>"
|
||||
name="message" id="message" rows="12" cols="60"><?php if (isset($_SESSION['as_message'])) {echo stripslashes(hesk_input($_SESSION['as_message']));} ?></textarea>
|
||||
@@ -578,7 +583,7 @@ else
|
||||
case 'radio':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<div class="radio-list">';
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
@@ -619,9 +624,8 @@ else
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="edit_">'.$v['name'].' '.$v['req'].'</label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="'.$k.'" '.$cls.'>';
|
||||
<label for="edit_">'.$v['name:'].' '.$v['req'].'</label>
|
||||
<select name="'.$k.'" id="'.$k.'" '.$cls.'>';
|
||||
// Show "Click to select"?
|
||||
if ( ! empty($v['value']['show_select']))
|
||||
{
|
||||
@@ -643,15 +647,18 @@ else
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
echo '</select>
|
||||
</div>
|
||||
</div>';
|
||||
</div>
|
||||
<script>
|
||||
$(\'#'.$k.'\').selectize();
|
||||
</script>
|
||||
';
|
||||
break;
|
||||
|
||||
/* Checkbox */
|
||||
case 'checkbox':
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>';
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>';
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
@@ -685,7 +692,7 @@ else
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<textarea name="'.$k.'" class="form-control'.$cls.'" style="height: inherit" rows="'.intval($v['value']['rows']).'" cols="'.intval($v['value']['cols']).'" >'.$k_value.'</textarea>
|
||||
</div>';
|
||||
break;
|
||||
@@ -694,7 +701,7 @@ else
|
||||
case 'date':
|
||||
echo '
|
||||
<section class="param calendar">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<div class="calendar--button">
|
||||
<button type="button">
|
||||
<svg class="icon icon-calendar">
|
||||
@@ -724,8 +731,8 @@ else
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="email" name="'.$k.'" id="'.$k.'" value="'.$k_value.'" size="40" '.$suggest.'>
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="'.($v['value']['multiple'] ? 'text' : 'email').'" name="'.$k.'" id="'.$k.'" value="'.$k_value.'" size="40" '.$suggest.'>
|
||||
</div>
|
||||
<div id="'.$k.'_suggestions"></div>';
|
||||
break;
|
||||
@@ -735,14 +742,17 @@ else
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
$k_value = hesk_msgToPlain($k_value,0,0);
|
||||
if (strlen($k_value) != 0 || isset($_SESSION["as_$k"]))
|
||||
{
|
||||
$v['value']['default_value'] = $k_value;
|
||||
}
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? 'isError' : '';
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label>'.$v['name'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="text" name="'.$k.'" size="40" maxlength="'.intval($v['value']['max_length']).'" value="'.$k_value.'">
|
||||
<label>'.$v['name:'].' '.$v['req'].'</label>
|
||||
<input class="form-control '.$cls.'" type="text" name="'.$k.'" size="40" maxlength="'.intval($v['value']['max_length']).'" value="'.$v['value']['default_value'].'">
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
@@ -760,7 +770,7 @@ else
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-attach"></use>
|
||||
</svg>
|
||||
<div>
|
||||
<?php echo $hesklang['attachments']; ?>
|
||||
<?php echo $hesklang['attachments']; ?>:
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -781,7 +791,7 @@ else
|
||||
}
|
||||
?>
|
||||
<div class="form-group" style="margin-top: 20px">
|
||||
<label><?php echo $hesklang['addop']; ?></label>
|
||||
<label><?php echo $hesklang['addop']; ?>:</label>
|
||||
<div class="checkbox-list">
|
||||
<div class="checkbox-custom">
|
||||
<input type="checkbox" id="create_notify1" name="notify" value="1" <?php echo empty($_SESSION['as_notify']) ? '' : 'checked'; ?>>
|
||||
@@ -795,9 +805,8 @@ else
|
||||
</div>
|
||||
<?php if (hesk_checkPermission('can_assign_others',0)) { ?>
|
||||
<div class="form-group">
|
||||
<label><?php echo $hesklang['asst2']; ?></label>
|
||||
<div class="dropdown-select center out-close">
|
||||
<select name="owner" <?php if (in_array('owner',$_SESSION['iserror'])) {echo ' class="isError" ';} ?>>
|
||||
<label><?php echo $hesklang['asst2']; ?>:</label>
|
||||
<select name="owner" id="owner-select" <?php if (in_array('owner',$_SESSION['iserror'])) {echo ' class="isError" ';} ?>>
|
||||
<option value="-1"> > <?php echo $hesklang['unas']; ?> < </option>
|
||||
<?php
|
||||
|
||||
@@ -822,7 +831,9 @@ else
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<script>
|
||||
$('#owner-select').selectize();
|
||||
</script>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@@ -844,6 +855,11 @@ else
|
||||
<input type="hidden" name="category" value="<?php echo $category; ?>">
|
||||
<button type="submit" class="btn btn-full"><?php echo $hesklang['sub_ticket']; ?></button>
|
||||
</form>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -30,6 +30,10 @@ hesk_checkPermission('can_service_msg');
|
||||
// Define required constants
|
||||
define('LOAD_TABS',1);
|
||||
define('WYSIWYG',1);
|
||||
if (isset($_SESSION['preview_sm']))
|
||||
{
|
||||
define('STYLE_CODE',1);
|
||||
}
|
||||
|
||||
// Do we need to show the language options?
|
||||
$hesk_settings['show_language'] = (count($hesk_settings['languages']) > 1);
|
||||
@@ -62,7 +66,19 @@ $num = hesk_dbNumRows($res);
|
||||
?>
|
||||
<div class="main__content tools">
|
||||
<section class="tools__between-head">
|
||||
<h2><?php echo $hesklang['sm_title']; ?></h2>
|
||||
<h2>
|
||||
<?php echo $hesklang['sm_title']; ?>
|
||||
<div class="tooltype right out-close">
|
||||
<svg class="icon icon-info">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-info"></use>
|
||||
</svg>
|
||||
<div class="tooltype__content">
|
||||
<div class="tooltype__wrapper">
|
||||
<?php echo $hesklang['sm_intro']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<?php if ($action !== 'edit_sm' && !isset($_SESSION['preview_sm'])): ?>
|
||||
<div class="btn btn--blue-border" ripple="ripple" data-action="create-service-message"><?php echo $hesklang['new_sm']; ?></div>
|
||||
<?php endif;?>
|
||||
@@ -167,7 +183,7 @@ $num = hesk_dbNumRows($res);
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -178,7 +194,7 @@ $num = hesk_dbNumRows($res);
|
||||
elseif ($k == $num)
|
||||
{
|
||||
?>
|
||||
<a href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -195,13 +211,13 @@ $num = hesk_dbNumRows($res);
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=-15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_up']; ?>">
|
||||
<svg class="icon icon-chevron-up">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
<a class="tooltip" href="service_messages.php?a=order_sm&id=<?php echo $sm['id']; ?>&move=15&token=<?php hesk_token_echo(); ?>"
|
||||
title="<?php echo $hesklang['move_dn']; ?>">
|
||||
<svg class="icon icon-chevron-down">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-chevron-down"></use>
|
||||
@@ -211,12 +227,12 @@ $num = hesk_dbNumRows($res);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<a href="service_messages.php?a=edit_sm&id=<?php echo $sm['id']; ?>" class="edit" title="<?php echo $hesklang['edit']; ?>">
|
||||
<a href="service_messages.php?a=edit_sm&id=<?php echo $sm['id']; ?>" class="edit tooltip" title="<?php echo $hesklang['edit']; ?>">
|
||||
<svg class="icon icon-edit-ticket">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-edit-ticket"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="javascript:" class="delete" title="<?php echo $hesklang['delete']; ?>" data-modal="[data-modal-id='<?php echo $modal_id; ?>']">
|
||||
<a href="javascript:" class="delete tooltip" title="<?php echo $hesklang['delete']; ?>" data-modal="[data-modal-id='<?php echo $modal_id; ?>']">
|
||||
<svg class="icon icon-delete">
|
||||
<use xlink:href="<?php echo HESK_PATH; ?>img/sprite.svg#icon-delete"></use>
|
||||
</svg>
|
||||
@@ -266,6 +282,11 @@ if ($hesk_settings['kb_wysiwyg'])
|
||||
hesk_handle_messages();
|
||||
}
|
||||
|
||||
if ( isset($_SESSION['new_sm']) && (isset($_SESSION['preview_sm']) || ! isset($_SESSION['edit_sm'])) )
|
||||
{
|
||||
$_SESSION['new_sm'] = hesk_stripArray($_SESSION['new_sm']);
|
||||
}
|
||||
|
||||
/* Do we have a service message to preview? */
|
||||
if (isset($_SESSION['preview_sm'])) {
|
||||
hesk_service_message($_SESSION['new_sm']);
|
||||
@@ -280,7 +301,7 @@ if ($hesk_settings['kb_wysiwyg'])
|
||||
<div class="step-item step-1">
|
||||
<div class="form-group">
|
||||
<label for="sm-title"><?php echo $hesklang['sm_mtitle']; ?></label>
|
||||
<input id="sm-title" type="text" name="title" class="form-control <?php echo in_array('title', hesk_SESSION(array('new_sm','errors'))) ? 'isError' : ''; ?>" maxlength="255" <?php if (isset($_SESSION['new_sm']['title'])) {echo 'value="'.$_SESSION['new_sm']['title'].'"';} ?>>
|
||||
<input id="sm-title" type="text" name="title" class="form-control <?php echo hesk_SESSION(array('new_sm','errors')) ? 'isError' : ''; ?>" maxlength="255" <?php if (isset($_SESSION['new_sm']['title'])) {echo 'value="'.$_SESSION['new_sm']['title'].'"';} ?>>
|
||||
</div>
|
||||
<div class="form-group" style="width: 100%">
|
||||
<label for="content"><?php echo $hesklang['sm_msg']; ?></label>
|
||||
@@ -488,6 +509,7 @@ function edit_sm()
|
||||
hesk_error($hesklang['sm_not_found']);
|
||||
}
|
||||
$sm = hesk_dbFetchAssoc($res);
|
||||
$sm['message'] = hesk_htmlspecialchars($sm['message']);
|
||||
|
||||
$_SESSION['smord'] = $id;
|
||||
$_SESSION['new_sm'] = $sm;
|
||||
|
||||
Reference in New Issue
Block a user