// session_start(); error_reporting(E_ERROR ); ini_set('display_errors',1);ini_set('display_startup_errors',1); error_reporting(0); $active_group = "production"; if($active_group=="local") { $connect['local']['user'] = "root"; $connect['local']['pass'] = ''; $connect['local']['db'] = "royalShop"; $connect['local']['domain'] = "localhost"; $connect['local']['path'] = "royal-shop/"; $connect['local']['appname'] = "RoyalShop"; $connect['local']['site'] = "http://" . $connect[$active_group]['domain'] . "/"; $connect['local']['url'] = $connect[$active_group]['site'] . $connect[$active_group]['path']; }else { /* for producttion */ $connect['production']['user'] = "oakleyc1_user"; $connect['production']['pass'] = 'PU`bW4?5{#TVvd:#'; $connect['production']['db'] = "oakleyc1_db"; $connect['production']['domain'] = "www.element72store.com"; $connect['production']['path'] = "/"; $connect['production']['site'] = "http://" . $connect[$active_group]['domain'] . "/"; $connect['production']['url'] = $connect[$active_group]['site'] . $connect[$active_group]['path']; $connect['production']['e_all_error'] = 0; $connect['production']['appname'] = "OAKLEY"; } $config['site'] = $connect[$active_group]['url']; $config['js'] = $connect[$active_group]['url']."js/"; $config['css'] = $connect[$active_group]['url']."css/"; $config['image'] = $connect[$active_group]['url']."images/"; $config['upload'] = $connect[$active_group]['url']."file_upload/"; $config['ACTION'] = $connect[$active_group]['url']."action/"; $config['ASSET'] = $connect[$active_group]['url']."assets/"; $config['appname'] = $connect[$active_group]['appname']; // set root of project define('ROOT',str_replace("\\",'/',dirname(__FILE__))); define('PATH', (ROOT == $_SERVER['DOCUMENT_ROOT']) ?'' :substr(ROOT,strlen($_SERVER['DOCUMENT_ROOT'])) ); set_include_path(get_include_path().PATH_SEPARATOR.ROOT); include 'lib/class.sql.php'; // include 'lib/data.php'; include 'lib/functions.php'; // include "lib/corefunction.php"; // include 'lib/html.php'; $x = new SQL("localhost",DB_USER,DB_PASSWORD,DB_NAME); function get_header_section($section){ global $x; $data = $x->ExecuteOne("select * from tb_header_image where section = '$section'"); return $data['image']; }