<?
error_reporting(0);
header("cache-control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
$pidd=$_GET['id'];
?>
<? 
require 'include/databaseinfo.php';
	$sql=mysql_connect($dbhost,$dbuser,$dbpass);
 	if(!$sql) {
		echo "<h1>Unable to Establish Connection to the Server</h1><hr noshade size=2 color=#000000>";
		exit();
	}
	$db_sel=mysql_select_db($dbname,$sql);
	if(!$db_sel) {
		echo "<h1>Unable to Connect to the Database</h1><hr noshade size=2 color=#000000>";
		exit();
	}
$pieces = explode("|", $pidd);
$datecheck=date("Y-m-d H:i:s");
foreach($pieces as $pid) {
$feature_sql="select totbid, stopped, expire_date, last_bidder, selling_method from auction_details where productid=$pid";
$feature_res=mysql_query($feature_sql);
$feature_row=mysql_fetch_row($feature_res);
$totbid = $feature_row[0];
$stopped = $feature_row[1];
$expire_date = $feature_row[2];
$last_bidder = $feature_row[3];
$selling_method =  $feature_row[4];
if($expire_date>="$datecheck"){
$expire="no";
}
if($expire_date<"$datecheck"){
$expire="yes";
}
$tot1 = "$pid##$totbid##$stopped##$expire##$selling_method##";
if($tot!=""){
$tot = "$tot||$tot1";
}
if($tot==""){
$tot = "$tot1";
}
}
echo "||$tot";
?>