<?php

/***************************************************************************
 *			config.php	                                   *
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~	                   *
 *   File Info:		  EZ Shopper Settings                              *
 *   Copyright:       Copyright 2003 http://www.128concepts.com            *
 *						                           *
 ***************************************************************************/

// ******* User defined variables ******

// NOTE: $server is the name of your dedicated server
// $user - this is your username.
// $password - this is your password.
// $database - this is the name of the database assigned on the server. If your host server permits you to create and delete
// a newdatabase. The database name would be 'mydata'. Otherwise the database name is the name your server provided has
// assigned you. The set up variables you may enquire from your server provider. N.B If you wish not to use the name 'mydata'.
// You must change the reference of it in the files 'create_db1.php' and 'delete_db1.php'

$server = "";
$user= "";
$password= "";
$database = "";					
$color = "#00CC00";
$highlight = "#DD0000";
$backcolor="#ccddff";
$backcolor1 = "#00CCFF";
$min_cost = "50";        // min & max cost for which postage and shipping applies!
$shipcost = "2.95";     // fixed costs for shipping & handling
$shipopt = "NO";	// default = NO i.e used shipping defined in settings if YES use shipping/delivery 
$company = "128 Concepts";    // your company name
$cline1 = "PO BOX 11236";
$cline2 = "King's Norton";
$cline3 = "Birmingham";
$cline4 = "B30 1YA";
$stockopt = "YES";     // NO - do no stock inventory YES - do stock inventory //
$usedata = "YES";     // No - YES; set the variables YES use SQL settings //
$admin_name = "128 Concepts";				// This is your email name you use for sending orders etc
$admin_mail = "technical@128concepts.com";			// You can change this if you want to your email address etc.
$admin_sales = "sales@128concepts.com";			// This is sales address for your company
$viewing = "YES";						// View products by pages - set to NO to display all products.
$style = "2";						// Normal table style - use for testing (1) 
							// Secondary style - default (2)

$site_info_url = "./info/";					// url link where you keep information/description of each product.
$usecat = "YES";						// Permit admin. to add user own defined categories
							// YES - permit NO - use default categories
$items = "5";						// Number of items before use page view mode
$phpcart = "NO";						// phpcart mode NO - use default mode YES - phpcart mode
$noshow = "NO";						// NO - display no broswer redirect message - YES = show browser redirect message

// *************** Your site variables *****************//

$site_company = "Your company";
$site_address = "Your address1, Your address2,Your address3";
$site_town = "Your town";
$site_county = "Your county";
$site_postcode = "Your Zip or Post Code";
$site_country = "Your Country";
$site_tel = "Tel: Your Telephone";
$site_email = "email:yourname@yourcompany.com.";
$footer = "------ Developed by 128 Concepts Copyright 2002-2003 ------";
$currency = "£";
$site_currency = "gbp";
$header = "EZ Shopper Information";
$store_url = "http://www.128concepts.com/myshop/images/";		// images directory
$site_url = "http://www.128concepts.com/myshop/store.php"; 		// your site's main store page - change to suit your site
$prod_url = "http://www.128concepts.com/myshop/shop_showitem.php?pid=";          // link to show product
$menus = "ON";   // ON - show the menu component OFF - no show menu component
$links = "OFF";	// ON - show links OFF - show no links
$showmenu = "ON"; // ON - show menu OFF - show no menu
$searchs = "ON";   // ON - show search box component NO - no show search box component
$showcat = "ON";  // ON - show show categories component NO - no show categories component
$showpops = "ON"; // show most popular menu
$cart = "ON"; // show shopping cart menu
$disptab = "ON";
//*********************************************************//

if ($usedata == "YES")
{
	$table = "setting";
	$conn = @mysql_connect($server,$user,$password)
	or die("Unable to connect to SQL database...");
	$rs = @mysql_select_db($database,$conn) 
		or die("Unable to select the database... Please press 'Create Database' to create new database.");

	$sql = "SELECT * from $table";
	$result=mysql_query($sql,$conn);
	if ($result)
	{
		$row=mysql_fetch_array($result);
		$mincost=$row["mincost"];
		$shipcost=$row["shipcost"];
		$company=$row["company"];
		$cline1 = $row["cline1"];
		$cline2 = $row["cline2"];
		$cline3 = $row["cline3"];
		$cline4 = $row["cline4"];
		$sitecompany = $row["sitecompany"];
		$siteaddress = $row["siteaddress"];
		$sitetown = $row["sitetown"];
		$sitecounty = $row["sitecounty"];
		$sitepostcode = $row["sitepostcode"];
		$sitecountry = $row["sitecountry"];
		$sitetel = $row["sitetel"];
		$siteemail = $row["siteemail"];
		$footer = $row["footer"];
		$color = $row["color"];
		$highlight = $row["highlight"];
		$backcolor = $row["backcolor"];
		$backcolor1 = $row["backcolor1"];
		$scurrency =$row["scurrency"];
		$usecat = $row["usecat"];
		$hits = $row["hits"];
		$shiprates = $row["shiprates"];
	
		# set curreny for site
	
		if ($scurrency == "cad") $currency = "$";
		if ($scurrency == "aud") $currency = "$";
		if ($scurrency == "usd") $currency = "$";
		if ($scurrency == "gbp") $currency = "£";
		if ($scurrency == "jpy") $currency = "¥";
		if ($scurrency == "eur") $currency = "€";

		# get world currency
		
		$wcurrency = $row["wcurrency"];
		$conv1 = $row["conv1"];
		$conv2 = $row["conv2"];
		$conv3 = $row["conv3"];
		$conv4 = $row["conv4"];
		$conv5 = $row["conv5"];
		$zone1 = $row["zone1"];
		$zone2 = $row["zone2"];
		$zone3 = $row["zone3"];

	}
}		
?>
