
<?  
$title="My Auction";
$click="myauction";
require 'templates/'.$tfold.'/header.php';
?>
	<table width="980" cellpadding="0" cellspacing="0" align="center">
	<tr>
<tr class="tdhead_main"><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l.gif></td>
<td width="98%" height="24" valign="middle">&nbsp;<B><? echo "$lang_768" ?></b></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r.gif></td></tr>
	</table>

<table width="980" align="center" cellpadding="0" cellspacing="0" border=0 class="ft_right"  style="padding-left : 10px; padding-right : 10px; padding-bottom : 10px; padding-top : 10px;" >
<tr>
<td valign="top" >
<table cellpadding="0" cellspacing="0">
<tr align="center" height=35>
<td width=2>
<? require'include/usermenu.php'; ?>
</td></tr></table></td><td valign="top" align="right">
<? if($showtype!="buybid"){ ?>
<table width="730" align="center" cellpadding="0" cellspacing="0" border=0  style=" padding-bottom : 10px;" >
<tr><td>
<table cellpadding="0" cellspacing="0">
<tr><td class="tr_border" height=30 width=730 id=biddingdetails>
<table cellpadding="0" cellspacing="0" width=730 >
<tr>
<td align="left" class="font_white" height="30">
<b>&nbsp;&nbsp;<?=$lang_740?>:&nbsp;&nbsp;&nbsp;</b>( 
<? if($bid_total_records == 1 ) { echo "$bid_total_records"."&nbsp;"."$lang_742"; } else if($bid_total_records > 1)
 { echo "$bid_total_records"."&nbsp;"."$lang_742"; } else echo "$lang_527";?> ) </b></td>
<td align="right" class="font_white" width=10>
<a href="myauction.php?#didntwindetails">
<img src="templates/<? echo "$tfold" ?>/img_files/up_arr.gif" border=0></a></td>
<td align="right" class="font_white" width=10>
<a href="myauction.php?#watchingdetails">
<img src="templates/<? echo "$tfold" ?>/img_files/leasing-arrows-dn.gif" border=0>
</a></td>
</tr></table>
</td></tr>
<tr >
<td >
<table cellspacing="0" cellpadding="0" width=730>
<?
if($bid_total_records > 0)
{ 
?>
<form name="bid_frm" action="myauction.php" method=post>
<tr>
<td width="16%" class="tr_botborder"><b><?=$lang_730?></b> </td>
<td class="tr_botborder" width=6%><b>&nbsp;</b></td>
<td width="19%" class="tr_botborder"><b><?=$lang_264?></b>  </td>
<td width="16%" class="tr_botborder"><b><?=$lang_632?></b>  </td>
<td width="18%" class="tr_botborder"><b><?=$lang_267?></b>  </td>
<td  class="tr_botborder" colspan="2"><? echo "$lang_518" ?></td>
</tr><TR><TD colspan="7">&nbsp;</TD></TR>
<?
$bid_res=mysql_query($bid_sql);
while($bid_row=mysql_fetch_array($bid_res))
{
   // count no of bids for this items
  $tot_bid_sql="select count(*) from site_bids where productid=".$bid_row[productid];
  $tot_bid_res=mysql_query($tot_bid_sql);
  $tot_bids=mysql_fetch_array($tot_bid_res);
?>
<tr>
<td class="tr_botborder"><?  echo $bid_row['currency']; ?>
<?= number_format(($bid_row['bidding_amount']),2,'.',''); ?> </td>
<td class="tr_botborder"><?  echo $bid_row['quantity']; ?> </td>
<td class="tr_botborder"><?  echo $bid_row['currency']; ?>
<?= number_format(($bid_row['bidding_amount'] * $bid_row['quantity']),2,'.',''); ?> </a> </td>
<td width="16%" class="tr_botborder">
<?
  $custom_date=explode(" ",$bid_row[bidding_date]);
  $custom_date1=$custom_date[0];
  $custom_time=$custom_date[1];
  $custom_date3=substr($custom_date1,"-2");
  $custom_date2=explode("-",$custom_date1);
  $custom_date1=$custom_date2[0];
  $custom_date2=$custom_date2[1];
  $custom_date4=$custom_date3."-"."$custom_date2"."-"."$custom_date1"." "."$custom_time";
  echo  $custom_date4;
?></td>
<?
$expire_date=$bid_row[expire_date];
require 'ends.php';
?>
<td width="18%" class="tr_botborder"><?  echo $string_difference; ?></td>
<td width="20%" class="tr_botborder">
<select name=cbowonaction style="width:100px;" onchange="go_page_link(this.value,'<?= $bid_row['productid']; ?>','<?= $bid_row['user_id']; ?>')">
<option value="0"><?=$lang_518?></option>
<option value="3">Delete</option>
</select>
</td>
</tr>
<tr>
<td class="tr_botborder_1" height="30">&nbsp;  </td>
<td class="tr_botborder_1" height="30" colspan=5 align="left">
<a href="<? if($bid_row[selling_method]!=ads) {  ?>itechd.php<? }else{?>classifieds.php<?}?>?productid=<?= $bid_row['productid']?>">
<?  echo $bid_row['producttitle']; ?></a>&nbsp;(<?  echo $bid_row['productid']; ?> )</td>
<td class="tr_botborder_1" height="30">&nbsp;  </td></tr>
<?
} // while
?>
<input type="hidden" name="bid_delete" />
<input type="hidden" name="productid" />
<input type="hidden" name="seller_id" />
<input type="hidden" name="go_link" />

</form>
<?
}
else
{
?>
<tr>
<td class="tr_botborder_1" height="30" colspan=5 align="left">
<? echo "$lang_561" ?><br />
</td>
</tr>
<?
}
?>
</table>


<? } ?>

