require($INC);
}
-// @TODO Replace with own template!
-OPEN_TABLE("500", "guest_login_header dashed", "center");
-OUTPUT_HTML("<br /><strong>".VALIDATING_LOGIN."</strong><br />");
+// Initial message part
+$MSG = "<strong>{!VALIDATING_LOGIN!}</strong>";
-if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash')) && (isSessionVariableSet('lifetime'))) {
- // Login failtures are supported since 0.4.7
+if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) {
+ // Login failures are supported since 0.4.7
// Do we have 0.4.7 of sql_patches or later?
$ADD = "";
- if (GET_EXT_VERSION("sql_patches") >= "0.4.7") {
+ if (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
// Load them here
- $ADD = ", login_failtures, UNIX_TIMESTAMP(last_failture) AS last_failture";
+ $ADD = ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure";
} // END - if
// Get theme from profile
SQL_FREERESULT($result);
// Change to new theme
- set_session("mxchange_theme", $data['curr_theme']);
+ set_session('mxchange_theme', $data['curr_theme']);
- // Remmeber login failtures if available
- if (GET_EXT_VERSION("sql_patches") >= "0.4.7") {
- // Reset login failtures
+ // Remmeber login failures if available
+ if (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
+ // Reset login failures
SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
-SET login_failtures=0, last_failture='0000-00-00 00:00:00'
+SET login_failures=0, last_failure='0000-00-00 00:00:00'
WHERE userid=%s
LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Store it in session
- set_session('mxchange_member_failtures', $data['login_failtures']);
- set_session('mxchange_member_last_fail', $data['last_failture']);
+ set_session('mxchange_member_failures', $data['login_failures']);
+ set_session('mxchange_member_last_fail', $data['last_failure']);
} // END - if
// Bonus is not given by default ;-)
if (($bonus) && ($_GET['mode'] == "bonus") && (EXT_IS_ACTIVE("bonus"))) {
// Output message with added points
- OUTPUT_HTML("<font class=\"tiny\">
- ".BONUS_LOGIN_BONUS_ADDED_1."
- <strong>".TRANSLATE_COMMA(getConfig('login_bonus'))." ".POINTS."</strong>
- ".BONUS_LOGIN_BONUS_ADDED_2."
-</font>");
+ $MSG .= "<div class=\"tiny\">
+ {!BONUS_LOGIN_BONUS_ADDED_1!}
+ <strong>".TRANSLATE_COMMA(getConfig('login_bonus'))." {!POINTS!}</strong>
+ {!BONUS_LOGIN_BONUS_ADDED_2!}
+</div>";
} elseif (EXT_IS_ACTIVE("bonus")) {
// No login bonus added!
- OUTPUT_HTML("<font class=\"member_failed\">".BONUS_LOGIN_BONUS_NOT_ADDED."</font>");
+ $MSG .= "<div class=\"member_failed\">{!BONUS_LOGIN_BONUS_NOT_ADDED!}</div>";
}
// Redirect to member area
- LOAD_TEMPLATE("member_login_js");
+ $MSG .= LOAD_TEMPLATE("member_login_js", true);
} else {
// Login failed!
- LOAD_TEMPLATE("login_failed_js");
+ $MSG .= LOAD_TEMPLATE("login_failed_js", true);
}
-// Close table
-CLOSE_TABLE();
+// Output final message
+LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
//
?>