<table width="980" border="0" cellpadding="0" cellspacing="0" align="center" class="ft2">
  <tr>
    <td valign="top">
	<? 
	$tilte="The Best Marketplace";
	require 'templates/'.$tfold.'/header.php';?>
	</td>
  </tr>

 <tr><td>
  <?
    $user_id=$_SESSION['userid'];
	$query="select * from addfunds where member_id='$user_id'";
	$table=mysql_query($query);
	$total_fund_amount=0;
	if(mysql_num_rows($table)>0)
	while($row=mysql_fetch_array($table))
	$total_fund_amount +=$row['fund_amount'];
	$total_amount=$total_fund_amount ;
	?>
<table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" >
<tr height=40><td class="tr_border"><font size="2"><b>Buy This Item:Pay Now</b></font> </td></tr>
<tr ><td><table class="ft2" width="90%" align="center">
<tr ><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font size=3>
<? if($total_amount!=0)
{
?>
 You have $ <?= $total_amount; ?>  in your Account.
 <?
 }
 else
 {
 ?>
 You Have no balance in your account.Add Fund in your account.Then try to pay for this item.
 <?
 }
 ?>
 You have to pay $ <?= $_SESSION['sale_price'] ?> for Buy this Item.<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 Select Any one Method to Buy this Item.<br><br>
</td></tr>
<tr><td align="center" ><b><font color="#FF0000"><? if(!empty($error)) echo $error;	 ?></td></tr>
<tr><td align="center"> 
<form action="<? echo $_SERVER['PHP_SELF'];  ?>" method="post" >
<table width="70%" >
<tr height=40><td><input type="radio" name="pay_method" value="myaccount" > <strong>	Pay Using MyAccount.	</td></tr>
<tr><td><div id="my"></div></td></tr>
<tr height=40><td ><input type="radio" name="pay_method" value="payment_gateway" > <strong>Pay Using Payment Gateway. </td></tr>
<input type=hidden name="pm" value="<? echo $_REQUEST['pm']; ?>" >
<input type="hidden" name="productid" value="<? echo $_REQUEST['productid'];?>">
<tr height=40><td align="center"><input class="submit_button" type="submit" name="continue" value=" Continue.. " ></td></tr>
</table>
</form>
</td></tr>
</table></td></tr>
<tr><td>
<tr align="center"><td><? require 'templates/'.$tfold.'/footer.php'?></td></tr>
</table>
