<?
	ob_start();
	session_start();
 	include("include/db.inc.php"); 
 	include("include/bit_functions.inc.php");
	include("include/functions.php"); 
   $db1=new db;
   $db1->open();
  mysql_query("SET NAMES 'utf8'");  $currency_symbol_new=symbol_currency();
   $uid=$_SESSION['uid'];
	

/*mysql_query("update t123go_product set end_time=DATE_SUB(end_time,INTERVAL 15 day) where end_time > '2008-11-25'")or die(mysql_error());;*/


	// change time of products //
	
$res=mysql_query("select pid,end_time from t123go_product ");
	$x=2;
	while($rec=mysql_fetch_array($res))
	{
	$x=$x+2;
	
	mysql_query("update t123go_product set end_time=DATE_ADD('".$rec[1]."',INTERVAL ".$x." minute) where pid='$rec[0]'")or die(mysql_error());;
	}	

	// insert new products //
	
	/*$res=mysql_query("select cid,pname,brand,price,starting_bidprice,discount,weight,unit,stock,
				   thumbnail,start_time,end_time,bid_time,bid_price,bid_increment,description,type1,delivery_cost from t123go_product ");
	$x=2;
	while($rec=mysql_fetch_array($res))
	{
	$x=$x+2;
	$bid_ins="insert into t123go_product(cid,pname,brand,price,starting_bidprice,discount,weight,unit,stock,
				   thumbnail,start_time,end_time,bid_time,bid_price,bid_increment,description,type1,delivery_cost)values
							('".$rec[0]."','".mysql_real_escape_string($rec[1])."','".mysql_real_escape_string($rec[2])."','".mysql_real_escape_string($rec[3])."','".mysql_real_escape_string($rec[4])."','".mysql_real_escape_string($rec[5])."','".mysql_real_escape_string($rec[6])."',
							'".mysql_real_escape_string($rec[7])."','".mysql_real_escape_string($rec[8])."','".mysql_real_escape_string($rec[9])."','".$rec[10]."',DATE_ADD('".$rec[11]."',INTERVAL $x minute),'".mysql_real_escape_string($rec[12])."','".mysql_real_escape_string($rec[13])."',
							'".mysql_real_escape_string($rec[14])."','".mysql_real_escape_string($rec[15])."','".mysql_real_escape_string($rec[16])."','".$rec[17]."')";
	$bid_query=mysql_query($bid_ins)or die(mysql_error());
						  
						  
	}*/
?>
