{load(fhead)}
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&a=Home">直销商管理系统</a> >> 帐户管理 >> 帐户余额充值</span></div>
	<div id="tabs5">
		<ul class="menu5" id="menu5">
		<li class=hover onclick="window.location.href='index.php?m=mod_agent&c=Funds&a=AddFunds'"><span class="yuan">在线支付充值</span></li>
		<li  onclick="window.location.href='index.php?m=mod_agent&c=Funds&a=BankFunds'"><span class="yuan">银行汇款充值</span></li>
		<!--if($vd['rights'][0]==1){-->
		<li  onclick="window.location.href='index.php?m=mod_agent&c=Funds&a=YktFunds'"><span class="yuan">充值卡充值</span></li>
		<!--}-->
		</ul>
	</div>
	<script type="text/javascript">
		function setpaycode(obj)
    {
    	$("mypaycode").value = obj.value;
    }
    
    var lowfunds = <!--echo isset($vd['rights'][3]) ? $vd['rights'][3] : 0;-->
    
    function checksubmit()
    {
    	vdollars   = $("ubzdollars").value;
    	vmypaycode = $("mypaycode").value;
    	
    	if(vdollars == "")
    	{
    		alert("请先输入充值金额");
    		$("ubzdollars").focus();
    		return false;
    	}
    	
    	if(vdollars < lowfunds)
    	{
    		alert("您好，您最低必须充" + lowfunds);
    		$("ubzdollars").value = lowfunds;
    		$("ubzdollars").focus();
    		return false;
    	}
    	
    	if(vmypaycode == "")
    	{
    		alert("请先选择支付方式");
    		return false;
    	}
    	
    	return true;
    }
	</script>
	<style type="text/css">
  .c3{border:0px solid #E5E5E5;margin:2px 0;width:100%;}
  .c3 p{float:left;width:25%;padding:5px 0px;height:25px;border-bottom:1px solid #F3F3F3;}
  .c3 p img {margin:0px 5px 0 0px;}
  .c3 input{vertical-align:middle}
  .c3 img{vertical-align:middle}
  .c3 label{vertical-align:middle;margin-top:3px}
  
  .c4{border:0px solid #E5E5E5;margin:0px 0;width:100%;}
  .c4 p{float:left;width:25%;padding:5px 0px;padding-bottom:0px}
  .c4 input{vertical-align:middle}
  .c4 label{vertical-align:middle;}
	</style>
	<div class="main5" id="main5">
		<ul class="block"><li>
			<form name="payment" method="post" action="index.php?m=mod_agent&c=Funds&a=Pay" target="_bank">
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td class="tableleft">
				<input id="mypaycode" name="mypaycode" type="hidden" value=""/>
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
					<!--$f=0;if(isset($vd['mainpay'])){-->
          <!--if($vd['mainpay'] == 'tenpay'){-->
          <tr>
            <td width="22%" height="30" class="tableleft1">网上银行卡支付：</td>
            <td width="78%" class="tableright1">
            	<div class="c3" style="height:110px">
                <!--$alipayarrays = array('1001','1002','1003','1004','1005','1006','1008','1009','1032','1033','1028');-->
					      <!--$i=0;foreach($alipayarrays as $bi){-->
					        <p><input id="tenpay_{$bi}" type="radio" name="paycode" onclick="setpaycode(this)"  value="tenpay_{$bi}" />
					        <label for="tenpay_1005"><img src="{$vd['content']}images/{$bi}.gif"  align="absmiddle" /></label></p>
					      	<!--$i++;-->
					      <!--}-->
              </div>
            </td>
          </tr>
          <!--$f=1;}else if($vd['mainpay'] == 'alipay'){-->
          <tr>
            <td width="22%" height="30" class="tableleft1">网上银行卡支付：</td>
            <td width="78%" class="tableright1">
            	<div class="c3" style="height:112px">
            		<!--$alipayarrays = array('ICBCB2C','CMB','CCB','ABC','SPDB','CMBC','COMM','CIB','GDB','SDB','POSTGC','CITIC','ICBCBTB','SPDBB2B');-->
					      <!--$i=0;foreach($alipayarrays as $bi){-->
					      	<p><input id="bankpay_{$i}" type="radio" name="paycode" onclick="setpaycode(this)" checked value="alipay_{$bi}" />
					      	<label for="bankpay_{$i}"><img src="{$vd['content']}images/<!--echo strtolower($bi).'.gif';-->" width="128" height="20" align="absmiddle"></label></p>
					      	<!--$i++;-->
					      <!--}-->
              </div>
            </td>
          </tr>
          <!--$f=1;}-->
          <!--}-->
          <!--if(count($vd['cardpay']) > 0){-->
          <tr>
            <td width="22%" height="30" class="tableleft1">手机卡/游戏卡支付：</td>
            <td width="78%" class="tableright1">
            	<div class="<!--if(count($vd['cardpay']) > 4){-->c3<!--}else{-->c4<!--}-->" style="height:<!--echo (count($vd['cardpay'])+3)/4 * 30-->px">
            		<!--foreach($vd['cardpay'] as $pay){-->
                <p><input type="radio" name="paycode" onclick="setpaycode(this)"  value="{$pay['paycode']}_{$pay['other']}"/> <label>{$pay['payType']}</label></p>
                <!--}-->
              </div>
            </td>
          </tr>
          <!--$f=1;}-->
          <!--if(count($vd['otherpay']) > 0){-->
          <tr>
            <td width="22%" height="30" class="tableleft1">其它支付：</td>
            <td width="78%" class="tableright1">
            	<div class="<!--if(count($vd['otherpay']) > 4){-->c3<!--}else{-->c4<!--}-->" style="height:<!--echo (count($vd['cardpay'])+3)/4 * 45-->px">
            		<!--foreach($vd['otherpay'] as $pay){-->
                <p><input type="radio" name="paycode" onclick="setpaycode(this)"  value="{$pay['paycode']}" /> <label><img src="{$vd['content']}images/{$pay['paycode']}.gif" height="30px"/></label></p>
                <!--}-->
              </div>
            </td>
          </tr>
          <!--$f=1;}-->
          <!--if($f==1){-->
					<tr>
					<td class="tableleft1">支付金额：</td>
					<td class="tableright1"><input type="text" name="ubzdollars" size='10' value="100.00" class='bginput' style="margin:5px;" /> <!--if(isset($vd['rights'][3]) && $vd['rights'][3] > 10){--> 最低充 <font color="#ff0000"><b>{$vd['rights'][3]}</b></font> <!--}--></td>
					</tr>
					<tr>
					<td height="30" class="tableleft1">&nbsp;</td>
					<td class="tableright1" style="padding:5px"><input name="submit" type="submit" class="button" value="确认支付"> <input type="reset" value="重新填写" class="button" name="reset3"></td>
					</tr>
					<!--}else{-->
          <tr> 
            <td colspan="2">您好，系统管理员尚未配置银行在线付款</td>
          </tr>
          <!--}-->
          <!--if(isset($vd['bankalert']) && $vd['bankalert'] != ''){-->
          <!--}-->
				</table>
				</td>
			</tr>
		</table>
		</form>
		</li></ul>
	
	</div>
</body>
</html>
