mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Changed USER_IP to $user_ip
git-svn-id: file:///svn/phpbb/trunk@95 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d3d031d9ee
commit
66bc8a309b
2 changed files with 4 additions and 6 deletions
|
@ -26,9 +26,7 @@ include('config.'.$phpEx);
|
||||||
include('includes/constants.'.$phpEx);
|
include('includes/constants.'.$phpEx);
|
||||||
|
|
||||||
// Find Users real IP (if possible)
|
// Find Users real IP (if possible)
|
||||||
$ip = ($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR;
|
$user_ip = ($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR;
|
||||||
define("USER_IP",$ip);
|
|
||||||
unset($ip);
|
|
||||||
|
|
||||||
// Setup what template to use. Currently just use default
|
// Setup what template to use. Currently just use default
|
||||||
include('includes/template.inc');
|
include('includes/template.inc');
|
||||||
|
@ -71,7 +69,7 @@ else
|
||||||
include('language/lang_'.$default_lang.'.'.$phpEx);
|
include('language/lang_'.$default_lang.'.'.$phpEx);
|
||||||
|
|
||||||
// Check if user is banned
|
// Check if user is banned
|
||||||
if(!auth("ip ban", $db, "", USER_IP))
|
if(!auth("ip ban", $db, "", $user_ip))
|
||||||
{
|
{
|
||||||
error_die($db, BANNED);
|
error_die($db, BANNED);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +77,7 @@ if(!auth("ip ban", $db, "", USER_IP))
|
||||||
if(isset($HTTP_COOKIE_VARS[$session_cookie]))
|
if(isset($HTTP_COOKIE_VARS[$session_cookie]))
|
||||||
{
|
{
|
||||||
$sessid = $HTTP_COOKIE_VARS[$session_cookie];
|
$sessid = $HTTP_COOKIE_VARS[$session_cookie];
|
||||||
$userid = get_userid_from_session($sessid, $session_cookie_time, USER_IP, $db);
|
$userid = get_userid_from_session($sessid, $session_cookie_time, $user_ip, $db);
|
||||||
|
|
||||||
if ($userid)
|
if ($userid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ if($submit)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sessid = new_session($userdata[user_id], USER_IP, $session_cookie_time, $db);
|
$sessid = new_session($userdata[user_id], $user_ip, $session_cookie_time, $db);
|
||||||
set_session_cookie($sessid, $session_cookie_time, $session_cookie, "", "", 0);
|
set_session_cookie($sessid, $session_cookie_time, $session_cookie, "", "", 0);
|
||||||
header("Location: index.$phpEx");
|
header("Location: index.$phpEx");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue