<script language="javascript">
      function _flip_image(url) {
        if (url == null || url == undefined || url == "") {
          return;
        }
        else {
        document.getElementById("immg").innerHTML = "<img src=\"uploads/<? echo $row['picture1']; ?>\" width=<?= $w; ?> height=<?=$h?> border=\"0\">"
        }
      }
    </script>
<?

$datecheck=date("Y-m-d H:i:s");


$expiry_date = $row['expire_date'];
$selling_method = $row['selling_method'];

if($expiry_date >= $datecheck){
$aucstatus="yes";
}
if($expiry_date < $datecheck){
$aucstatus="no";
}
$min_bid_amount=$row['min_bid_amount'];
$bidincrement=$row['bidincrement'];
$productid_main=$row['productid'];
$bid_sql2="select * from site_bids where productid=".$row['productid']." order by bidding_amount asc";
$bid_res2=mysql_query($bid_sql2);
$bid_row2=mysql_fetch_array($bid_res2);
$user_bid_amt=$bid_row2[bidding_amount];
$user_bid_id=$bid_row2['user_id'];

$highest_bidder_sql="select user_name un from member_details where user_id=".$user_bid_id;
$highest_bidder_res=mysql_query($highest_bidder_sql);
$highest_bidder_res=mysql_fetch_array($highest_bidder_res);
$user_bid_name=$highest_bidder_res[un];

if($user_bid_name=="")
{
$user_bid_name = "None";
}

?>

	 <?
	 $title="Details of item";
	 require 'templates/'.$tfold.'/header.php';
	 ?>
	</td>
  </tr>
  <tr><td>
<table cellpadding="0" cellspacing="0" width=100%  style="padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;">
<tr><td style="padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l.gif border="0"></td>
<td class="tdhead_main" width="49%" height="24" valign="middle">&nbsp;<B>Auction ID:<?= $row['productid']; ?>
&nbsp;( <font color="#4a4a4a">Retail: <?=$row['currency']?><?=$row['or_price']?></font> )
</b></td>
<td class="tdhead_main" width="49%" height="24" align="right" valign="middle"><a href="itechd.php?productid=<?= $row['productid'] ?>&mode=watch"><B><? echo "$lang_106" ?></b></a></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r.gif border="0"></td></tr>
	</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0" border=0 class="ft_right" style="padding-left:2px;padding-right:2px;">
<tr><td colspan="5" height=30>
<table cellpadding="0" cellspacing="0" width="100%"><tr><td align="left"><font size="3">
<b><div align="left">
&nbsp;&nbsp; <? echo ucwords($row['producttitle']); ?> </div> </b></font></td>
<td align="right"><b>Item #(<?= $row['productid']; ?>)</b></td></tr></table>
 </td></tr>
<tr><td width= align="center"><BR></td></tr>
<tr><td width= align="center">
<table width=100% align="center" cellpadding="0" cellspacing="0" style="padding-right:0px;padding-left:0px;">
<tr>
<td valign="top" align="center">

<table width="406" cellpadding="0" cellspacing="0" >
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_l.gif border="0"></td>
<td class="boxhead_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_r.gif border="0"></td></tr>
	</table>

<TABLE cellSpacing=0 align="center" cellPadding=0 width=406 style="padding-right:0px;padding-left:0px;"
                  border=0 class="ft_box"> 
				  <tr><td align="center" style="padding-right:0px;padding-left:0px;">
