<?php defined('IN_HS') or exit('Access Denied'); ?>
<?php include template('member','header'); ?>

<script language="javascript">
<?php
sajax_show_javascript();
?>
function doSub(){
var c = document.getElementById("message");
var cardid = document.getElementById("cardid").value;
var cardpass = document.getElementById("cardpass").value;
var chkcode = document.getElementById("chkcode").value;
document.getElementById("door").style.display="block";
c.innerHTML = "正在校验输入信息，请稍候...";
x_doSub(cardid,cardpass,chkcode,doSub_cb);

function doSub_cb(z) {
  if(z=="true")
  {
alert("恭喜您,充值成功");
window.location.reload();
document.getElementById("door").style.display="none";
}
else if(z=="errcode")
{
alert("验证码输入错误");
document.getElementById("checkcode").src="<?php echo HS_PATH;?>checkcode.php?id='+Math.random()*5";
}
else	
{
document.getElementById("message").innerHTML = z;
}
}
}
//-->
</script>

<DIV class=main>
<DIV class=main>

<?php include template('member','left_pay'); ?>

<DIV class="ad_rbarB boxC">
<DIV class=columnC><SPAN class="l_tit f_l">帐号充值</SPAN></DIV>
<DIV class=mainboxD>
<?php if($MOD['amo']) { ?>
<DIV class="tipsboxB boxE">
<H5>充值公告</H5>
<DIV class=cont><?php echo $MOD['amo'];?></DIV>
</DIV>
<?php } ?>
<div class="tipsboxC" id=door style="display: none"><span class="font06" id="message"></span></div>
<TABLE class=regform cellSpacing=0 cellPadding=0 width="80%" align=center border=0>
  <TBODY id=paying>
  <TR>
    <TD colspan="3" style="text-align:left;font-size:14px;font-weight:bold;color:#555">亲爱的 <font color=red><?php echo $_username;?></font> 您的当前余额为： <font color=green><?php echo $_money;?></font> 元</TD>
    </TR>
  <TR>
    <TH>充值卡卡号： </TH>
    <TD colSpan=2><INPUT class=inputA id=cardid style="ime-mode: disabled"> </TD></TR>
  <TR>
    <TH>充值卡密码： </TH>
    <TD colSpan=2><INPUT class=inputA id=cardpass style="ime-mode: disabled"> </TD></TR>
  <TR>
    <TH>验证码： </TH>
    <TD><INPUT class=inputB id=chkcode style="ime-mode: disabled"> <img src="<?php echo HS_PATH;?>checkcode.php" id="checkcode" onclick="this.src='<?php echo HS_PATH;?>checkcode.php?id='+Math.random()*5;" style="cursor:pointer;" alt="看不清楚?请点击刷新" align="absmiddle" height=30 width=80> </TD>
    <TD id=tdCodeValide></TD></TR>
  <TR>
    <TH>&nbsp; </TH>
    <TD colSpan=2>
      <input type="submit" onClick="doSub()" class="hsbtn" value="充值">	  </TD></TR>
  </TBODY>
  </TABLE>
</DIV></DIV>
  </DIV></DIV></DIV>

<?php include template('member','footer'); ?>
