X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fchk_login.php;h=14a9ee7a4c5d646e59807a9c60a05869081bf278;hb=6cf3cd12edf6371fc29d016c30ccd53836536211;hp=8bf1a9c3f0652516217b478182d455876e178771;hpb=99cab54d086b044c882670ef9e051ba85bf9771f;p=mailer.git
diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php
index 8bf1a9c3f0..14a9ee7a4c 100644
--- a/inc/modules/chk_login.php
+++ b/inc/modules/chk_login.php
@@ -40,10 +40,9 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
OPEN_TABLE("500", "guest_login_header dashed", "center");
-OUTPUT_HTML("
".VALIDATING_LOGIN."
");
+OUTPUT_HTML("
".VALIDATING_LOGIN."
");
-if (!empty($GLOBALS['userid']) && !empty($_COOKIE['u_hash']) && !empty($_COOKIE['lifetime']))
-{
+if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash')) && (isSessionVariableSet('lifetime'))) {
// Get theme from profile
$result = SQL_QUERY_ESC("SELECT curr_theme FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
@@ -51,16 +50,15 @@ if (!empty($GLOBALS['userid']) && !empty($_COOKIE['u_hash']) && !empty($_COOKIE[
SQL_FREERESULT($result);
// Change to new theme
- @setcookie("mxchange_theme", $NewTheme, (time() + 60*60*24*365), COOKIE_PATH);
- $_COOKIE['mxchange_theme'] = $NewTheme;
+ set_session("mxchange_theme", $NewTheme);
$bonus = false;
- if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && ($CONFIG['bonus_login_yn'] == 'N') && ($CONFIG['bonus_login_yn'] == 'Y')) {
+ if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && ($_CONFIG['bonus_login_yn'] == "N") && ($_CONFIG['bonus_login_yn'] == "Y")) {
// Update last login
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
SET last_login=UNIX_TIMESTAMP()
WHERE userid=%d AND last_login < (UNIX_TIMESTAMP() - %d)
-LIMIT 1", array($GLOBALS['userid'], $CONFIG['login_timeout']),
+LIMIT 1", array($GLOBALS['userid'], $_CONFIG['login_timeout']),
__FILE__, __LINE__);
if (SQL_AFFECTEDROWS($link) == 1) $bonus = true;
}
@@ -68,7 +66,7 @@ LIMIT 1", array($GLOBALS['userid'], $CONFIG['login_timeout']),
// Output message with added points
OUTPUT_HTML("
".BONUS_LOGIN_BONUS_ADDED_1."
- ".TRANSLATE_COMMA($CONFIG['login_bonus'])." ".POINTS."
+ ".TRANSLATE_COMMA($_CONFIG['login_bonus'])." ".POINTS."
".BONUS_LOGIN_BONUS_ADDED_2."
");
}