<div id="immg">
				   <?
				   if(!empty($row['picture1']))
	               {
				   $img=$row['picture1'];
				   list($width, $height, $type, $attr) = getimagesize("uploads/$img");
				   $h=$height;
				   $w=$width;
				   if($h>300)	
				   {
				   $nh=300;
				   $nw=($w/$h)*$nh;
				   $h=$nh;
				   $w=$nw;
				   }
				  if($w>400)
				  {
				  $nw=400;
				  $nh=($h/$w)*$nw;
				  $h=$nh;
				  $w=$nw;
				  }
	              ?>
                  <img src="uploads/<? echo $row['picture1']; ?>" width=<?= $w; ?> height=<?=$h?> border="0">
	               <? 
	               }
	               else
	               {
				   $img="no_image.gif";
				   list($width, $height, $type, $attr) = getimagesize("uploads/$img");
	               ?>
		          <img src="templates/<? echo "$tfold" ?>/img_files/no_image.gif"  name="runimg" >
	               <?
	               }
				   ?>
	</div>			  
               </td></tr>
</TABLE>
<script language="javascript">
      function flip_image(url) {
        if (url == null || url == undefined || url == "") {
          return;
        }
        else {
        document.getElementById("immg").innerHTML = "<img src=\"uploads/"+url+"\" width=<?= $w; ?> height=<?=$h?> border=\"0\">"
        }
      }
</script>
<?
if($row['picture2']=="")
{
$row['picture2']=$row['picture1'];
}
if($row['picture4']=="")
{
$row['picture4']=$row['picture3'];
}
if($row['picture6']=="")
{
$row['picture6']=$row['picture5'];
}
?>
<table width="406" height="125" style="background:url(templates/<? echo "$tfold" ?>/img_files/pic_bottom.gif) no-repeat center;">
<TR>
<TD height="100" align="center" width="25%" style="background:url(templates/<? echo "$tfold" ?>/img_files/no_image.gif) no-repeat center;">
<? if($row['picture2']!=""){ ?><a href=javascript:flip_image("<? echo $row['picture1']; ?>") style="text-decoration: none;
">
<img name="runimg" src="uploads/<? echo $row['picture2']; ?>" width="100" height="60" border="0"></a>
<? } ?>
</TD><TD align="center" width="25%" style="background:url(templates/<? echo "$tfold" ?>/img_files/no_image.gif) no-repeat center;">
<? if($row['picture4']!=""){ ?><a href=javascript:flip_image("<? echo $row['picture3']; ?>") style="text-decoration: none;
">
<img name="runimg" src="uploads/<? echo $row['picture4']; ?>" width="100" height="60" border="0"></a>
<? } ?>
</TD><TD align="center" width="25%" style="background:url(templates/<? echo "$tfold" ?>/img_files/no_image.gif) no-repeat center;">
<? if($row['picture6']!=""){ ?><a href=javascript:flip_image("<? echo $row['picture5']; ?>") style="text-decoration: none;
">
<img name="runimg" src="uploads/<? echo $row['picture6']; ?>" width="100" height="60" border="0" ></a>
<? } ?>
</TD>
</TR>
<TR><TD valign="top" colspan="3" align="center"><font size="1">Click on an image to enlarge it</font></TD></TR>
</TABLE>




</td>
<td width=1>&nbsp;</td>
<td  valign="top" style="padding-top:0px; padding-bottom:0px;">

<table width="300" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_l.gif border="0"></td>
<td class="boxhead_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_r.gif border="0"></td></tr>
	</table>


<table cellpadding="0" cellspacing="0"  width=300  class="ft_box">

<? if($aucstatus=="no"){
?>
<tr><td style="font-size: 10px;" width="80" height="20"><?=$lang_735?> : </td>
          <td align="right">
<div style="font-weight:bold;"><? echo $user_bid_name;?>
</div>
</td>
</tr>
<? } ?>
<? if($aucstatus=="yes"){
?>
<tr><td colspan="2" align="center"><div id="Bid<?=$row['productid'];?>" style="font-size:32px; font-weight:bold;">
<B>--|--|--</b>
</div>
</td></tr>	

<? } ?>

