<?php
//error_reporting(E_ALL);
// database connection config
/* $dbHost = 'mysql50-16.wc2';
$dbUser = '424619_uigaporta';
$dbPass = 'Singapore1955';
$dbName = '424619_uigapersonalportal'; */
$dbHost = 'localhost';
$dbUser = 'root';
$dbPass = '';
$dbName = '424619_uigapersonalportal';
$thisFile = str_replace('\\', '/', __FILE__);
//$thisFile = '';
$docRoot = $_SERVER['DOCUMENT_ROOT'];
//$docRoot = '';
$webRoot = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
//$webRoot = '';
$srvRoot = str_replace('library/config.php', '', $thisFile);
//$srvRoot = '';
define('MYSQL_DB',$dbName);
define('WEB_ROOT', $webRoot);
define('SRV_ROOT', $srvRoot);
define('FILES_DIR', 'files/');
define('INC_DIR', 'includes/');
define('CATEGORY_IMAGE_DIR', 'images/category/');
define('LOGO_IMAGE_DIR', 'images/logo/');
define('BANNER', 'images/banner/');
//admin config
define('ADMIN_IMG_DIR', 'admin/images/');
define('ADMIN_INCLUDE', 'admin/include/');
define('ADMIN_PAGES', 'admin/pages/');
define('ADMIN_GALLERY', 'admin/gallery/');
define('ADMIN_GIRLS', 'admin/girls/');
define('ADMIN_BANNER', 'admin/banner/');
define('ADMIN_DATABASE', 'admin/database/');
define('PHOTO_ALBUMS', 'images/photos/');
define('PHOTO_GIRLS', 'images/girls/');
define('PHOTO_GGIRLS', 'images/girls/photos/');
define('PRODUCT_IMAGE_DIR', 'images/product/');
define('IMAGES', 'images/');
define('RANDOM_IMAGES', 'images/random/');
define('CSS_DIR','css/');
define('FEAT_RANGE',1000);
define('ADMIN_NOTICEBOARD', 'admin/noticeboard/');
define('CATEGORY_HOME', 'images/home/');
define('ADMIN_BLOG', 'admin/blog/');
define('PHOTO_DIR','images/photos/');
define('PHOTO_GIRL','images/girls/');
define('PHOTO_GGIRL','images/girls/photos/');
define('ADS_IMAGE_DIR','image/ads/');
define('MAX_CATEGORY_IMAGE_WIDTH', 75);
// the width for product thumbnail
define('THUMBNAIL_WIDTH', 104);
define('IMAGE_WIDTH', 100);
// do we need to limit the product image width?
// setting this value to 'true' is recommended
define('LIMIT_IMAGE_WIDTH', true);
// maximum width for all product image
define('MAX_IMAGE_WIDTH', 300);
define('LIMIT_PRODUCT_WIDTH', true);
// maximum width for all product image
define('MAX_PRODUCT_IMAGE_WIDTH', 300);
// start the session
session_start();
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';
?>