<?
session_start();
include("include/db.inc.php"); 
include("include/functions.php"); 
if($_SESSION['lang']=='')
	{
		$_SESSION['lang'] = "en";
	}	

	include 'languages/lang_common_'.$_SESSION['lang'].'.php';
   $db1=new db;
   $db1->open();
   mysql_query("SET NAMES 'utf8'");
  
   $pids=$_POST['pids']; 
   $parr=explode(",",$pids);
   $change=0;
   
   for($x=0; $x < count($parr)-1; $x++)
   {
   
   $pid=$parr[$x];
   $_SESSION['old'][$pid] = $_SESSION['new'][$pid]; 
   
   $rec=mysql_fetch_array(mysql_query("select bid_price from t123go_product where pid='$pid' "));
   if($rec['bid_price']!='')
   $_SESSION['new'][$pid] = $rec['bid_price'];
   
     if($_SESSION['new'][$pid] != $_SESSION['old'][$pid])
	 $change=1;
   
   }
   

   echo "<form name='frm'>";
      for($y=0; $y < count($parr)-1; $y++)
   {
   
      $pid=$parr[$y];
	  $diff=mysql_fetch_array(mysql_query("SELECT TIME_TO_SEC( TIMEDIFF( end_time, now( ))),
	  bid_price,bider_id,bid_type FROM t123go_product where pid='$pid'")) ;
	  
	  
	  $curr_bid=get_uname($diff[bider_id]);
	  if($curr_bid=='')
	  $curr_bid=_NO_BDDR_YT11_;
	  else
	  $curr_bid="<span class='namer'>$curr_bid</span>";	  
	  ?>
      
      <input type="hidden" name="price_<?=$pid?>" value="<?=$diff[bid_price]?>" />
      <input type="hidden" name="bider_<?=$pid?>" value="<?=$curr_bid?>" />
      <input type="hidden" name="diff_<?=$pid?>" value="<?=$diff[0]?>" />
      <input type="hidden" name="bid_type_<?=$pid?>" value="<?=$diff[bid_type]?>" />

      <?
	   if($_SESSION['new'][$pid] != $_SESSION['old'][$pid])
	   echo "<input type='hidden' name='new_".$pid."' value='1' />";
	   else
	   echo "<input type='hidden' name='new_".$pid."' value='0' />";	    
	  
	}	
	echo "</form>";  
 
?>