<?php
	session_start();
	require_once("db/db.php");	
	require_once("common/common.php");
	header("Content-type:text/html;charset=gb2312");
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="gb2312">	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=0">
	<meta name="apple-touch-fullscreen" content="1">

	<title>微信会员</title>
	
	<script src="jsp4/jquery.js"></script>
	<script src="jsp4/jquery.placeholder.min.js"></script>

	<!--<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">-->
	<!--<script src="jsp4/jquery.mobile-1.4.3.min.js"></script>-->
	<script src="jsp5/jquery.mobile-1.4.5.min.js"></script>
	<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">
	
	<script language="JavaScript"> 
		//不允许进行后退
		javascript:window.history.forward(0); 
	</script>
</head>

<?php 
	$ptemp=$_REQUEST['stext'];
	$pstext='';
	
	if($ptemp==1)
		$pstext='未设置默认分店和类型';
	elseif($ptemp==2)
		$pstext='该手机号已被注册';
	elseif($ptemp==3)
		$pstext='服务器连接失败';
	elseif($ptemp==4)
		$pstext='未知错误';
?>

<script>	
		//隐藏维信右上角菜单
		function onBridgeReady(){
			WeixinJSBridge.call('hideOptionMenu');
		}

		if (typeof WeixinJSBridge == "undefined")
		{
			if( document.addEventListener )
			{
				document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
			}
			else if (document.attachEvent)
			{
				document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
				document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
			}
		}
		else
		{
			onBridgeReady();
		}
	</script>
	
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">

<div data-role="page">
	<header data-role="header" data-position="fixed" data-tap-toggle="false">
		<table width="100%" height="45" border="0" cellpadding="0" cellspacing="0" bgcolor="#FAFAFA">
		   <tr>
			<td height="45" width="20"></td>
			<td height="45" align="center">会员免费注册</td>
			<td height="45" width="20"></td>
		  </tr>
		</table>
	</header>
			
	<div data-role="content" align="center">
		<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td height="40" width="45" align="center">
					<a class="ui-btn ui-icon-phone ui-btn-icon-notext ui-corner-all" href="#"></a>
				</td>
				<td height="40" align="right">
					<div style="float:left;width:100%;">
						<input type="text" name="mtelno1" id="mtelno1" value="" placeholder="请输入手机号，必填项目" data-mini="true" data-clear-btn="true"/>
					</div>			
				</td>
				<td height="40" width="10"></td>
			</tr>
			
			<tr>
				<td height="40" width="45" align="center">
					<a class="ui-btn ui-icon-user ui-btn-icon-notext ui-corner-all" href="#"></a>
				</td>
				<td height="40" align="right">
					<div style="float:left;width:100%;">
						<input type="text" name="username1" id="username1" value="" placeholder="请输入姓名，必填项目" data-mini="true" data-clear-btn="true"/>
					</div>			
				</td>
				<td height="40" width="10"></td>
			</tr>
			
			<tr>
				<td height="40" width="45" align="center">
					<a class="ui-btn ui-icon-lock ui-btn-icon-notext ui-corner-all" href="#"></a>
				</td>
				<td height="40" align="right">
					<div style="float:left;width:100%;">
						<input type="text" name="pswd1" id="pswd1" value="" placeholder="请输入密码,默认为空" data-mini="true" data-clear-btn="true"/>
					</div>			
				</td>
				<td height="40" width="10"></td>
			</tr>
			
			
			
		</table>
		
		<div style="left:2%;width:90%;height:50px;padding-top:6px;">	
			<button class="ui-btn ui-corner-all" style="color:#999933;"  id="mynewpost">下一步</button>
		</div>
	
		<div style="left:2%;width:90%;height:50;padding-top:10px;">	
			<a class="ui-btn ui-corner-all" href="login.php?rset=0" style="color:#999933;" target="_blank" data-role="button">返回</a>
		</div>
		
		<?php
			if(strlen($pstext)>0)
			{
		?>
		<div align="center"><span style="color: #666666;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;"><?php echo $pstext;?></span></div>
		<?php
				$pstext="";
			}
		?>
		
		<div style="width:90%;height:40px;" align="center">
			<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td height="40" width="5" ></td>
					<td height="40" align="left">
						<span style="color: #6D6D6D;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-decoration: none;text-shadow:none;">注：请正确输入手机号，会员登录和交易短信都需要使用此手机号</span>
					</td>
					<td height="40" width="10"></td>
				</tr>
			</table>
		</div>
	</div>
	
	<footer data-role="footer" data-position="fixed">&nbsp;</footer>
	
	<script type="text/javascript">
		
		 	$("#mynewpost").click(
				function()
		 		{
		 			var strtelno = $("#mtelno1").val();
					var strusername = $("#username1").val();
		 			var strpswd = $("#pswd1").val();
					if(strtelno.length<5)
					{	
						$("#mtelno1").focus();
						return;
					}
					if(strtelno.length<11)
					{	
						alert("您输入的手机号不正确！");
						$("#mtelno1").focus();
						return;
					}
		 			parent.window.location.href='vipnewsave.php?telno=' + strtelno + '&pswd=' + strpswd + '&usernme=' + strusername;
		 		}
			);
	</script>
	
	<script>
		//禁止页面上下滑动,整个页面都不能滑动了
		document.addEventListener('touchmove', function(e) {
			e.preventDefault();
		});
</script>
</div>

</body>

</html>