<?php
	session_start();
	require_once("../Wx.Config.php");	//只加载一次
	//判断是否登录系统		
	if($_SESSION["main_viploginedsk"]!="1" |$_SESSION["main_vipnosk"]=="")
	{
		//没有登录开始启动登录
		require_once("logina.php");	
	}
?>
<!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>
	<link rel="stylesheet" href="css/mycss.css"> 

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

<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">
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="hispage1">
	<header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;">
        <table width="100%" height="45" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo WxMainConfig::colHeadBkColorBook;?>">
		   	<tr>
				<td height="45" width="30" align="center"></td>
				<td height="45" align="center" valign="middle">
					<span id="MsgTxt" style="color:<?php echo WxMainConfig::colHeadTextColorBook;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:19px;text-shadow:none;">微信关联住房</span>
               	</td>
				<td height="45" width="30" valign="middle"></td>
		  	</tr>
		</table>
	</header>
		
	<article data-role="none">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
									
			<tr>
				<td height="10" width="15"></td>
				<td height="10" align="left"></td>
				<td height="10" width="15"></td>
			</tr>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="15" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						
						<tr>
							<td height="40" width="88">
								<span style="color: #808000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif;font-size:16px;">申请验证码</span>
							</td>
							<td height="40" colspan="2">
								<input id="mytext1" name="mytext1" value='' type="number" placeholder="请输入验证码" autocomplete="off" data-clear-btn="true"/>
							</td>
						</tr>
						
					</table>
				</td>
				<td height="5" width="15"></td>
			</tr>
			
			<tr>
				<td height="5" width="15"></td>
				<td height="5" align="left"></td>
				<td height="5" width="15"></td>
			</tr>
			
									
			<tr>
				<td height="20" width="15"></td>
				<td height="20" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="47%">
								<a class="ui-btn ui-corner-all" href="roomlist.php" style="color:#A6A600;" target="_blank" data-role="button">返回</a>
							</td>
							<td width="6%"></td>
							<td width="47%">
								<span style="color: #666666;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">
									<a class="ui-btn ui-corner-all" style="color:#A6A600;" id="cmd_rwx" data-role="button">提交</a>
								</span>
							</td>
						</tr>
					</table>					
				</td>
				<td height="20" width="15"></td>
			</tr>
			
			<tr>
				<td height="10" width="15"></td>
				<td height="10" align="left"></td>
				<td height="10" width="15"></td>
			</tr>
								
			<tr>
				<td height="35" width="15"></td>
				<td height="35" align="left">
					<span style="color: #666666;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">
						注意: 
						<br>1.此验证码用来验证微信住房,请勿转告他人!
						<br>2.如需微信关联住房,请与酒店前台联系!
					</span>
				</td>
				<td height="35" width="15"></td>
			</tr>
						
			<tr>
				<td height="8" width="15"></td>
				<td height="8" align="left"></td>
				<td height="8" width="15"></td>
			</tr>
			
			<tr>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
			</tr>
			
		</table>
			
		<script type="text/javascript">
			$("#cmd_rwx").click(
				function()
		 		{				
					var strroomno=$("#mytext1").val();	//roomno
					//var strmanname=$("#mytext2").val();	//姓名
										
					var intNextFlag=0;
					
					//if(strmanname.length==0)
					//{
					//	intNextFlag=1;
					//	alert("请输入姓名！");
					//}
					if(strroomno.length==0)
					{
						intNextFlag=1;
						alert("请输入房号！");
					}
										
					if(intNextFlag==0)
					{	//提交保存订单
						//strmanname=strmanname.replace("'", "");
						strroomno=strroomno.replace("'", "");
						
						var strurl="roomandwx.php?rmid=" + strroomno;
						
						//alert(strurl);
						window.location.href=strurl;
					}
				}
			);
		</script>
		
	</article>
</section>

</body>
	
</html>