<tr>
<td width="100" style="font-size: 10px;" width="80" height="20">Current Price :</td>
<?
$expire_date = $row['expire_date']; 
$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]); 
$difference = $date2 - $date1;
?>
<div id="futu<?=$row['productid'];?>" style="display:none;"><?=$difference?></div>
<div id="futu_m<?=$row['productid'];?>" style="display:none;"><?=$difference?></div>
<div id="totb_m<?=$row['productid'];?>" style="display:none;"><?=$feature_row['totbid'];?></div>
<div id="pause<?=$row['productid'];?>" style="display:none;">no</div>	     
<div id="pause_m<?=$row['productid'];?>" style="display:none;">no</div>
<td align="right" ><div style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; color:teal; font-size:12px;">
<span style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; color:teal; font-size:24px;" id="Amt_m<?=$row['productid'];?>">
??????</span>
</div>
</td>
</tr>
<? if($aucstatus=="yes"){
?>
	    <tr><td colspan="2" align="center" style="padding-top:0px; padding-bottom:0px;">
<?
$bidnow = $_SESSION[userid];
?>
<?if(empty($_SESSION[userid])) { ?>
<a name= "link1" href="signin.php" style="text-decoration:none;">
<img NAME = "IMG<?=$i?>" src=templates/<?=$tfold?>/img_files/bidnow_big.png border="0"></a>
<? } ?>
<?if(!empty($_SESSION[userid])) { ?>
<a name= "link1" href="javascript:bidnowMystery(<?=$row['productid']?>,<?=$bidnow?>)" style="text-decoration:none;">
<img NAME = "IMG<?=$i?>" src=templates/<?=$tfold?>/img_files/bidnow_big.png border="0"></a>
<? } ?>
</td></tr>
<? } ?>
<? if($aucstatus=="no"){
?>
	    <tr><td align="center" colspan="2" style="font-size: 16px;font-weight:bold" height="20">This auction ended on<BR><? echo $row['expire_date']; ?></td></tr>			
<? } ?>
</table>
<table width="300" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_l.gif border="0"></td>
<td class="boxfoot_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_r.gif border="0"></td></tr>
	</table>




<div id="buy_wait<?=$row['productid']?>" style="display:none;">
<BR>
<table width="300" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_l.gif border="0"></td>
<td class="boxhead_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_r.gif border="0"></td></tr>
</table>
<table cellpadding="0" cellspacing="0"  width=300  class="ft_box" style="padding-top:0px; padding-bottom:0px;">
<tr>
<td width="100" style="font-size: 10px;" width="200" height="10">Buy Before <span style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; font-size:10px;" id="buy_timer<?=$row['productid'];?>">
</span> Second(s)</td>
<td align="right" >
<form action=reviewitechds.php method=post style=MARGIN:0px;>
<input type=hidden name=productid value="<?=$row['productid'];?>">
<input type=hidden name=recycle value=yes>
<input type=image src="templates/<?=$tfold?>/img_files/buy_now.png">
</form>
</td>
</tr></table>
<table width="300" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_l.gif border="0"></td>
<td class="boxfoot_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_r.gif border="0"></td></tr>
	</table>
</div>







<BR>
<table width="300" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_l.gif border="0"></td>
<td class="boxhead_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_r.gif border="0"></td></tr>
</table>