<table border="0" align="center" cellpadding="3" cellspacing="0" width=730 class="ft2">
	<tr><td class="ct" height="30"><?=$lang_749?></td></tr>
<tr><td>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="94%" class="subtable">
<form name="frmDeposit" action="subscribe.php" method="post" onSubmit="this.canSave.value=1;">
<tr><td colspan="2"><? diplay_plans($plan_id); ?></td></tr>
<tr><td><?=$lang_521?></td>
<td><? diplay_payments(); ?></td></tr>
<tr><td colspan="2" align="center"><input class="submit_button" type="submit" name="btn_Deposit" value="Next" class="buttonmid">
<input type="hidden" name="canSave" value="0">
</td></tr>
</form>
</table>

</td></tr>

</table>

</td></tr>

</table>

<? if($showtype!="buybid"){ ?>
</TD></TR>
</table>
</TD></TR>
</table>
<? } ?>


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

<? 
 require 'templates/'.$tfold.'/footer.php';					
?>
</td></tr>

</table>

<script language="javascript">
function del()
{
var where_to= confirm("Are You Sure You Want to delete the item[s]?");
if (where_to== true)
 {
document.bid_frm.bid_delete.value="yes";
document.bid_frm.submit();
 }
}

function go_page_link(action_id,id,seller_id)
{
if(action_id==1)
{
document.bid_frm.seller_id.value=seller_id;
document.bid_frm.action="sellers_othersitem.php";
document.bid_frm.submit();
}
if(action_id==2)
{
document.bid_frm.productid.value=id;
document.bid_frm.go_link.value="yes";
document.bid_frm.action="askseller.php";
document.bid_frm.submit();
}
if(action_id==3)
{
var where_to= confirm("Are You Sure You Want to delete the item[s]?");
  if(where_to==true)
  {
document.bid_frm.bid_delete.value="yes";
document.bid_frm.productid.value=id;
document.bid_frm.action="myauction.php";
document.bid_frm.submit();
  }
}
if(action_id==10)
{
var where_to= confirm("Are You Sure You Want to relist the item[s]?");
  if(where_to==true)
  {
document.bid_frm.relist_auction.value="yes";
document.bid_frm.productid.value=id;
document.bid_frm.action="myauction.php";
document.bid_frm.submit();
  }

}

if(action_id==5)
{
document.bid_frm.seller_id.value=seller_id;
document.bid_frm.action="sellers_othersitem.php";
document.bid_frm.submit();
}
if(action_id==4)
{
document.bid_frm.productid.value=id;
document.bid_frm.action="reviewitechds.php";
document.bid_frm.submit();
}
if(action_id==6)
{
document.bid_frm.productid.value=id;
document.bid_frm.seller_id.value=seller_id;
document.bid_frm.radfeedback.value="seller";
document.bid_frm.action="comments.php";
document.bid_frm.submit();
}
if(action_id==7)
{
document.bid_frm.productid.value=id;
document.bid_frm.buyer_id.value=seller_id;
document.bid_frm.radfeedback.value="buyer";
document.bid_frm.action="comments.php";
document.bid_frm.submit();
}
if(action_id==8)
{
document.bid_frm.productid.value=id;
document.bid_frm.action="trackit.php";
document.bid_frm.submit();
}
}
</script>