Location: PHPKode > scripts > Particle Gallery > includes/global.php
<?php
// global.php include file
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// include relevant files
include("config.php");
include("constants.php");
include("functions.php");
include("database.php");
include("usersys.php");

// check for GD support
if (extension_loaded('gd')){
	$gd = TRUE;
} else {
	$gd = FALSE;
}

// database setup
if ($dbname == ""){
	redirect("install/install.php");
} else {
	$db = New Database($dbhost, $dbuser, $dbpass, $dbname);
	
	if ($db->execute("SELECT * FROM " . $dbprefix . "config", false, false) === false){
		redirect("install/install.php");
	}
}

// check for skin setting
if ($_GET["skinselector"] <> ""){
	skinset($_GET["skinselector"]);
}

// extract configuration from db
$config = Array();
$sql = "SELECT * FROM " . $dbprefix . "config";
$result = @$db->execute($sql);
if ( !($result) ){
	die("Could not query config table");
} else {
	do{
		// put config into array
		$config[$result->fields["config_name"]] = $result->fields["config_value"];
	} while($result->loop());
}

// initialise variables
$errormsg = "";

// create user system
$usr = New Usersys;
StartSession();
$usr->Auth(0);
?>
Return current item: Particle Gallery