<html><head><title>128 Concepts EZ Shopper - Delete SETTING Table</title></head>
<body>
<?php
/***************************************************************************
 *			del_setting.php	                                   *
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~	                   *
 *   File Info:		  Delete setting                                   *
 *   Copyright:       Copyright 2003 http://www.128concepts.com            *
 *						                           *
 ***************************************************************************/
include("./config.php");
include("./header.inc");
include("./tests.php");
if ($_SESSION['admin'] == NULL)
{
 	echo "<br><br><center><img src=images/line.gif border=0 height=1 width=400></center><p align=\"center\"><img src=images/keybord1.gif border=0><b><strong><font face = Verdana size = 3>   Sorry you are not the administrator!</strong></font></b><br>Click here to return to log in screen  <a href='shop_showall.php'>here.</a>
<br><br><img src=images/line.gif border=0 height=1 width=400><br><br><br><br></p>";
	include("./your-footer.inc");  
	exit();
}
 if ((session_is_registered("admin")) and ($_SESSION['admin'] != "admin"))
{
 echo "<br><br><center><img src=images/line.gif border=0 height=1 width=400></center><p align=\"center\"><img src=images/keybord1.gif border=0><b><strong><font face = Verdana size = 3>   Sorry you are not the administrator!</strong></font></b><br>Click here to return to log in screen  <a href='shop_showall.php'>here.</a>
<br><br><img src=images/line.gif border=0 height=1 width=400><br><br><br><br></p>";
	include("./your-footer.inc");  
	exit();
}
?>

<img src=images/line.gif border=0 width=100% height=1><br><br>
<center><img src=images/computer.gif border=0><font face=verdana size=3 color=darkred> Deleting all SETTINGS i.e settings table</font></center><br>
<center>
<table width="500" border=1><tr align="justify" class="subtitle"><td>
  <p align="center">
  <img border="0" src="images/database.GIF" width="24" height="24"><font face=Verdana size=1><a href="./create_db.php">Create database</a>&nbsp;
  <img border="0" src="images/database.GIF" width="24" height="24"></font><a href="./delete_db.php"><font face=Verdana size=1>Delete database</font></a><font face="Verdana" size="1">&nbsp;
  <img border="0" src="images/Records.GIF" width="24" height="24"><a href="./create_menu.php">Create table</a>&nbsp;&nbsp;&nbsp;&nbsp;
  <img border="0" src="images/Records.GIF" width="24" height="24">&nbsp;
  </font> <a href="./add_menu.php"><font face=Verdana size=1>Add Record </font></a>  
  </p>
  <p align="center">&nbsp;<font face="Verdana" size="1"><img border="0" src="images/Records.GIF" width="24" height="24"></font><a href="./view_menu.php"><font face=verdana size=1>View Records</font></a>&nbsp;
  <font face="Verdana" size="1">&nbsp;&nbsp;&nbsp;
  <img border="0" src="images/Records.GIF" width="24" height="24"></font><a href="./del_menu.php"><font face=verdana size=1>Delete Record</font></a>
  <font face="Verdana" size="1">&nbsp;&nbsp;&nbsp;
  <img border="0" src="images/Records.GIF" width="24" height="24"></font> <a href="./upd_menu.php"><font face=verdana size=1>Update Record</font></a>&nbsp;
  <img border="0" src="images/home-to.GIF" width="24" height="24"><font face=verdana size=1>&nbsp; <a href="./index.php">Home</a></font>  </a></td></tr></table><br></center>
<?php

$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 = " DROP table $table";
$rs = mysql_query($sql,$conn)
	or die("Could not execute SQL query!!! Possibly SQL query already been executed.");

######################################################

	$table = "setting";
	### create table 6 ###
	$sql = "CREATE TABLE $table (setid char(6),mincost double,shipcost double,company char(100),cline1 char(100),cline2 char(100),cline3 char(100),cline4 char(20),sitecompany char(50),siteaddress char(150),sitetown char(50),sitecounty char(50),sitepostcode char(25),sitecountry char(50),sitetel char(50),siteemail char(75),footer char(150),color char(7),highlight char(7),backcolor char(7),backcolor1 char(7),online int,scurrency char(3),usecat char(3),wcurrency char(3),conv1 double,conv2 double,conv3 double,conv4 double,conv5 double,zone1 double,zone2 double,zone3 double,hits int)";
	$result=mysql_query($sql,$conn)
	or die("Unable to excute the SQL query!!! Possibly SQL command already executed");
	echo "<center><img src =./images/private.gif><font face=verdana size=2>Successfully created setting table on your SQL database.</font></center>";
	$sqls = "INSERT INTO $table (setid,mincost,shipcost,company,cline1,cline2,cline3,cline4,sitecompany,siteaddress,sitetown,sitecounty,sitepostcode,sitecountry,sitetel,siteemail,footer,color,highlight,backcolor,backcolor1,online,scurrency,usecat,wcurrency,conv1,conv2,conv3,conv4,conv5,zone1,zone2,zone3,hits) values('admin','50','2.95','128 Concepts','PO BOX 11236','Kings Norton','Birmingham','B30 1YA','Your company','Your address1, Your address2, Your address 3','Your town','Your county','Your Zip or Post Code','Your Country','Tel:Your Telephone','email:yourname@yourdomain.com','------ Developed by 128 Concepts Copyright 2002-2003 ?------','#00CC00','#DD0000','#FFFFFF','#00CCFF',0,'gbp','NO','NO',0,0,0,0,0,0,0,0,0)";
	$results=mysql_query($sqls,$conn)
	or die("Unable to excute the SQL query!!! Possibly SQL command already executed");
	if ($results)
	echo "<center><img src =./images/private.gif><font face=verdana size=2>Successfully created setting record on your SQL database.</font></center><br><img src=images/line.gif border=0 width=100% height=1><br>";
######################################################
include("./your-footer.inc");
?>
</body>
</html>