
<script language="JavaScript">
function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
</script>

<body topmargin="0" leftmargin="0">

<?php
/***************************************************************************
 *			sidebars.php                        	           *
 *                     	          				           *
 *   File Info:		  SIDEBAR                                          *
 *   Copyright:       Copyright 2003 http://www.128concepts.com            *
 *						                           *
 ***************************************************************************/
# code to get no. of products from database.

$table= "products";
$sel_item_totalprice = $sel_item_qty * $sel_item_price;
$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 'mydata'...Please press 'Create Database' to create new database.");
$itemcount = "SELECT pid FROM $table";
$res = mysql_query($itemcount,$conn);
$nprods = mysql_num_rows($res);
$table = "category";
$sqls = "SELECT * from $table order by category";
$rst = mysql_query($sqls,$conn);
$number = mysql_num_rows($rst);
$cats = $number;

?>

 <?php

################ display default / user defined links ######################

$word1 = "Link 1";
$word2 = "Link 2";
$word3 = "Link 3";
$word4 = "Link 4";
$word5 = "Link 5";
$word6 = "Link 6";
$word7 = "Link 7";
$word8 = "Link 8";
$word9 = "Payments: ";
$word10 = "Store Currency: ";
$word11 = "Site Hits: ";
$link1 = "";
$link2 = "";
$link3 = "";
$link4 = "";
$link5 = "";
$link6 = "";
$link7 = "";
$link8 = "";

include_once("./config.php");
if ($scurrency == "gbp")
	$stc = "UK Sterling";
if ($scurrency == "usd")
	$stc = "US Dollars";
if ($scurrency == "eur")
	$stc = "Euros";
if ($scurrency == "jpy")
	$stc = "Japanese Yen";
if ($scurrency == "cad")
	$stc = "Canadian Dollars";
$table = "setting";
$conn = @mysql_connect($server,$user,$password) 
   or die("Sorry - could not connect to MySQL");

$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";
$rs = mysql_query($sql,$conn)
	or die("Could not execute SQL query!!! Possibly SQL query");
$rows = mysql_fetch_array($rs);
$hits = $rows["hits"];
if ($hits >= 0) 
{
	$hits += 1;
	$sqls = "UPDATE $table set hits = $hits";
	$rs = mysql_query($sqls,$conn);
}
?>
        

<?php
	if ($disptab == "OFF")
	{
	if ($menus=="ON")
		include_once("showlinks.php");
	if ($cart == "ON")
		include_once("showcart.inc");
	if ($showcat=="ON")
		include_once("showcats.inc");
	if ($searchs == "ON")
		include_once("show-searchs.inc");
	if ($showpops == "ON")
		include_once("most-pops.inc");
	}
	if ($disptab == "ON")
	{
		if ($menus=="ON")
		include_once("tshowlinks.php");
		if ($cart == "ON")
		include_once("tshowcart.php");
		if ($showcat=="ON")
		include_once("tshowcats.inc");
		if ($searchs == "ON")
		include_once("tshow-searchs.inc");
		if ($showpops == "ON")
		include_once("tmost-pops.inc");
		
	}
	
?>

