diff --git a/inc/common.inc.php b/inc/common.inc.php
index 1ba32f78..21e399a7 100644
--- a/inc/common.inc.php
+++ b/inc/common.inc.php
@@ -1,7 +1,7 @@
+
+ '; ?>
+
+
+
+ NOW( ) THEN 1 ELSE 0 END) AS `banned` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."logins` WHERE `ip`='".hesk_dbEscape($ip)."' LIMIT 1");
+ $res = hesk_dbQuery("SELECT `number`, (CASE WHEN `last_attempt` IS NOT NULL AND DATE_ADD(`last_attempt`, INTERVAL ".intval($hesk_settings['attempt_banmin'])." MINUTE ) > NOW() THEN 1 ELSE 0 END) AS `banned` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."logins` WHERE `ip`='".hesk_dbEscape($ip)."' LIMIT 1");
/* Not in the database yet? Add first one and return false */
if (hesk_dbNumRows($res) != 1)
@@ -702,6 +768,9 @@ function hesk_process_messages($message,$redirect_to,$type='ERROR')
case 'NOTICE':
$_SESSION['HESK_NOTICE'] = TRUE;
break;
+ case 'INFO':
+ $_SESSION['HESK_INFO'] = TRUE;
+ break;
default:
$_SESSION['HESK_ERROR'] = TRUE;
}
@@ -741,6 +810,10 @@ function hesk_handle_messages()
{
hesk_show_notice($_SESSION['HESK_MESSAGE']);
}
+ elseif ( isset($_SESSION['HESK_INFO']) )
+ {
+ hesk_show_info($_SESSION['HESK_MESSAGE']);
+ }
hesk_cleanSessionVars('HESK_MESSAGE');
}
@@ -749,6 +822,7 @@ function hesk_handle_messages()
hesk_cleanSessionVars('HESK_ERROR');
hesk_cleanSessionVars('HESK_SUCCESS');
hesk_cleanSessionVars('HESK_NOTICE');
+ hesk_cleanSessionVars('HESK_INFO');
// Secondary message
if ( isset($_SESSION['HESK_2ND_NOTICE']) && isset($_SESSION['HESK_2ND_MESSAGE']) )
@@ -762,39 +836,55 @@ function hesk_handle_messages()
} // END hesk_handle_messages()
-function hesk_show_error($message,$title='') {
+function hesk_show_error($message,$title='',$append_colon=true) {
global $hesk_settings, $hesklang;
$title = $title ? $title : $hesklang['error'];
+ $title = $append_colon ? $title . ':' : $title;
?>
- :
+
- :
+
- :
+
+
+
+
+
+
+
+
+
+ |
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |