<?php
	session_start();
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	
	//判断是否登录系统
	if($_SESSION['main_wx_userlogined']!="1" | $_SESSION['main_wx_userno']=="")
	{
		//没有登录开始启动登录
		header('location:..\loginwx.php?rset=0');
		exit;
	}
?>
<!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"> 
	
	<!--<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">
	<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>
	
</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>

<?php
	require_once("db/db.php");	
	require_once("common/common.php");
		
	$strDayTemp1=$_REQUEST['htday'];	//入住日期
?>

<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">
		<table width="100%" height="45" border="0" cellpadding="0" cellspacing="0" bgcolor="#FAFAFA">
			<tr>
				<td height="45" width="45" align="right">
					<a href="index.php?selno=<?php echo $_SESSION["ChainNo_ydtpos"];?>&htday=<?php echo $strDayTemp1;?>" data-transition="slide" target="_blank" data-role="button" data-icon="carat-l" data-iconpos="notext"></a>
				</td>
				<td height="45" width="10"></td>
				<td height="45" align="left">
					<div onClick="window.location.href='index.php?selno=<?php echo $_SESSION["ChainNo_ydtpos"];?>&htday=<?php echo $strDayTemp1;?>';" style="padding-top:2px;">
						<table width="100%" height="45" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td><span style="color: #000000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-weight:bold; font-size:15px;">选择日期</span></td>
							</tr>
						</table>
					</div>
				</td>
				<td height="45" width="100" align="left">
					<span style="color: #000000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;">
						<a style="color:#000000;" class="ui-btn ui-corner-all ui-icon-check ui-btn-icon-right ui-mini" data-role="button" id="day_setok">确定日期&nbsp;&nbsp;</a>
					</span>
				</td>
				<td height="45" width="5"></td>
			</tr>
		</table>
	</header>
	
	<article data-role="none">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td height="4" width="8"></td>
				<td height="4" align="left"></td>
				<td height="4" width="8"></td>
			</tr>
			
			<tr>
				<td width="8"></td>
				<td align="left">
					<input type="text" id="dtp1" name="dtp1" readonly= "true" value="<?php echo $strDayTemp1;?>" data-role="date" data-inline="true" />
				</td>
				<td width="8"></td>
			</tr>
						
			<tr>
				<td height="8" width="8"></td>
				<td height="8" align="left"></td>
				<td height="8" width="8"></td>
			</tr>
			
			<tr>
				<td height="1" width="8" bgcolor="#F2E2E2"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="8" bgcolor="#F2E2E2"></td>
			</tr>

		</table>
		
		<script type="text/javascript">
			//相应查询按钮的事件
		 	$("#day_setok").click(
				function()
		 		{
		 			var strday1 = $("#dtp1").val();
					if(strday1=="")
					{	
						$("#dtp1").focus();
						return;
					}
					
					var strurl;
					strurl="index.php?selno=" + '<?php echo $_SESSION["ChainNo_ydtpos"];?>' + "&htday=" + strday1;
					
		 			parent.window.location.href=strurl;
		 		}
			);
		</script>
		
	</article>
</section>

</body>
	
</html>