<?php
	session_start();
			
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
		
	//微信号
	$strwxudid=$_REQUEST['wxudid'];
	if(strlen($strwxudid)>10)
	{
		$_SESSION["main_wx_userwxudid"]=$strwxudid;
	}
	
	if($_SESSION['main_wx_userlogined']!="1" |$_SESSION['main_wx_userno']=="")
	{
		//没有登录开始启动登录
		header('location:loginwx.php?rset=0');
		exit;
	}
		
	require_once("Wx.Config.php");
	
	$strHotelName=trim(WxMainConfig::strHeadTextHotelName);
	$strHotelName=iconv('utf-8','gb2312',$strHotelName);
	if(strlen($strHotelName)<2)
	{
		$strHotelName='云点通登录';
	}
	
	//1.判断当前登陆的用户是否有权限使用模块
	require_once("db/db.php");	
	require_once("common/common.php");
	
	$userno=trim($_SESSION['main_wx_userno']);
	
	//加载登陆用户的资料信息
	if(strlen($_SESSION['ChainNo'])<1)
	{
		//登录成功
		$_SESSION['ChainCount'] ="1";
		$_SESSION['ChainNo'] = "";  
		$_SESSION['ChainName'] = "";  
		$_SESSION['userno'] = $userno;  
		$_SESSION['username'] = "";  
		$_SESSION['pswd'] = $pswd;
		$_SESSION['logintime'] = time();
		$_SESSION['loginflag'] ="1";
			
		$_SESSION['hotelday'] ="";
		$_SESSION['updatetime'] ="";
		$_SESSION['updatestate'] ="";
			
		//$_SESSION["main_defusernoflag"]="1";
		//$_SESSION["main_defuserno"]=$userno;
			
		//得到用户名称
		$sql = sprintf("Select Use_Name from User_QuanXian Where Use_No='%s'", $userno);
		$result = querySql($sql);
		if($row = fetch_array($result))
		{
			$_SESSION['username'] = trim($row['Use_Name']);
		}
		freeResult($result);
					
		$intRowCount=0;
		//得到该用户可以访问的分店信息
		$sql=sprintf("SELECT TOP 2 a.Chain_No,a.Chain_Name,a.Web_State,convert(varchar(19),a.Web_Date,120)AS WebTime,convert(varchar(10),a.HotelDate,120) AS HotelDay
				FROM Chain_Infor a,dbo.TRF_AppGetChainFromUser('%s') b WHERE a.Chain_No=b.Chain_No;",$userno);
				
		$result = querySql($sql);
			
		while($row = fetch_array($result))
		{
			if($intRowCount==0)
			{
				$_SESSION['ChainNo'] = $row['Chain_No'];  
				$_SESSION['ChainName'] = $row['Chain_Name']; 
					
				$_SESSION['hotelday'] = $row['HotelDay'];
				$_SESSION['updatetime'] = $row['WebTime'];
						
				$intWebState=$row['Web_State'];
				$swebstate="";
				switch($intWebState)
				{
					case 1:
						$swebstate="传输";
						break;
					case 2:
						$swebstate="完成";
						break;
					case 3:
						$swebstate="错误";
						break;
					default:
						$swebstate="停止";
						break;
				}
					
				$_SESSION['updatestate'] =$swebstate; 
			}
				
			$intRowCount=$intRowCount +1;
		}
			
				
		//判断是否有多条记录
		if($intRowCount>1)
		{
			$_SESSION['ChainCount'] ="2";
		}
		else
		{
			$_SESSION['ChainCount'] ="1";
		}
			
		freeResult($result);
	}
	
	
	
	
	
	
	
	//men_bar498 集团查询;men_bar410 清扫完成;men_bar413 房吧入账;men_bar1165 部门营业报表,men_bar331 实时房态 men_bar486财务查询(用来控制报表权限)
	$intRoomFindFlag=0;
	$intRoomClearFlag=0;
	$intRoomBarFlag=0;
	$intDepartFindFlag=0;
	$intRoomStateView=0;
	$intReportFlag=0;
	$intBreakfastFlag=0;
	
	$intRowTemp=0;
	$intRowValue=0;
	
	$sql=sprintf("SELECT RoomFlag,Use_Flag FROM(
			Select 1 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar498'
			UNION Select 2 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar410'
			UNION Select 3 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar413'
			UNION Select 4 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar1165'
			UNION Select 5 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar331'
			UNION Select 6 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar486'
			UNION Select 7 AS RoomFlag,a.Use_Flag,b.Use_Name From Sys_Group_Quanxian a,User_QuanXian b Where a.Group_No=b.Group_No And b.Use_No='%s' And a.Modul_Name='men_bar541'
			) t Order By t.RoomFlag ASC",$userno,$userno,$userno,$userno,$userno,$userno,$userno,$userno);

	$result = querySql($sql);
	while($row = fetch_array($result))
	{
		$intRowTemp = $row['RoomFlag'];
		$intRowValue = $row['Use_Flag'];
		
		switch ($intRowTemp)
		{
			case 1:
				$intRoomFindFlag=$intRowValue;
				break;
			case 2:
				$intRoomClearFlag=$intRowValue;
				break;
			case 3:
				$intRoomBarFlag=$intRowValue;
				break;
			case 4:
				$intDepartFindFlag=$intRowValue;
				break;
			case 5:
				$intRoomStateView=$intRowValue;
			case 6:
				$intReportFlag=$intRowValue;
				break;
			case 7:
				$intBreakfastFlag=$intRowValue;
				break;
			
		}
	}
	freeResult($result);
	
	
	$strnewchainno=$_REQUEST['selno'];
	if(strlen($strnewchainno)>0)
	{
		$strnewchainname="";
		$strnewupdatetime="";
		$strnewhoteldate="";
		if($strnewchainno!="")
		{
			//重新获得新分店信息
			$sql=sprintf("SELECT Chain_Name,convert(varchar(19),GetDate(),120)AS WebTime
					FROM Chain_Infor WHERE Chain_No='%s'",$strnewchainno);
			$result = querySql($sql);
			$row = fetch_array($result);
			$strnewchainname = $row['Chain_Name'];
			$strnewupdatetime = $row['WebTime'];
			//释放数据库
			freeResult($result);
			//closeDb();
			
			$_SESSION['ChainNo'] = $strnewchainno;  
			$_SESSION['ChainName'] =$strnewchainname;  
			$_SESSION['updatetime'] = $strnewupdatetime;
			$_SESSION['updatestate'] ="";
		}
		$strnewchainno=$_SESSION['ChainNo'];
		$strnewchainname=$_SESSION['ChainName'];
		
		//得到酒店日期
		$sql=sprintf("SELECT convert(varchar(10),DATEADD(DAY,-1,SystemDate),120)AS HotelDate FROM TR_Night_Date WHERE Chain_No='%s'",$strnewchainno);
		$result = querySql($sql);
		$row = fetch_array($result);
		$strnewhoteldate =$row['HotelDate'];
		freeResult($result);
		
		$strHotelName=$strnewchainname;
	}
	else
	{
		//获取酒店信息
		$strSelchainno=$_SESSION['ChainNo'];
		if(strlen($strSelchainno)>0)
		{
			$strnewchainname="";
			$strnewupdatetime="";
			$strnewhoteldate="";
			if($strnewchainno!="")
			{
				//重新获得新分店信息
				$sql=sprintf("SELECT Chain_Name,convert(varchar(19),GetDate(),120)AS WebTime
						FROM Chain_Infor WHERE Chain_No='%s'",$strSelchainno);
				$result = querySql($sql);
				$row = fetch_array($result);
				$strnewchainname = $row['Chain_Name'];
				$strnewupdatetime = $row['WebTime'];
				//释放数据库
				freeResult($result);
				//closeDb();
				
				$_SESSION['ChainNo'] = $strnewchainno;  
				$_SESSION['ChainName'] =$strnewchainname;  
				$_SESSION['updatetime'] = $strnewupdatetime;
				$_SESSION['updatestate'] ="";
			}
			$strnewchainno=$_SESSION['ChainNo'];
			$strnewchainname=$_SESSION['ChainName'];
			
			//得到酒店日期
			$sql=sprintf("SELECT convert(varchar(10),DATEADD(DAY,-1,SystemDate),120)AS HotelDate FROM TR_Night_Date WHERE Chain_No='%s'",$strnewchainno);
			$result = querySql($sql);
			$row = fetch_array($result);
			$strnewhoteldate =$row['HotelDate'];
			freeResult($result);
		
			$strHotelName=$strnewchainname;
		}
	}
	
	//当前分店号
	$strNowSelChainNo=trim($_SESSION['ChainNo']);
	
	
	closeDb();
	
	//初始化子系统的已选择分店的标示
	$_SESSION["ChainNofwHadSelChain"]='0';	//房务系统
?>


<!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="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>-->
	<script src="ydth6/jsp4/jquery.js"></script>
	<script src="ydth6/jsp4/jquery.placeholder.min.js"></script>
	
	<!--<link rel="stylesheet" href="ydth6/jsp4/jquery.mobile-1.4.3.min.css">-->
	<!--<script src="ydth6/jsp4/jquery.mobile-1.4.3.min.js"></script>-->
	
	<script src="ydth6/jsp5/jquery.mobile-1.4.5.min.js"></script>
	<link rel="stylesheet" href="ydth6/jsp5/jquery.mobile-1.4.5.min.css">
	
	<script language="JavaScript"> 
		//不允许进行后退
		javascript:window.history.forward(1); 
	</script>
	
	<script>
		//禁止页面上下滑动,整个页面都不能滑动了
		document.addEventListener('touchmove', function(e) {
			e.preventDefault();
		});
	</script>
	
</head>



<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" >

	
<section data-role="page" id="page1">
	<header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;bkc">
        <table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" >
		   	<tr bgcolor="#3595f5">
				<td height="50" width="45" align="right" valign="middle">
					<div onClick="bmtSelNewChain();" style="border-radius:1px;width:32px; height:32px; ">
						<img src="images\ListSel.png" width="32" height="32" border="0" style="margin-top:0px;">
					</div>
				</td>
				<td height="50" align="center" valign="middle">
					<span style="color:#fff;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:18px;text-shadow:none;"><?php echo $strHotelName;?></span>
				</td>
				<td height="50" width="45" align="center" valign="middle">
					<div onClick="btmSetToLogin();" style="border-radius:8px;width:55px; height:36px; ">
						<img src="images\relogin.png" width="32" height="32" border="0" style="margin-top:2px;">
					</div>
				</td>
		  	</tr>
			
			
		</table>
	</header>
		
	<article data-role="none">
				
		<table width="100%" border="0" cellpadding="0" cellspacing="0" >
			
			<tr><td height="18" colspan="3"></td></tr>
			
			<tr>
				<td height="50" width="10"></td>
				<td height="50" align="left" valign="top">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="120" width="3%"></td>
							
							<?php if($intRoomStateView>0) {?>
								<td height="120" width="27%" align="center" valign="top">
									<div onclick="SubClick(1)" style="width:100%;height:100%;border:1px solid #f5f5f5;border-radius:3px;background-color:#FFF; box-shadow:2px 2px 6px #cfcece;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="80" align="center">
													<img src="images\room_state.png" width="64" height="64" border="0" style="margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<div style="width:100%;height:15px;border:0px;">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">实时房态</span>
													</div>
													<div style="width:100%;height:10px;border:0px;">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;">云点通</span>
													</div>
													
												</td>
										   </tr>
										   
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="120" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;border:1px solid #f5f5f5;border-radius:3px;background-color:#F0F0F0; box-shadow:2px 2px 6px #cfcece;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="80" align="center">
													<img src="images\room_state.png" width="64" height="64" border="0" style="margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<div style="width:100%;height:15px;border:0px;">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">实时房态</span>
													</div>
													<div style="width:100%;height:10px;border:0px;">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;">云点通</span>
													</div>
													
												</td>
										   </tr>
										   
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="120" width="6.25%"></td>
							
							<?php if($intRoomClearFlag>0) {?>
								<td height="120" width="27%"  align="center" valign="top">
									<div onclick="SubClick(2)" style="width:100%;height:100%;border:1px solid #f5f5f5;border-radius:3px;background-color:#FFF; box-shadow:2px 2px 6px #cfcece;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="80" align="center">
													<img src="images\room_icon.png" width="64" height="64" border="0" style="margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<div style="width:100%;height:15px;border:0px;">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">房务中心</span>
													</div>
													<div style="width:100%;height:10px;border:0px;">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;">客房宝</span>
													</div>
													
												</td>
										   </tr>
										   
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="120" width="27%"  align="center" valign="top">
									<div style="width:100%;height:100%;border:1px solid #f5f5f5;border-radius:3px;background-color:#F0F0F0; box-shadow:2px 2px 6px #cfcece;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="80" align="center">
													<img src="images\room_icon.png" width="64" height="64" border="0" style="margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<div style="width:100%;height:15px;border:0px;">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">房务中心</span>
													</div>
													<div style="width:100%;height:10px;border:0px;">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;">客房宝</span>
													</div>
													
												</td>
										   </tr>
										   
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="120" width="6.25%"></td>
							
							<?php if($intDepartFindFlag>0) {?>
								<td height="120" width="27%" align="center" valign="top">
									<div onclick="SubClick(3)" style="width:100%;height:100%;border:1px solid #f5f5f5;border-radius:3px;background-color:#fff; box-shadow:2px 2px 6px #cfcece;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="80" align="center">
													<img src="images\dep_icon.png" width="64" height="64" border="0" style="margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<div style="width:100%;height:15px;border:0px;">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">部门营业</span>
													</div>
													<div style="width:100%;height:10px;border:0px;">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;">云点通</span>
													</div>
													
												</td>
										   </tr>
										   
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="120" width="27%"  align="center" valign="top">
									<div style="width:100%;height:100%;border:1px solid #f5f5f5;border-radius:3px;background-color:#F0F0F0; box-shadow:2px 2px 6px #cfcece;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="80" align="center">
													<img src="images\dep_icon.png" width="64" height="64" border="0" style="margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<div style="width:100%;height:15px;border:0px;">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">部门营业</span>
													</div>
													<div style="width:100%;height:10px;border:0px;">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;">云点通</span>
													</div>
													
												</td>
										   </tr>
										   
										</table>
									</div>
								</td>
							<?php } ?>
														
							<td height="120" width="3.5%"></td>
						</tr>
					</table>
				
				</td>
				<td height="50" width="10"></td>
			</tr>
			
			
			<tr><td height="20" colspan="3"></td></tr>
			
			
			<tr>
				<td height="30" width="10"></td>
				<td height="30">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="60" width="4.5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(4)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_01.png" width="32" height="32" border="0" style="margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">营业概况</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_01.png" width="32" height="32" border="0" style="margin-top:10px;opacity: 0.8;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">营业概况</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(5)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_03.png" width="24" height="32" border="0" style="margin-left:0px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">营业日报</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_03.png" width="24" height="32" border="0" style="margin-left:0px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">营业日报</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(6)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_02.png" width="24" height="32" border="0" style="margin-left:-3px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">营业月报</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_02.png" width="24" height="32" border="0" style="margin-left:-3px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">营业月报</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
														
							<td height="60" width="4.5%"></td>
						</tr>
					</table>
				</td>
				<td height="30" width="10"></td>
			</tr>
			
			<tr><td height="13" colspan="3"></td></tr>
			
			
			<tr>
				<td height="30" width="10"></td>
				<td height="30">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="60" width="4.5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(7)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_04.png" width="32" height="32" border="0" style="margin-left:-2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">交款记录</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_04.png" width="32" height="32" border="0" style="margin-left:-2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">交款记录</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(8)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_05.png" width="24" height="32" border="0" style="margin-left:0px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">住客明细</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_05.png" width="24" height="32" border="0" style="margin-left:0px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">住客明细</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(9)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center" valign="middle">
													<img src="images\main_06.png" width="32" height="27" border="0" style="margin-left:0px;margin-top:15px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">异动情况表</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center" valign="middle">
													<img src="images\main_06.png" width="32" height="27" border="0" style="margin-left:0px;margin-top:15px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">异动情况表</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
														
							<td height="60" width="4.5%"></td>
						</tr>
					</table>
				</td>
				<td height="30" width="10"></td>
			</tr>
					
			
			<tr><td height="13" colspan="3"></td></tr>
			
			
			<tr>
				<td height="30" width="10"></td>
				<td height="30">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="60" width="4.5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(10)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_07.png" width="26" height="32" border="0" style="margin-left:0px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">账目明细</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_07.png" width="26" height="32" border="0" style="margin-left:0px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">账目明细</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(11)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_12.png" width="30" height="32" border="0" style="margin-left:-2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">收款汇总</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_12.png" width="30" height="32" border="0" style="margin-left:-2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">收款汇总</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(12)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center" valign="middle">
													<img src="images\main_11.png" width="25" height="32" border="0" style="margin-left:-4px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">结账记录</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center" valign="middle">
													<img src="images\main_11.png" width="25" height="32" border="0" style="margin-left:-4px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">结账记录</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
														
							<td height="60" width="4.5%"></td>
						</tr>
					</table>
				</td>
				<td height="30" width="10"></td>
			</tr>
			
			
			<tr><td height="13" colspan="3"></td></tr>
			
			
			<tr>
				<td height="30" width="10"></td>
				<td height="30">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="60" width="4.5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(13)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_09.png" width="28" height="32" border="0" style="margin-left:2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">充值记录</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_09.png" width="28" height="32" border="0" style="margin-left:2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">充值记录</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(14)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_10.png" width="27" height="32" border="0" style="margin-left:-2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">应收账款</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\main_10.png" width="27" height="32" border="0" style="margin-left:-2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">应收账款</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(15)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center" valign="middle">
													<img src="images\main_13.png" width="25" height="32" border="0" style="margin-left:-3px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">试算平衡表</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center" valign="middle">
													<img src="images\main_13.png" width="25" height="32" border="0" style="margin-left:-3px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">试算平衡表</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
							
							<td height="60" width="4.5%"></td>
						</tr>
					</table>
				</td>
				<td height="30" width="10"></td>
			</tr>
			
				

			
			<tr><td height="13" colspan="3"></td></tr>
			
			
			<tr>
				<td height="30" width="10"></td>
				<td height="30">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td height="60" width="4.5%"></td>
							
							<?php if($intBreakfastFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(16)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\breakfast.png" width="28" height="32" border="0" style="margin-left:2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">早餐扫码</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\breakfast.png" width="28" height="32" border="0" style="margin-left:2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">早餐扫码</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(17)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\senduser.png" width="36" height="32" border="0" style="margin-left:-2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">分房服务</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\senduser.png" width="36" height="32" border="0" style="margin-left:-2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">分房服务</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
								
							
							
							<td height="60" width="5%"></td>
							
							<?php if($intRoomFindFlag>0 and $intReportFlag>0) {?>
								<td height="60" width="27%" align="center" valign="top">
									<div onclick="SubClick(18)" style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\liwjicon.png" width="30" height="32" border="0" style="margin-left:-2px;margin-top:10px;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">当日退房</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } else {?>
								<td height="60" width="27%" align="center" valign="top">
									<div style="width:100%;height:100%;">
										<table height="10" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td height="40" align="center">
													<img src="images\liwjicon.png" width="30" height="32" border="0" style="margin-left:-2px;margin-top:10px;opacity: 0.5;">
												</td>
										   </tr>
										   <tr>
												<td height="20" align="center">
													<span style="color: #bc7a7a;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">当日退房</span>
												</td>
										   </tr>
										</table>
									</div>
								</td>
							<?php } ?>
							
							
							<td height="60" width="4.5%"></td>
						</tr>
					</table>
				</td>
				<td height="30" width="10"></td>
			</tr>
			
			
			
			
			
			<tr><td height="10" colspan="3"></td></tr>
		</table>
				
	</article>
	
	
	<script type="text/javascript">
		
		function SubClick(subid)
		{		
			//alert('TEST');
					
			var strurl;
			strurl="";
			
			if(subid==1)
			{
				//strurl="ydth6/index.php?flpid=1";
				strurl="ydth6/repRoomView.php?pgid=1&chainno=<?php echo $strNowSelChainNo;?>";
			}
			else if(subid==2)
			{
				//strurl="wxroom/index.php?flpid=1";
				strurl="wxroom/index.php?flpid=1&mchid=<?php echo $strNowSelChainNo;?>";
			}
			else if(subid==3)
			{
				//strurl="ydtpos/index.php?flpid=1";
				strurl="ydtpos/index.php?flpid=1&chainno=<?php echo $strNowSelChainNo;?>&selno=<?php echo $strNowSelChainNo;?>&seldpt=**";
			}
			else if(subid==4)
			{
				//strurl="ydth6/index.php?flpid=1";
				strurl="ydth6/index.php?flpid=0&selno=<?php echo $strNowSelChainNo;?>";
			}
			else if(subid==5)
			{
				strurl="ydth6/repdayreport.php";
			}
			else if(subid==6)
			{
				strurl="ydth6/repmonthreport.php";
			}
			else if(subid==7)
			{
				strurl="ydth6/payforlist.php";
			}
			else if(subid==8)
			{
				strurl="ydth6/nowsitedlist.php";
			}
			else if(subid==9)
			{
				strurl="ydth6/repotherreport.php";
			}
			else if(subid==10)
			{
				strurl="ydth6/repconsume.php";
			}
			else if(subid==11)
			{
				strurl="ydth6/reppayforsum.php";
			}
			else if(subid==12)
			{
				strurl="ydth6/repreckonlist.php";
			}
			else if(subid==13)
			{
				strurl="ydth6/reppayforvip.php";
			}
			else if(subid==14)
			{
				strurl="ydth6/repcustomys.php";
			}
			else if(subid==15)
			{
				strurl="ydth6/rephotelph.php";
			}
			else if(subid==16)
			{
				strurl="breakfast/ebfmain.php";
			}
			else if(subid==17)
			{
				strurl="roomff/fwmain.php?chainno=<?php echo $strNowSelChainNo;?>";
			}
			else if(subid==18)
			{
				strurl="ydth6/rmroomordernoreckon1.php?chainno=<?php echo $strNowSelChainNo;?>";
				//strurl="indexnfc.php";	//测试NFC
			}
			
			if(strurl.length>0)
			{
			 	//alert(strurl);
				window.location.href=strurl;
			}
		};
				
		function btmSetToLogin()
		{	
			parent.window.location.href="loginwx.php?rset=11";
		};
		
		function bmtSelNewChain()
		{	
			window.location="getchain.php";
		};
		
		//进入电子早餐界面
		/*
		function SubClick(subid)
		{		
				
			var strret;
			var strRoomNo;
			var strOldState;
			
			strRoomNo="<?php echo $roomno;?>";
			//strOldState"<?php echo $RoomOldState;?>";
			
			
				var urlroom='barcodescore.php?rmid=' + strRoomNo;
				window.location.href=urlroom;
			
		};
		*/
		
	</script>
	
</section>

</body>

</html>
