1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-15 21:44:56 +01:00

IP encoding now done in common no need to encode anywhere else

git-svn-id: file:///svn/phpbb/trunk@346 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-05-27 16:40:25 +00:00
parent 2d0f44daf4
commit 2f0a6333aa

View File

@ -6,7 +6,11 @@
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
<<<<<<< common.php
* $Id$
=======
* $Id$
>>>>>>> 1.24
*
*
***************************************************************************/
@ -24,11 +28,14 @@
//
// Define some basic configuration arrays
// this also prevents malicious rewriting
// of language array values via URI params
//
$board_config = Array();
$userdata = Array();
$theme = Array();
$images = Array();
$lang = Array();
include('config.'.$phpEx);
include('includes/constants.'.$phpEx);
@ -51,9 +58,6 @@ $images['posticon'] = "$url_images/posticon.gif";
$images['folder'] = "$url_images/folder.gif";
$images['latest_reply'] = "$url_images/latest_reply.gif";
// Find Users real IP (if possible)
$user_ip = ($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR;
include('includes/template.inc');
include('includes/error.'.$phpEx);
@ -62,6 +66,10 @@ include('includes/auth.'.$phpEx);
include('includes/functions.'.$phpEx);
include('includes/db.'.$phpEx);
// Obtain and encode users IP
//$get_user_ip = ;
$user_ip = encode_ip(($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR);
//
// Setup forum wide options.
// This is also the first DB query/connect
@ -95,8 +103,10 @@ else
$board_config['sitename'] = stripslashes($config['sitename']);
$board_config['allow_html'] = $config['allow_html'];
$board_config['allow_bbcode'] = $config['allow_bbcode'];
$board_config['allow_smilies'] = $config['allow_smilies'];
$board_config['allow_sig'] = $config['allow_sig'];
$board_config['allow_namechange'] = $config['allow_namechange'];
$board_config['allow_avatar_upload'] = $config['allow_avatar_upload'];
$board_config['require_activation'] = $config['require_activation'];
$board_config['override_user_themes'] = $config['override_themes'];
$board_config['posts_per_page'] = $config['posts_per_page'];
@ -109,6 +119,8 @@ else
$board_config['board_email'] = stripslashes(str_replace("<br />", "\n", $config['email_sig']));
$board_config['board_email_from'] = stripslashes($config['email_from']);
$board_config['flood_interval'] = $config['flood_interval'];
$board_config['avatar_filesize'] = $config['avatar_filesize'];
$board_config['avatar_path'] = $config['avatar_path'];
}
include('language/lang_'.$board_config['default_lang'].'.'.$phpEx);