<? if($aucstatus=="yes"){
?>
<table cellpadding="0" cellspacing="0"  width=300  class="ft_box" style="padding-top:0px; padding-bottom:0px;">
<tr>
<td width="100" style="font-size: 10px;" width="80" height="10">Worth Up To :</td>
<td align="right" ><? echo "".$row['currency']."".$row['or_price']; ?>
</td>
</tr>
<?
$or_price=$row['or_price'];
$shown_p = $user_bid_amt;
$savings = $or_price - $user_bid_amt;
$savings = round($savings, 2);
?>
<tr><td style="font-size: 10px;" width="80" height="10">Current Price : </td>
          <td align="right">

<span style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; font-size:12px;" id="SAmt_m<?=$row['productid'];?>">
??????</span>
</td>
</tr>

<tr><td colspan="2"><HR></td>
</tr>
<tr><td style="font-size: 10px;" width="80" height="10">Your Saving : </td>
          <td align="right">
<span style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; font-size:12px;" id="Sav_m<?=$row['productid'];?>">
??????</span>
</td>
</tr>
	    <tr><td align="center" colspan="2" style="font-size: 10px;" height="20">The "worth up to" price reflects the manufacturer's recommended retail price.</td></tr>			
</table>
<? } ?>
<? if($aucstatus=="no"){
?>

<?
$s_title="SELECT * FROM `genaralsettings` WHERE set_id=58";
	        $s_title_row=mysql_query($s_title);
		$s_title_res=mysql_fetch_array($s_title_row);
                $bidcost=$s_title_res['set_value'];

$bid_sql2="select * from site_bids where productid=".$row['productid']." and user_id=".$user_bid_id;
$bid_res2=mysql_query($bid_sql2);
$bid_row2=mysql_num_rows($bid_res2);

$bidprice = $bidcost*$bid_row2;

?>
<?
$or_price=$row['or_price'];
$quick_buy_price=$row['quick_buy_price'];
If($quick_buy_price==0){
$texp = "Price";
$shown_p = $user_bid_amt;
$savings = $or_price - $user_bid_amt - $bidprice;
}
$save_percent = $savings*100/$or_price;
$save_percent = (int) $save_percent;
$save_percent = $save_percent."%";
?>
<table cellpadding="0" cellspacing="0"  width=300  class="ft_box" style="padding-top:0px; padding-bottom:0px;">
<tr>
<td align="center" colspan="2" width="100%" style="font-size: 16px; font-weight:bold; color:01aa01;" width="80" height="10">Congratulations<BR>
<? echo $user_bid_name;?>
</td>
</tr>
<tr>
<td align="center" colspan="2" width="100%" style="font-size: 14px; font-weight:bold; color:FF0000;" width="80" height="10">Savings
<? echo $save_percent;?>
</td>
</tr>
<tr>
<td width="100" style="font-size: 10px;" width="80" height="10">Worth Upto :</td>
<td align="right" ><? echo "".$row['currency']."".$row['or_price']; ?>
</td>
</tr>
<td width="100" style="font-size: 10px;" width="80" height="10">Bid Cost :</td>
<td align="right" ><? echo "".$row['currency']."".$bidprice; ?>
</td>
</tr>
<tr><td style="font-size: 10px;" width="80" height="10"><?=$texp?> : </td>
<td align="right" style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; font-size:12px;">
<? echo $row['currency']."".$shown_p; ?>
</td>
</tr>

<tr><td colspan="2"><HR></td>
</tr>
<tr><td style="font-size: 10px;" width="80" height="10">Your Saving : </td>
          <td align="right">
<span style="border:0px; padding-top:0px; padding-bottom:0px; font-weight:bold; font-size:12px;" id="Sav<?=$row['productid'];?>">
<? echo $row['currency']."".$savings; ?></span>
</td>
</tr>
	    <tr><td align="center" colspan="2" style="font-size: 10px;" width="80%" height="20">The "worth up to" price reflects the manufacturer's recommended retail price or typical high street retail price.</td></tr>			
</table>





<? } ?>
<table width="300" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_l.gif border="0"></td>
<td class="boxfoot_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_r.gif border="0"></td></tr>
	</table>




</td>
<td width=1>&nbsp;</td>
<td valign="top">


