View Single Post
Old 11-03-2003, 08:43 AM  
JamesK
hi
 
Industry Role:
Join Date: Jun 2002
Posts: 16,731
php changed my life

<?php

$noheader=1;

//require("./global.php");

set_magic_quotes_runtime(0);

error_reporting(7);

// ###################### Start init #######################

unset($dbservertype);
unset($debug);

//load config
require('./admin/config.php');
if ($debug != 1) {
unset($showqueries);
unset($explain);
}

// init db **********************
// load db class
$dbservertype = strtolower($dbservertype);
$dbclassname="./admin/db_$dbservertype.php";
require($dbclassname);

$DB_site=new DB_Sql_vb;

$DB_site->appname='vBulletin';
$DB_site->appshortname='vBulletin (forum)';
$DB_site->database=$dbname;
$DB_site->server=$servername;
$DB_site->user=$dbusername;
$DB_site->password=$dbpassword;

$DB_site->connect();

$dbpassword="";
$DB_site->password="";
// end init db

if (!empty($userid)) {
$userid = intval($userid);
} else if (!empty($HTTP_POST_VARS['userid'])) {
$userid = intval($HTTP_POST_VARS['userid']);
} else if (!empty($HTTP_GET_VARS['userid'])) {
$userid = intval($HTTP_GET_VARS['userid']);
} else {
$userid = 0;
}

if ($avatarinfo=$DB_site->query_first("SELECT avatardata,dateline,f
__________________
M3Server - NATS Hosting
JamesK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote