*************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: common.php,v 1.74.2.3 2002/05/13 13:18:17 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: common.php,v 1.74.2.10 2003/06/04 17:41:39 acydburn Exp $ * * ***************************************************************************/ *************** *** 112,118 **** if( !defined("PHPBB_INSTALLED") ) { ! header("Location: install.$phpEx"); exit; } --- 112,118 ---- if( !defined("PHPBB_INSTALLED") ) { ! header("Location: install/install.$phpEx"); exit; } *************** *** 124,161 **** include($phpbb_root_path . 'includes/db.'.$phpEx); // - // Mozilla navigation bar - // Default items that should be valid on all pages. - // Defined here and not in page_header.php so they can be redefined in the code - // - $nav_links['top'] = array ( - 'url' => append_sid($phpbb_root_dir."index.".$phpEx), - 'title' => sprintf($lang['Forum_Index'], $board_config['sitename']) - ); - $nav_links['search'] = array ( - 'url' => append_sid($phpbb_root_dir."search.".$phpEx), - 'title' => $lang['Search'] - ); - $nav_links['help'] = array ( - 'url' => append_sid($phpbb_root_dir."faq.".$phpEx), - 'title' => $lang['FAQ'] - ); - $nav_links['author'] = array ( - 'url' => append_sid($phpbb_root_dir."memberlist.".$phpEx), - 'title' => $lang['Memberlist'] - ); - - // // Obtain and encode users IP // if( getenv('HTTP_X_FORWARDED_FOR') != '' ) { $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) ) { ! $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/'); ! $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); } } else --- 124,151 ---- include($phpbb_root_path . 'includes/db.'.$phpEx); // // Obtain and encode users IP // if( getenv('HTTP_X_FORWARDED_FOR') != '' ) { $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! $entries = explode(',', getenv('HTTP_X_FORWARDED_FOR')); ! reset($entries); ! while (list(, $entry) = each($entries)) ! { ! $entry = trim($entry); ! if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) ) ! { ! $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.((1[6-9])|(2[0-9])|(3[0-1]))\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/'); ! $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); ! ! if ($client_ip != $found_ip) { ! $client_ip = $found_ip; ! break; ! } ! } } } else