<? if($user_id==""){ ?>
<a href="user_reg.php" border="0">
<img src=templates/<?=$tfold?>/img_files/register.gif border="0">
</a><BR>
<? } ?>
<? if($user_id!==""){ ?>
<BR>
<table width="236" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="22" valign="top"><img src=templates/<?=$tfold?>/img_files/his_l.gif border="0"></td>
<td style="font-weight:bold;color:#FFFFFF;" class="hishead_main" width="99%" height="22" valign="middle">Scratch History</td>
<td width="1%" height="22" valign="top"><img src=templates/<?=$tfold?>/img_files/his_r.gif border="0"></td></tr>
	</table>        

<table cellpadding="0" cellspacing="0" width=236 height="143" class="ft_right"><tr><td valign="top">
<div id=His_m<?=$row['productid']?>>
<table cellpadding="0" cellspacing="0" width=100%>
<TR><TD style="background-color:#dadada;" align="center" width="30%">Item Value</TD><TD style="background-color:#dadada;" align="center" width="70%">Scratched When</TD></TR>
<?
$bid_sql2="select bidding_amount as bi, bidding_date as bd from site_bids where user_id=$user_id and productid=".$row['productid']." order by bidding_amount asc limit 10";
$bid_res2=mysql_query($bid_sql2);
while($bid_row2=mysql_fetch_array($bid_res2))
{
$user_bid_amt=$bid_row2[bi];
$bidding_date=$bid_row2[bd];
?>
<TR><TD align="center" width="30%"><?=$row['currency'];?><?=$user_bid_amt?></TD><TD align="center" width="70%"><?=$bidding_date?></TD></TR>
<?
}
?>	</table></div>		  
</td></tr>
			  </table>
<table width="236" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/his_f_l.gif border="0"></td>
<td class="hisfoot_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/his_f_r.gif border="0"></td></tr>
	</table>
<? } ?>
<?
if($user_id==""){
$put_user=0;
}
else
{
$put_user="$user_id";
}
?>

</td>
  </tr>
</table>

</td></tr>
</td></tr>

</table>
<table width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td width="98%" height="5" valign="middle"><img src=templates/<?=$tfold?>/img_files/t_bot.gif border="0"></b></td>
</tr>
	</table>

<BR>

<table width="100%" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_l.gif border="0"></td>
<td class="boxhead_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_head_r.gif border="0"></td></tr>
	</table>

<table cellpadding="0" cellspacing="0" class="ft_right" width=100%>
  <tr align="center">
          <td>

<?
$query="select * from home_announcements where id=1";
$tab=mysql_query($query);
if($row=mysql_fetch_array($tab))
{
$registration=$row['home_announcements'];
}
?>


<?=$registration?></td>
        </tr>

</table>

<table width="100%" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_l.gif border="0"></td>
<td class="boxfoot_main" width="99%" height="5" valign="middle"></td>
<td width="1%" height="5" align="right" valign="top"><img src=templates/<?=$tfold?>/img_files/box_foot_r.gif border="0"></td></tr>
	</table>

<BR>


<table width="100%" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l.gif border="0"></td>
<td class="tdhead_main" width="98%" height="24" valign="middle">&nbsp;<B>Item Description</b></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r.gif border="0"></td></tr>
	</table>

<table cellpadding="0" cellspacing="0" class="ft_right" width=100%>
  <tr>
          <td align="left" style="padding-left:5px;padding-top:5px;padding-bottom:5px;"><?=$description;?>

<BR>
<?
		$gate_select_query="select * from payment_gateway where status='yes'";
		$gate_select_result=mysql_query($gate_select_query);
		while($gate_select_row=mysql_fetch_array($gate_select_result)) {
		$gateway_id=$gate_select_row['gateway_id'];
        $payment_gateway=$gate_select_row['payment_gateway'];
        if($gateways!=''){
        $gateways="$gateways, $payment_gateway";
        }
        if($gateways==''){
        $gateways="$payment_gateway";
        }
        }
?>

<table align="left" cellpadding="0" cellspacing="0" style="color:#434343; font-size:12px; padding-left:10px; padding-top:10px; padding-bottom:10px;" width="960">

<TR><TD style="padding-left:10px; padding-top:10px; padding-bottom:10px;" align="left" bgcolor="#434343" height="20" colspan="4"><B><font color="#66bc39">PAYMENT INFORMATION:</font></B></TD></TR>

