<?php

ini_set('display_errors', 'On');
//ob_start("ob_gzhandler");
error_reporting(E_ALL);



// start the session

session_start();



// database connection config

$dbHost = 'localhost';

$dbUser = 'australd_austral';

$dbPass = 'australian';

$dbName = 'australd_asn';



// setting up the web root and server root for

// this shopping cart application

$thisFile = str_replace('\\', '/', __FILE__);

$docRoot = $_SERVER['DOCUMENT_ROOT'];

$_SERVER['HTTP_HOST'];

$webRoot  = str_replace(array($_SERVER['HTTP_HOST'], 'library/config.php'), '', $thisFile);

$srvRoot  = str_replace('library/config.php', '', $thisFile);



define('WEB_ROOT', "http://" . $_SERVER['HTTP_HOST'] . "/");


define('SRV_ROOT', $srvRoot);


// these are the directories where we will store all

// category and product images

define('FILE_DIR', 'files/');


if (!get_magic_quotes_gpc()) {

	if (isset($_POST)) {

		foreach ($_POST as $key => $value) {

			$_POST[$key] =  trim(addslashes($value));

		}

	}

	

	if (isset($_GET)) {

		foreach ($_GET as $key => $value) {

			$_GET[$key] = trim(addslashes($value));

		}

	}	

}



// since all page will require a database access

// and the common library is also used by all

// it's logical to load these library here

require_once 'database.php';

require_once 'common.php';



// get the shop configuration ( name, addres, etc ), all page need it

//$shopConfig = getShopConfig();

?>