<!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={$charset}" />
<title>{$seo['title']}</title>
<meta name="Keywords" content="{$seo['keywords']}">
<meta name="Description" content="{$seo['description']}">
<link href="templates/{$CFG[tplname]}/style/user.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/validator/validator.min.js"></script>
<link href="js/validator/validator.css" type="text/css" rel="stylesheet" />
</head>
<body>
<!--{template header}-->
<div class="wrapper">
	<!-- 主体 -->
    <!--{template member_left}-->
    <div class="col_main">
    <!--{template member_topmenu}-->
      <form method="post" name="form" >
      <div class="post_li">
        <ul>
         <li><h3>购卡数量</h3>
           <label for="card_num"></label>
           <select name="card_num" class="inputs" id="card_num" onchange="changeValue()">
             <option value="1">1</option>
             <option value="2">2</option>
             <option value="3">3</option>
             <option value="4">4</option>
             <option value="5">5</option>
             <option value="6">6</option>
           </select>
         </li>
         <li><h3>购卡人姓名</h3><input name="names" type="text" id="names" class="inputs" /></li>
         <li><h3>联系电话</h3><input name="phone" type="text" id="phone" class="inputs" value="{$re[phone]}" /></li>
         <li><h3>地址</h3><input name="address" type="text" class="inputs" id="address" size="40" /></li>
         <li><h3>支付方式</h3>
           <input name="payid" type="radio" id="radio" value="1" checked="checked" />
           <label for="payid">货到付款</label>
         </li>
         <li><h3>价格</h3><strong class="f14 fe43" id="money">￥{$CFG['cardmoney']}</strong></li>
         <li><h3>&nbsp;</h3><input type=submit id=submit name=submit value="我要购卡" class="btn_1" ></li>
        </ul>
      </div>
      </form>
      <!--{template member_right}-->
      </div>
	<!-- 主体 结束 -->
    </div>
	<!--{template footer}-->
<script>
         var input1pre;
         function changeValue() {
             var val1 = document.getElementById('card_num').options[document.getElementById('card_num').selectedIndex].value
			 var val2 = document.getElementById('money').innerText;
             if(typeof input1pre != 'undefined') {
                 val2 = val2.substring(0, val2.lastIndexOf(input1pre));
             }
		    document.getElementById('money').innerText = '￥'+(val1*{$CFG['cardmoney']});
		 }
</script>
<script type="text/javascript">
$.validator("names")
.setFocusMsg("请填写购卡人姓名")
.setRequired("请填写购卡人姓名")
.setRegexp(/^[\u2E80-\u9FFF]+$/, "姓名错误", false)
.setServerCharset("UTF-8")
.setStrlenType("symbol")
.setMinLength(2, "姓名不足2个字")
.setMaxLength(4, "姓名多于4个字");

$.validator("phone")
.setFocusMsg("请填写联系电话")
.setRequired("请填写联系电话")
.setRegexp(/^1[34578]\d{9}$|^(0\d{2,4}-)?[2-9]\d{6,7}(-\d{2,5})?$|^[48]00(-?\d){7,10}$/, "格式错误，如0530-1234567或138********", false)
.setServerCharset("UTF-8")
.setStrlenType("symbol");

$.validator("address")
.setFocusMsg("请填写收卡地址")
.setRequired("请填写收卡地址")
.setServerCharset("UTF-8")
.setStrlenType("symbol")
.setMaxLength(50, "地址多于50个字，请简化填写");
</script>
</body>
</html>