<tr align="left" valign="top">

<TD width="30%" bgcolor="#f2f2f2" style="padding-left:10px; padding-top:10px; padding-bottom:10px;">
<B>
Payment methods:
</B><BR>
<BR>
&raquo; <?=$gateways;?>


</td>

<TD width="20%" bgcolor="#f2f2f2" style="padding-left:10px; padding-top:10px; padding-bottom:10px;">
<B>
Delivery Cost:
</B><BR>
<BR>
&raquo; <?=$row['currency'];?><?=$row['shipping_cost'];?>


</td><TD width="30%" bgcolor="#f2f2f2" style="padding-left:10px; padding-top:10px; padding-bottom:10px;">

<B>Return:</B> <BR><BR>&raquo; <?=$row['return_pol'];?>

</td><TD width="20%" bgcolor="#f2f2f2" style="padding-left:10px; padding-top:10px; padding-bottom:10px;">

<B>Any questions left?</B><BR><BR>&raquo; <a href="contact.php"><font color="#000000"><B>Contact</B></font></a>
</td>
</tr>
</table>
<BR>
</td>
</tr>

</table><table width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td width="98%" height="5" valign="middle"><img src=templates/<?=$tfold?>/img_files/t_bot.gif border="0"></b></td>
</tr>
	</table>
<BR>



