Location: PHPKode > projects > Xcomic > Xcomic_0.8.3/initialize.php
<?php
/**
Xcomic

//Initialize - creates global variables used throughout the script
//

$Id: initialize.php,v 1.7.4.1 2005/07/22 01:49:05 mikexstudios Exp $
*/

//Calculating the time needed to execute this script
$xcomicStartTime = strtok(microtime(), " ") + strtok(" ");

//$xcomicRootPath is defined in the file that includes this file
//Unfortunately, for sites with register_globals turned on, this poses
//a security theat--especially since $xcomicRootPath is being used in include
//statements. Therefore, check for hacking attempts
if ( !defined('IN_XCOMIC') )
{
	die("Hacking attempt");
}

//Include hacking check and php extension
include_once($xcomicRootPath.'extension.inc');

//Import global constants
include_once($xcomicRootPath.'includes/constants.'.$phpEx);

//Database---------------------------------------
	//Include database configuration information
	include_once($xcomicRootPath.'includes/config.'.$phpEx);
	
	//Include db.php
	include_once($xcomicRootPath.'includes/selectDatabase.'.$phpEx);
	
	//Create database object
	$xcomicDb = new sql_db($xcomicDbHost, $xcomicDbUser, $xcomicDbPasswd, $xcomicDbName, false);
	if(!$xcomicDb->db_connect_id)
	{
	   die('Could not connect to the database');
	}
//-----------------------------------------------

//Configuration Information----------------------
include_once($xcomicRootPath.'includes/Settings.'.$classEx);
$settings = new Settings();
//-----------------------------------------------


?>
Return current item: Xcomic