<?php
$objDB	= false;
$objDB	= @mysql_pconnect(DB_HOST, DB_USER, DB_PASSWORD);
if ($objDB) {
	@mysql_select_db(DB_DATABASE);
    @mysql_query("SET SESSION sql_mode ='' ");
}

//checking admin or client side code included only for client side
$CheckPath=explode('/admin/',$_SERVER['PHP_SELF']);
////////////CHECK FOR MAGIC QUOTES GPC//////////////////////
if (@get_magic_quotes_gpc()) {
    function stripslashes_deep($value){
        $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
        return $value;
    }
    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET  = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
/////////////////////////////////////////////////

if(!isset($_REQUEST['call_type'])){
if(count($CheckPath)<2)
{
	//set Number of records per page
	require_once ("classes/settings.class.php");
	$objSTChk	= new settings($objDB);
	$siteSettingsPage=$objSTChk->select();
	define('PAGESIZE',$siteSettingsPage['numberofrecords']);
}//end if
}
?>