diff --git a/classes/LoginFail.php b/classes/LoginFail.php
index c5914c639..6b6bf33b0 100644
--- a/classes/LoginFail.php
+++ b/classes/LoginFail.php
@@ -22,7 +22,7 @@
class LoginFailCore extends ObjectModel
{
- public $id_failed_login;
+ public $id_login_fail;
public $ip_address;
public $email;
public $created_at;
@@ -77,11 +77,11 @@ class LoginFailCore extends ObjectModel
$hours_ago = time() - self::HOUR;
$ip_address = Tools::getRemoteAddr();
- $has_error = $this->getUserFailedCount($minutes_ago, $email, false, self::USERNAME_ATTEMPTS_PER_QUARTER_HOUR)? true : $has_error;
- $has_error = $this->getUserFailedCount($minutes_ago, false, $ip_address, self::IP_ATTEMPTS_QUARTER_HOUR)? true : $has_error;
- $has_error = $this->getUserFailedCount($hours_ago, $email, false, self::USERNAME_ATTEMPTS_PER_HOUR)? true : $has_error;
- $has_error = $this->getUserFailedCount($hours_ago, false, $ip_address, self::IP_ATTEMPTS_PER_HOUR)? true : $has_error;
+ $has_error |= $this->getUserFailedCount($minutes_ago, $email, false, self::USERNAME_ATTEMPTS_PER_QUARTER_HOUR)? true : $has_error;
+ $has_error |= $this->getUserFailedCount($minutes_ago, false, $ip_address, self::IP_ATTEMPTS_QUARTER_HOUR)? true : $has_error;
+ $has_error |= $this->getUserFailedCount($hours_ago, $email, false, self::USERNAME_ATTEMPTS_PER_HOUR)? true : $has_error;
+ $has_error |= $this->getUserFailedCount($hours_ago, false, $ip_address, self::IP_ATTEMPTS_PER_HOUR)? true : $has_error;
return $has_error;
}
-}
+}
\ No newline at end of file
diff --git a/install/data/db_structure.sql b/install/data/db_structure.sql
index 60fc52813..fb031152b 100644
--- a/install/data/db_structure.sql
+++ b/install/data/db_structure.sql
@@ -2687,3 +2687,11 @@ CREATE TABLE IF NOT EXISTS `PREFIX_cms_role_lang` (
PRIMARY KEY (`id_cms_role`,`id_lang`, id_shop)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `PREFIX_login_fail` (
+ `id_login_fail` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `ip_address` varchar(50) NOT NULL,
+ `email` varchar(128) NOT NULL,
+ `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id_login_fail`)
+) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
\ No newline at end of file
diff --git a/themes/hotel-reservation-theme/css/maintenance.css b/themes/hotel-reservation-theme/css/maintenance.css
index 32f6de2c6..9ff35daca 100644
--- a/themes/hotel-reservation-theme/css/maintenance.css
+++ b/themes/hotel-reservation-theme/css/maintenance.css
@@ -1,6 +1,10 @@
/*********************************************************************
Maintenance Page Styles
**********************************************************************/
+body {
+ font: 14px;
+ font-family: "Open Sans";
+}
#body {
background-color: #F7F7F7; }
@@ -84,11 +88,21 @@ button[type='button'].cancel-login {
}
.alert {
- padding: 5px;
- margin-bottom: 10px;
+ position: relative;
+ padding: 0.8rem 1.5rem;
+ margin-bottom: 1rem;
border: 1px solid transparent;
- border-radius: 0px;
- font-weight: bold;
+ border-radius: 0.25rem;
+}
+
+.alert ol {
+ margin: 5px;
+}
+
+.alert li {
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
}
.alert.alert-danger p {
@@ -100,9 +114,9 @@ button[type='button'].cancel-login {
}
.alert-danger {
- background-color: #FD6E6A;
- border-color: #FD6E6A;
- color: #fff;
+ color: #842029;
+ background-color: #f8d7da;
+ border-color: #f5c2c7;
}
.alert.alert-danger {
@@ -115,19 +129,18 @@ button[type='button'].cancel-login {
color: #FFF;
}
- #maintenance .logo {
- padding: 12px;
- text-align: center; }
- #maintenance h1 {
- font: 24px "Open Sans", sans-serif;
- color: #333;
- padding: 0 0 14px 0;
- margin: 0 0 19px 0; }
- #maintenance #message {
- font: 14px "Open Sans", sans-serif;
- padding: 0 0 0 18px;
- color: #555454;
- text-align: center; }
+#maintenance .logo {
+ padding: 12px;
+ text-align: center; }
+#maintenance h2 {
+ font: 24px;
+ color: #333;
+ padding: 0 0 14px 0;
+ margin: 0 0 19px 0; }
+#maintenance #message {
+ padding: 0 0 0 18px;
+ color: #555454;
+ text-align: center; }
.container {
padding-right: 15px;
@@ -149,4 +162,4 @@ button[type='button'].cancel-login {
padding-left: 0;
padding-right: 0; } }
-/*# sourceMappingURL=maintenance.css.map */
+/*# sourceMappingURL=maintenance.css.map */
\ No newline at end of file
diff --git a/themes/hotel-reservation-theme/maintenance.tpl b/themes/hotel-reservation-theme/maintenance.tpl
index 3c9bf04f1..d07051087 100644
--- a/themes/hotel-reservation-theme/maintenance.tpl
+++ b/themes/hotel-reservation-theme/maintenance.tpl
@@ -25,6 +25,7 @@
+
{$meta_title|escape:'html':'UTF-8'}
@@ -41,13 +42,24 @@
+
-

+
- {include file="$tpl_dir./errors.tpl"}
+ {if isset($errors) && $errors}
+
+
{l s='Error!'}
+
+ {foreach from=$errors key=k item=error}
+ - {$error}
+ {/foreach}
+
+
+ {/if}
@@ -60,32 +72,33 @@
{l s='We are currently updating our site and will be back really soon.'}
{l s='Thanks for your patience!'}
{if isset($allowEmployee) && $allowEmployee}
-
-
Are you member?
-
+
+
{l s='Are you member?'}
+
+
\ No newline at end of file