diff --git a/admin/admin_main.php b/admin/admin_main.php index 4fe6e7c2..002a94ff 100644 --- a/admin/admin_main.php +++ b/admin/admin_main.php @@ -1,12 +1,12 @@ ' . $hesklang['beta'] . ' '; ?>
- + +
+

+

+
'; + ?> +
+ +
+
Other */ +$set['submittedformat'] = hesk_checkMinMax( intval( hesk_POST('s_submittedformat') ) , 0, 2, 2); $set['updatedformat'] = hesk_checkMinMax( intval( hesk_POST('s_updatedformat') ) , 0, 2, 2); /*** MISC ***/ @@ -827,6 +828,7 @@ $hesk_settings[\'open_only\']=' . $set['open_only'] . '; $hesk_settings[\'ticket_list\']=array(' . $set['ticket_list'] . '); // --> Other +$hesk_settings[\'submittedformat\']=\'' . $set['submittedformat'] . '\'; $hesk_settings[\'updatedformat\']=\'' . $set['updatedformat'] . '\'; diff --git a/admin/admin_submit_ticket.php b/admin/admin_submit_ticket.php index db4da2cd..3d9548e1 100644 --- a/admin/admin_submit_ticket.php +++ b/admin/admin_submit_ticket.php @@ -1,12 +1,12 @@
-
diff --git a/admin/banned_emails.php b/admin/banned_emails.php index d6063edd..ae6102dc 100644 --- a/admin/banned_emails.php +++ b/admin/banned_emails.php @@ -1,12 +1,12 @@ 1); $result = hesk_dbQuery('SELECT `parent`, COUNT(*) AS `num` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_categories` GROUP BY `parent`'); @@ -186,6 +189,8 @@ while (count($kb_cat) > 0) $text_short = $cat['name'].$type.' ('.$cat['articles'].', '.$cat['articles_private'].', '.$cat['articles_draft'].')'; + $total_articles += $cat['articles']; + // Generate KB menu icons $menu_icons = ' ' @@ -269,6 +274,13 @@ if (!isset($_SESSION['hide']['treemenu'])) + @@ -367,7 +379,7 @@ if (!isset($_SESSION['hide']['new_article']))
- +
@@ -1335,7 +1347,7 @@ function edit_article()
- +
diff --git a/admin/manage_ticket_templates.php b/admin/manage_ticket_templates.php index c961022d..cf439916 100644 --- a/admin/manage_ticket_templates.php +++ b/admin/manage_ticket_templates.php @@ -1,12 +1,12 @@
'; hesk_process_messages($hesk_error_buffer,'NOREDIRECT'); } + elseif (defined('HESK_DEMO')) + { + hesk_process_messages($hesklang['ddemo'],'NOREDIRECT'); + } else { // Get user data from the database diff --git a/admin/profile.php b/admin/profile.php index d8a09d16..ca9990af 100644 --- a/admin/profile.php +++ b/admin/profile.php @@ -1,12 +1,12 @@ '.$totals['worked'].''; + echo ''.$totals['worked'].''; } ?> @@ -511,7 +511,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); '.$totals['worked'].''; + echo ''.$totals['worked'].''; } ?> @@ -940,7 +940,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); '.$totals['worked'].''; + echo ''.$totals['worked'].''; } ?> diff --git a/admin/service_messages.php b/admin/service_messages.php index 40939492..156821a7 100644 --- a/admin/service_messages.php +++ b/admin/service_messages.php @@ -1,12 +1,12 @@
-

+

