<?php
$connected = "OK";
/***************************************************************************
 *			index.php                   	                   *
 *                     	          				           *
 *   File Info:		  Administrator's Panel                            *
 *   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='reglog.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='reglog.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();
}
$users = $user;
$conn = mysql_connect($server,$user,$password)
	or die("Opps, unable to connect to MYSQL...");
?>
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">
<html>

<head>
<style>A{text-decoration:none;}</style>
<style type="text/css">
<!--
.links {color: #000000}
.links:hover {color: #000080; text-decoration: none}
-->
</style>
<title>
128 Concepts EZ Shopper Administration Panel
</title>
<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>
</head>
<body><br><br>
<table width=70% cellpadding=2 cellspacing=0 border=0 bgcolor=CCCCFF align = center>
<tr><td>&nbsp;<font face=Verdana size=3><b>Administration Panel</b></font></td></tr></table>
<table width=70% cellpadding=0 cellspacing=0 border=0 bgcolor=CCCCFF align = center><tr><td valign=top>
<table width=100% cellpadding=1 cellspacing=2 border=0 align = center>
<tr bgcolor=ffffff><td>
&nbsp;<font face=Verdana size=2><b><img src =./images/window.gif><a href="./create_db.php">Create Database</a></b><br><small>&nbsp;Create a SQL database...</small></font></td></tr>
<tr bgcolor=ffffff><td>&nbsp;<font face=Verdana size=2><b><img src =./images/window.gif><a href="./delete_db.php">Delete Database</a></b><br><small>&nbsp;Delete a SQL database...</small></font></td></tr>
<tr bgcolor=ffffff><td>&nbsp;<font face=Verdana size=2><b><img src =./images/edit.gif><a href="./create_menu.php">Create Table</a></b><br><small>&nbsp;Create products stocks / contacts / stocks / orders table</small></font></td></tr>
<tr bgcolor=ffffff><td>&nbsp;<font face=Verdana size=2><b><img src =./images/edit.gif><a href="./add_menu.php">Add Record</a></b><br><small>&nbsp;Add products stocks / contacts / stocks record...</small></font><br>
</td></tr>
<tr bgcolor=ffffff><td>&nbsp;<font face=Verdana size=2><b><img src =./images/search.gif><a href="./view_menu.php">View Records</a></b><br><small>&nbsp;View all products stocks / contacts / stocks records...</small></font><br>
</td></tr>
<tr bgcolor=ffffff><td>&nbsp;<font face=Verdana size=2><b><img src =./images/private.gif><a href="./del_menu.php">Delete Records</a></b><br><small>&nbsp;Delete products stocks / contacts / stocks record...</small></font><br>
</td></tr>
<tr bgcolor=ffffff><td>&nbsp;<font face=Verdana size=2><b><img src =./images/search.gif><a href="./upd_menu.php">Update Records</a></b><br><small>&nbsp;Update products stocks / contacts / stocks record...</small></font><br>
</td></tr>
<tr bgcolor=ffffff><td><img src = "./images/catnophoto.gif" width = 32 height = 24><a href = "./upd_setting.php"><font face=verdana size=2>Update & maintain settings</font></a></td></tr>
<tr bgcolor=ffffff><td><img src = "./images/catnophoto.gif"  width = 32 height = 24><a href = "./email.php"><font face=verdana size=2>Email customers and contacts</font></a></td></tr>
<tr bgcolor=ffffff><td><img src = ./images/catnophoto.gif  width = 32 height = 24><a href = ./site-stats.php><font face=verdana size=2>View site statistics</font></a></td></tr><tr bgcolor=ffffff><td><img src = ./images/catnophoto.gif  width = 32 height =24>
<a href=javascript:newWindow('./redundant.php','acePopup',400,400,'')><font face=verdana size=2>View redundant orders</font></a></td></tr>
<tr bgcolor=ffffff><td><img src = ./images/catnophoto.gif  width = 32 height = 24><a href = ./customers.php><font face=verdana size=2>View all customers</font></a></td></tr>
</table></td></tr></table>	
<?php
echo "<br>";
echo "<center><font face=verdana size=2>Return back to <b><a href=./login.php>administrator menu</font></a></b>";
 include("./your-footer.inc");?>
</body>
</html>