aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/db.php')
-rw-r--r--phpBB/db.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/phpBB/db.php b/phpBB/db.php
index 951235eabe..2a4dc39d79 100644
--- a/phpBB/db.php
+++ b/phpBB/db.php
@@ -37,81 +37,10 @@ switch($dbms)
break;
}
-
-// Setup what template to use. Currently just use default
-$template = new Template("./templates/Default", "keep");
-
// Make the database connection.
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
if(!$db)
{
error_die($db, SQL_CONNECT);
}
-
-// Check if user is banned
-if(!auth("ip ban", $db, "", "", "", "", "", $REMOTE_ADDR, "", "", ""))
-{
- error_die($db, BANNED);
-}
-
-// Initalize these variables to keep them safe.
-$user_logged_in = 0;
-$logged_in = 0;
-$userdata = Array();
-
-// Setup forum wide options.
-$sql = "SELECT * FROM ".CONFIG_TABLE." WHERE selected = 1";
-if(!$result = $db->sql_query($sql))
-{
- error_die($db, SQL_CONNECT);
-}
-else
-{
- $config = $db->sql_fetchrowset($result);
- $sitename = stripslashes($config[0]["sitename"]);
- $allow_html = $config[0]["allow_html"];
- $allow_bbcode = $config[0]["allow_bbcode"];
- $allow_sig = $config[0]["allow_sig"];
- $allow_namechange = $config[0]["allow_namechange"];
- $posts_per_page = $config[0]["posts_per_page"];
- $hot_threshold = $config[0]["hot_threshold"];
- $topics_per_page = $config[0]["topics_per_page"];
- $override_user_themes = $config[0]["override_themes"];
- $email_sig = stripslashes($config[0]["email_sig"]);
- $email_from = $config[0]["email_from"];
- $default_lang = $config[0]["default_lang"];
- $sys_lang = $default_lang;
-}
-
-if(isset($HTTP_COOKIE_VARS[$session_cookie]))
-{
- $sessid = $HTTP_COOKIE_VARS[$session_cookie];
- $userid = get_userid_from_session($sessid, $session_cookie_time, $REMOTE_ADDR, $db);
-
- if ($userid)
- {
- $user_logged_in = 1;
- update_session_time($sessid, $db);
-
- if(!auth("username ban", $db, $userid, "", "", "", "", "", "", "", ""))
- {
- error_die($db, BANNED);
- }
- $userdata = get_userdata_from_id($userid, $db);
- }
-}
-
-// If the user isn't logged in check if they have a user ID cookie.
-if (!$user_logged_in)
-{
- if(isset($HTTP_COOKIE_VARS[$cookie_name]))
- {
- $userdata = get_userdata_from_id($HTTP_COOKIE_VARS["$cookie_name"], $db);
- if(!auth("username ban", $db, $userdata["user_id"], "", "", "", "", "", "", "", ""))
- {
- error_die($db, BANNED);
- }
- }
-}
-
?>