<html>
<head>
<title>Viewing All Redundant Orders</title>
	  <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
	  <link rel='stylesheet' href='../style.css' type='text/css'>

</head>
<body bgcolor = "#CCDDFF">
<?
 /***************************************************************************
 *			redundant.php                   	            *
 *                     	          				            *
 *   File Info:		  Handles redundant records                         *
 *   Copyright:       Copyright 2003 http://www.128concepts.com             *
 *						                            *
 ***************************************************************************/
include("./config.php");
$table= "myorders";
$conn = @mysql_connect($server,$user,$password)
	or die("Cannot connect to database");
$rs = @mysql_select_db($database,$conn) 
	or die("Unable to view product image");
// delete sessions more than 2 days old
$today_date=date("Ymd");
$expired_date = $today_date - 2;
$sql = "SELECT * from $table WHERE date_added <= '$expired_date'";

$result = mysql_query($sql,$conn);

$redun = mysql_num_rows($result);
if ($redun == NULL)
	$redun = 0;
echo("<img src=images/line.gif border=0 width=380><br><center><img src=images/srchfol.gif border=0><font face=verdana size=2 color=gray>  Viewing Redunant Orders</font></center><center><font face=verdana size=2 color=#000080><p align=justify>Searching the database has found the following number of redundant orders. Please decide what to do:</p>Redundant Orders: $redun</font></center><img src=images/line.gif border=0 width=380>");

echo("<br><br><center><a href =./killdata.php><img src = images/wrench.gif border = 0></a><br><b><font color = $highlight size=2 face=verdana>Delete the redundant orders</font></b></center>");
echo ("<br><p align=justify><font face = Verdana size = 2 color = #navy>If you wish to view all the records and individually select which orders to delete. You can do this by accessing the Administration panel and selecting View Records mode.</font></p>");
@session_start();
 if ((session_is_registered("empty")) and ($_SESSION['empty'] == "true"))
{
echo "<center><a href=javascript:window.close('acePopup')><img src=images/click.gif border = 0 alt=Exit></a></center>";

}
else
{
echo "<br><center><a href = javascript:window.close('acePopup')><img src=images/previous-1.gif border=0 height=18></a></center>";
}
?>

</body>
</html>