<!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>
<script type="text/javascript" src="js/mb_count.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">
      <form action="member.php?act=send_check_phone" method="post" name="form" >
      <!--{template member_topmenu}-->
      <div class="post_li">
        <ul>
         {if ($userinfo['phone'])}
         <li><h3>已绑定号码</h3>{$userinfo['phone']}</li>
         {else}
         <li><h3>手机号码</h3><input name="phone" type="text" id="phone" class="inputs" /></li>
         <li><h3>验证码</h3><input name="phonekey" type="text" id="phonekey" class="inputs" />
           <input type="button" name="button" id="btnSendCode" class="sendbtn" value="发送验证码" onclick="sendMessage()" />
         </li>
         <li><h3>&nbsp;</h3><input type=submit id=submit name=submit value="绑定" class="btn_1" ></li>
         {/if}
        </ul>
      </div>
      </form>
      <!--{template member_right}-->
      </div>
	<!-- 主体 结束 -->
    </div>
	<!--{template footer}-->
{if (!$userinfo['phone'])}
<script type="text/javascript">
$.validator("phone")
.setFocusMsg("请填写手机号")
.setRequired("请填写手机号")
.setRegexp(/^1[34578]\d{9}$|^(0\d{2,4}-)?[2-9]\d{6,7}(-\d{2,5})?$/, "手机格式错误", false)
.setServerCharset("UTF-8")
.setStrlenType("symbol")
.setAjax("member.php?act=ajax&type=phone", "手机号码已存在")
.setMaxLength(11, "手机号不能多于11个字符 ");

$.validator("phonekey")
.setFocusMsg("手机收到的验证码")
.setRequired("请填写验证码")
.setServerCharset("UTF-8")
.setStrlenType("symbol")
</script>
{/if}
</body>
</html>
