<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>{#$title#}</title>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<link rel="shortcut icon" href="{#$QISHI.site_dir#}favicon.ico" />
<meta name="author" content="骑士CMS" />
<meta name="copyright" content="74cms.com" />
<link href="{#$QISHI.site_template#}css/user.css" rel="stylesheet" type="text/css" />
<script src="{#$QISHI.site_template#}js/jquery.js" type='text/javascript' language="javascript"></script>
<script src="{#$QISHI.site_template#}js/jquery.validate.min.js" type='text/javascript' language="javascript"></script>
<script src="{#$QISHI.site_template#}js/jquery.idTabs.min.js" type='text/javascript' language="javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
	//计算获得积分数量
	$("#amount").keyup(function(){	
		if((/^(\+|-)?\d+$/.test($(this).val())) && $(this).val()>={#$QISHI.payment_min#})
		{
		$("#count").css("display","");	
		$("#show_val").html("充值金额为<strong style=\"color:#003399\">&nbsp;&nbsp;"+$(this).val()+"&nbsp;&nbsp;</strong>元，可获得：&nbsp;&nbsp;<span style=\"color: #009900; font-size:22px; font-style:italic\">"+$(this).val()*{#$QISHI.payment_rate#}+"</span>&nbsp;&nbsp;{#$QISHI.points_quantifier#}{#$QISHI.points_byname#}");   
		}
		else
		{
		$("#count").css("display","none");	
		}	
	});	
})
//验证
$(document).ready(function() {
 $("#Form1").validate({
 //debug: true,
// onsubmit:false,
//onfocusout :true,
   rules:{
   amount:{
    required: true,
	digits:true,
	min:{#$QISHI.payment_min#}
   },
   payment_name:{
    required: true
   }
	},
    messages: {
    amount: {
    required: "请输入充值金额",
	digits: "金额必须是整数",
    min: jQuery.format("单笔金额不能低于{0}元")
   },
   payment_name:{
    required: "请选择支付方式"
   }
  },
  errorPlacement: function(error, element) {
    if ( element.is(":radio") )
        error.appendTo( $("#pay_er"));
    else if ( element.is(":checkbox") )
        error.appendTo ( element.next());
    else
        error.appendTo(element.parent());
	}
    });
});
</script>
</head>
<body>
{#include file="member_company/header.htm"#}
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:8px;" >
  <tr>
    <td width="173" valign="top" class="link_bk">
	{#include file="member_company/left.htm"#}
	</td>
    <td valign="top">
	<div class="user_right_box">
		<div class="user_right_top_tit_bg">		
		  <h1>充值</h1>
		</div>
		<div class="us_list_tip link_lan"  style="margin-top:15px;">
		您目前还有 <span>{#$points#}</span> {#$QISHI.points_quantifier#}{#$QISHI.points_byname#}
		</div>
	<form id="Form1" name="Form1" method="post" action="?act=order_add_save"  >
      <table width="97%" border="0" cellpadding="4" cellspacing="0"  style="margin-top:5px;" >
        <tr>
          <td width="18%" height="30" align="right" bgcolor="#FFFFFF" style="border-bottom:1px  #93C4DB dashed">充值金额：</td>
          <td   bgcolor="#FFFFFF" style="border-bottom:1px  #93C4DB dashed">
		  <input name="amount" type="text"  id="amount" maxlength="8"   class="input_text_200"/>
            元
            (单笔金额不能低于{#$QISHI.payment_min#} 元)&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0033FF"><strong>1</strong>&nbsp;元&nbsp;=&nbsp;<strong>{#$QISHI.payment_rate#}</strong>&nbsp;{#$QISHI.points_quantifier#}{#$QISHI.points_byname#}</span> </td>
        </tr>
        <tr id="count" style="display:none;">
          <td height="30" align="right" bgcolor="#FFFFFF" style="border-bottom:1px  #93C4DB dashed">&nbsp;</td>
          <td bgcolor="#FFFFFF" style="border-bottom:1px  #93C4DB dashed">
		  <span id="show_val"></span>
		  &nbsp;</td>
        </tr>
		        <tr>
          <td  align="right" bgcolor="#F8FBFC"  >选择支付方式：</td>
          <td bgcolor="#F8FBFC" id="pay_er" >&nbsp;</td>
        </tr>
        <tr>
          <td height="30" colspan="2" valign="top" bgcolor="#F8FBFC" style="border-bottom:1px  #93C4DB dashed;padding-left:125px;">
		  {#section name=payment loop=$payment#}
		    <div style=" margin-bottom:10px; margin-top:2px;color: #666666" onmousemove="this.style.color='#FF0000'" onmouseout="this.style.color='#666666'">
		      <label>
		        <input type="radio" name="payment_name" value="{#$payment[payment].typename#}" id="payment_name"/>
		        <img src="{#$QISHI.site_dir#}include/payment/logo/{#$payment[payment].typename#}.gif" width="85" height="30" align="absmiddle" /> ({#$payment[payment].p_introduction#})</label>
		        </div>
		    {#/section#}</td>
          </tr>
        <tr>
          <td  >
           </td>
          <td height="50"  bgcolor="#FFFFFF" ><input type="image" name="imageField" src="{#$QISHI.site_template#}images/15.gif" />
</td>
        </tr>
      </table>
          </form>
		  </div>
    </td>
  </tr>
</table>
{#include file="footer.htm"#}
</body>
</html>