<?
$datecheck=date("Y-m-d H:i:s");
$date1 = strtotime(now);
$date1 = date("M j, Y G:i:s",$date1);
$feature_sql="select * from auction_details where status='Active' and selling_method=11 and selling_method!=10 and selling_method!='want_it_now' and picture1!='' and (expire_date > '$datecheck') and productid!='$productid' order by expire_date limit 0,4 ";
	$feature_res=mysql_query($feature_sql);
	$tot_count=mysql_num_rows($feature_res);
	$count=0;
	if($tot_count > 0)
	{
$nu=1;
	 ?>
	<table width="980" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l.gif></td>
<td class="tdhead_main" width="98%" height="24" valign="middle">&nbsp;<B>OTHER AUCTIONS</b></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r.gif></td></tr>
	</table>
<table border="0" cellpadding="0" cellspacing="0" style="padding-left:0px;padding-right:0px;" width=980 class="ft_right"><tr><td align="center" valign="top">
<TR>
<?
while($feature_row=mysql_fetch_array($feature_res))
{
	$selling_method=$feature_row[selling_method];
	$autobidder=$feature_row[autobidder];
?><TD valign="top">
<table align="center" valign="middle" cellpadding=5 cellspacing=2>
<tr><td colspan="2" class="style3" valign="top" width="180" height="30" align="center" valign="middle">
<B><? echo $feature_row['producttitle'];?></b>
</tr><TR>
<td valign="top" align="center">
	<?
$imgsize = $feature_row['picture1'];
list($widths, $heights, $types, $attrs) = getimagesize("uploads/$imgsize");
if($feature_row['picture2']==""){
$feature_row['picture2']=$feature_row['picture1'];
}
	               $img=$feature_row['picture2'];
				   list($width, $height, $type, $attr) = getimagesize("uploads/$img");
				   $h=$height;
				   $w=$width;
				   if($h>40)	
				   {
				   $nh=40;
				   $nw=($w/$h)*$nh;
				   $h=$nh;
				   $w=$nw;
				   }
				  if($w>50)
				  {
				  $nw=50;
				  $nh=($h/$w)*$nw;
				  $h=$nh;
				  $w=$nw;
				  }
$w=round($w);	
	?>
	<a href="itechd.php?productid=<? echo $feature_row['productid']; ?>">
	 <img src="uploads/<? echo $feature_row['picture2']; ?>" width=<?= $w; ?> height=<?=$h?> border=0>
	</a>
<?
$expiry_date = $feature_row['expire_date'];
$min_bid_amount=$feature_row_m['min_bid_amount'];
$bidincrement=$feature_row['bidincrement'];

?>
<?
$bidnow3=$_SESSION[userid];
?>
<?
$expire_date = $feature_row['expire_date']; 
$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]); 
$difference = $date2 - $date1;
?>
<BR>
<div id="pause<?=$feature_row['productid'];?>" style="display:none;"><?=$feature_row['stopped'];?></div>
<div id="futu<?=$feature_row['productid'];?>" style="display:none;"><?=$difference?></div>
<div id="pause_m<?=$feature_row['productid'];?>" style="display:none;"><?=$feature_row['stopped'];?></div>
<div id="futu_m<?=$feature_row['productid'];?>" style="display:none;"><?=$difference?></div>
<div id="totb_m<?=$feature_row['productid'];?>" style="display:none;"><?=$feature_row['totbid'];?></div>
<div id="Bid<?=$feature_row['productid'];?>" style="font-size:16px; font-weight:bold;">
<b>--|--|--|--</b>
</div>
</td><td align="center">
<span style="border:0px; padding:0px; font-weight:bold; color:#0075b2; font-size:13px;" id="Amt_m<?=$feature_row['productid'];?>">
??????</span>
<BR><div id="But_m<?=$feature_row['productid']?>">
<?if(empty($_SESSION[userid])) { ?>
<a name= "link1" href="signin.php" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('IMG<?=$feature_row['productid'];?>','','templates/<?=$tfold?>/img_files/login_sm.png',1);" style="text-decoration:none;">
<img NAME = "IMG<?=$feature_row['productid'];?>" src=templates/<?=$tfold?>/img_files/bid_now_sm.png border="0"></a>
<? } ?>
<?if(!empty($_SESSION[userid])) { ?>
<a name= "link1" href="javascript:bidnowMystery(<?=$feature_row['productid']?>,<?=$bidnow?>)" style="text-decoration:none;">
<img NAME = "IMG<?=$feature_row['productid'];?>" src=templates/<?=$tfold?>/img_files/bid_now_sm.png border="0"></a>
<? } ?>
</div><div id="buy_wait<?=$feature_row['productid']?>" style="display:none;">
Buy Before <span style="border:0px; padding:0px; font-weight:bold; color:teal; font-size:10px;" id="buy_timer<?=$feature_row['productid']?>">
</span> Second(s)<BR>
<form action=reviewitechds.php method=post style=MARGIN:0px;>
<input type=hidden name=productid value="<?=$feature_row['productid'];?>">
<input type=hidden name=recycle value=yes>
<input type=image src="templates/<?=$tfold?>/img_files/buy_now_sm.png">
</form>
</div>
</td>
		</tr>
		</table>
<?
$allpro2 = $feature_row['productid'];
$allpro1 = "$allpro2";
if($allpro!=""){
$allpro = "$allpro1|$allpro";
}
if($allpro==""){
$allpro = "$allpro1";
}
$nu=$nu+1;
?>
</td><td><?if($nu<5){?><img src=templates/<?=$tfold?>/img_files/devider.gif><?}?></TD>
<?}?>
</tr>
		</table>
	<table width="980" cellpadding="0" cellspacing="0" >
	<tr>
<tr><td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/t_bot_l.gif></td>
<td class="tdbot_main" width="98%" height="5" valign="middle"></td>
<td width="1%" height="5" valign="top"><img src=templates/<?=$tfold?>/img_files/t_bot_r.gif></td></tr>
	</table>
<? } ?>
<BR>
<?
$allpro_u = "$allpro|$productid_main";
?>

<SCRIPT LANGUAGE='javascript'>countdown('<?=$allpro_u?>')</SCRIPT>
<SCRIPT LANGUAGE='javascript'>setTimeout("GetUpdate('<?=$allpro_u?>','<?=$user_id?>','1')",2000);</SCRIPT>


