<?
error_reporting(0);
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("cache-control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
$pidd=$_GET['id'];
?>
<? 
require 'include/configurations.php'; // ITECHBIDS Configuration File
$pieces = explode("|", $pidd);
foreach($pieces as $pid) {
$feature_sql="select expire_date from auction_details where productid=$pid";
$feature_res=mysql_query($feature_sql);
$feature_row=mysql_fetch_row($feature_res);
$expire_date = $feature_row[0]; 
$date2=strtotime($expire_date);
$date2 = date("d-m-Y H:i:s",$date2); 
$dateTo = $date2;
$date1 = mktime(date("H"),date("i"),date("s"),date("n"),date("j"),date("Y"));
$dateToElements = split(' ', $dateTo);
$dateToDateElements = split('-', $dateToElements[0]);
$dateToTimeElements = split(':', $dateToElements[1]); 
$date2 = mktime($dateToTimeElements[0], $dateToTimeElements[1], $dateToTimeElements[2], $dateToDateElements[1], $dateToDateElements[0], $dateToDateElements[2]); 
$diff = $date2 - $date1;
$difference = "".$diff;
$tot1 = "$pid##$difference##";
if($tot!=""){
$tot = "$tot||$tot1";
}
if($tot==""){
$tot = "$tot1";
}
}
echo "||$tot";
?>