diff --git a/admin/show_tickets.php b/admin/show_tickets.php index 3d29d860..90ae90a6 100644 --- a/admin/show_tickets.php +++ b/admin/show_tickets.php @@ -1,12 +1,12 @@ {}[]"; + var punctuation = "!.@$#*()%~<>{}[]"; var combinations = 0; @@ -346,7 +346,7 @@ function hesk_checkPassword(password) var totalCombinations = Math.pow(combinations, password.length); var timeInSeconds = (totalCombinations / 200) / 2; var timeInDays = timeInSeconds / 86400 - var lifetime = 3650; + var lifetime = 365000; var percentage = timeInDays / lifetime; var friendlyPercentage = hesk_cap(Math.round(percentage * 100), 98); diff --git a/hesk_style.css b/hesk_style.css index 56c11b6f..99749089 100644 --- a/hesk_style.css +++ b/hesk_style.css @@ -485,8 +485,8 @@ div.success { } div.notice { - border: 1px solid #fcefa1; - background: #fbf9ee; + border: 1px solid #fcefa1; + background: #fff9de; color: #363636; padding: 10px; vertical-align: middle; diff --git a/hesk_style_RTL.css b/hesk_style_RTL.css index d866def8..8a390bdd 100644 --- a/hesk_style_RTL.css +++ b/hesk_style_RTL.css @@ -486,7 +486,7 @@ div.success { div.notice { border: 1px solid #fcefa1; - background: #fbf9ee; + background: #fff9de; color: #363636; padding: 10px; vertical-align: middle; diff --git a/inc/admin_functions.inc.php b/inc/admin_functions.inc.php index 18c60720..6a2d0f0b 100644 --- a/inc/admin_functions.inc.php +++ b/inc/admin_functions.inc.php @@ -1,12 +1,12 @@ 4294967296) + { + $ip = 4294967296; + } + $res = hesk_dbQuery("SELECT `id` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."banned_ips` WHERE {$ip} BETWEEN `ip_from` AND `ip_to` LIMIT 1"); return ( hesk_dbNumRows($res) == 1 ) ? hesk_dbResult($res) : false; @@ -1273,7 +1283,7 @@ function hesk_makeURL($text, $class = '') // matches an email address $text = preg_replace_callback( - '#(^|[\n\t (>.])(([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?))#i', + '/(^|[\n\t (>])(' . '(?:(?:(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|\x5c(?=[@,"\[\]\x5c\x00-\x20\x7f-\xff]))(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|(?<=\x5c)[@,"\[\]\x5c\x00-\x20\x7f-\xff]|\x5c(?=[@,"\[\]\x5c\x00-\x20\x7f-\xff])|\.(?=[^\.])){1,62}(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|(?<=\x5c)[@,"\[\]\x5c\x00-\x20\x7f-\xff])|[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]{1,2})|"(?:[^"]|(?<=\x5c)"){1,62}")@(?:(?!.{64})(?:[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.?|[a-zA-Z0-9]\.?)+\.(?:xn--[a-zA-Z0-9]+|[a-zA-Z]{2,6})|\[(?:[0-1]?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:[0-1]?\d?\d|2[0-4]\d|25[0-5])){3}\])' . ')/iu', create_function( "\$matches", "return make_clickable_callback(MAGIC_URL_EMAIL, \$matches[1], \$matches[2], '', '$class');" diff --git a/inc/email_functions.inc.php b/inc/email_functions.inc.php index 0dfd974a..222ea75a 100644 --- a/inc/email_functions.inc.php +++ b/inc/email_functions.inc.php @@ -1,12 +1,12 @@ $name) + foreach ($admins as $staff_id => $staff_name) { - echo ''; + echo ''; } ?> diff --git a/inc/ticket_list.inc.php b/inc/ticket_list.inc.php index 290b7981..b88049ca 100644 --- a/inc/ticket_list.inc.php +++ b/inc/ticket_list.inc.php @@ -1,12 +1,12 @@ 0) // Print date submitted if ( hesk_show_column('dt') ) { - switch ($hesk_settings['updatedformat']) + switch ($hesk_settings['submittedformat']) { case 1: $ticket['dt'] = hesk_formatDate($ticket['dt']); diff --git a/index.php b/index.php index 10f1728e..00b34506 100644 --- a/index.php +++ b/index.php @@ -1,12 +1,12 @@ Other +$hesk_settings[\'submittedformat\']=\'' . $set['submittedformat'] . '\'; $hesk_settings[\'updatedformat\']=\'' . $set['updatedformat'] . '\'; @@ -721,7 +722,7 @@ Under no circumstance is the removal of copyright headers from the script source TRADEMARK POLICY -HESK is a US registered trademark of Klemen Stirn. Certain usages of the Trademark are fine and no specific permission from the author is needed: +HESK is a US and EU registered trademark of Klemen Stirn. Certain usages of the Trademark are fine and no specific permission from the author is needed: - there is no commercial intent behind the use @@ -887,7 +888,7 @@ function hesk_iFooter() global $hesk_settings; ?> -

 
Powered by Help Desk Software HESK - brought to you by Help Desk Software SysAid

+

 
Powered by Help Desk Software HESK, brought to you by SysAid

diff --git a/knowledgebase.php b/knowledgebase.php index 75c43c89..3777f33d 100644 --- a/knowledgebase.php +++ b/knowledgebase.php @@ -1,12 +1,12 @@
Consider adding more articles to the knowledgebase to improve search and article suggestion results.'; +$hesklang['saa']='Sticky articles are displayed at the top of articles list'; +$hesklang['yhbr']='You have been locked out the system for %s minutes because of too many replies to a ticket.'; $hesklang['sir']='ReCaptcha V1 API (old)'; $hesklang['sir2']='ReCaptcha V2 API (recommended)'; $hesklang['rcpb']='Site key (Public key)'; diff --git a/print.php b/print.php index b66f6a91..a9044d83 100644 --- a/print.php +++ b/print.php @@ -1,12 +1,12 @@ NOW() LIMIT 1"); +if (hesk_dbNumRows($res) == 1) +{ + if (hesk_dbResult($res) >= $hesk_settings['attempt_limit']) + { + unset($_SESSION); + hesk_error( sprintf($hesklang['yhbb'],$hesk_settings['attempt_banmin']) , 0); + } +} + /* Get details about the original ticket */ $res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `trackid`='{$trackingID}' LIMIT 1"); if (hesk_dbNumRows($res) != 1) @@ -154,6 +165,22 @@ if ($ticket['locked']) exit(); } +// Prevent flooding ticket replies +$res = hesk_dbQuery("SELECT `staffid` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` WHERE `replyto`='{$ticket['id']}' AND `dt` > DATE_SUB(NOW(), INTERVAL 10 MINUTE) ORDER BY `id` ASC"); +if (hesk_dbNumRows($res) > 0) +{ + $sequential_customer_replies = 0; + while ($tmp = hesk_dbFetchAssoc($res)) + { + $sequential_customer_replies = $tmp['staffid'] ? 0 : $sequential_customer_replies + 1; + } + if ($sequential_customer_replies > 10) + { + hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."logins` (`ip`, `number`) VALUES ('".hesk_dbEscape($_SERVER['REMOTE_ADDR'])."', ".intval($hesk_settings['attempt_limit'] + 1).")"); + hesk_error( sprintf($hesklang['yhbr'],$hesk_settings['attempt_banmin']) , 0); + } +} + /* Insert attachments */ if ($hesk_settings['attachments']['use'] && !empty($attachments)) { diff --git a/submit_ticket.php b/submit_ticket.php index cec71ea6..4d6cde89 100644 --- a/submit_ticket.php +++ b/submit_ticket.php @@ -1,12 +1,12 @@