<?php
	session_start();
	require_once("db/db.php");	
	require_once("common/common.php");
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	//判断是否登录系统		
	if($_SESSION['main_wx_userlogined']!="1" | $_SESSION['main_wx_userno']=="")
	{
		//没有登录开始启动登录
		header('location:..\loginwx.php?rset=0');
		exit;
	}
	
	$selroomstate=$_REQUEST["roomstate"];
	if($selroomstate=="*" | $selroomstate=="")
	{
		$selroomstate=$_SESSION['roomstate'];
	}
	else
	{
		if($selroomstate=="ALL")
		{
			$selroomstate="";
			$_SESSION['roomstate']="";
		}
		else
		{
			$_SESSION['roomstate']=$selroomstate;
		}
	}
	//===========
	$selbkimg1="";
	$selbkimg2="";
	$selbkimg3="";
	$selbkimg4="";
	$selbkimg5="";
	$selbkimg6="";
	$selbkimg7="";
	$selbkimg8="";
	//状态:0空房,1预订房,2在住房,3钟点房,4自用房,5退客房,6维修房,7锁房(9为住客脏房)
	switch($selroomstate)
	{
		case "空净房":
			$selbkimg1="background='images/selfocus0.png'";
			break;
		case "在住房":
			$selbkimg2="background='images/selfocus0.png'";
			break;
		case "钟点房":
			$selbkimg3="background='images/selfocus0.png'";
			break;
		case "住客脏房":
			$selbkimg4="background='images/selfocus0.png'";
			break;
		case "退客房":
			$selbkimg5="background='images/selfocus0.png'";
			break;
		case "维修房":
			$selbkimg6="background='images/selfocus0.png'";
			break;
		case "预订房":
			$selbkimg7="background='images/selfocus0.png'";
			break;
		default:
			$selbkimg8="background='images/selfocus0.png'";
			break;
	}	
	
?>
<!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>
		
	<link rel="stylesheet" href="jsp4/jquery.mobile-1.4.3.min.css">
	<script src="jsp4/jquery.js"></script>
	<script src="jsp4/jquery.mobile-1.4.3.min.js"></script>
	
	<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>
</head>

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="pageroomview1">	
	<link rel="stylesheet" href="css/mycss.css">
	<script tyle="text/javascript"> 
		//处理点击事件进入相应的页面
		function gbClick(id)
		{ 
			switch (id)
			{
				case -1:	//返回
					parent.window.location.href='index.php';
					break;
				case 0:	//刷新
					window.location.href="repRoomView.php?roomstate=*";
					break;
				case 1:	//进入实时房态  空房 住客 钟点 住脏 脏房 维修 预订
					window.location.href="repRoomView.php?roomstate=空净房";
					break;
				case 2:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=在住房";
					break;
				case 3:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=钟点房";
					break;
				case 4:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=住客脏房";
					break;
				case 5:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=退客房";
					break;
				case 6:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=维修房";
					break;
				case 7:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=预订房";
					break;
				case 8:	//进入总台缴款记录表
					window.location.href="repRoomView.php?roomstate=ALL";
					break;
			}
		}
			
		function bgMouseIn(obj)
		{ 	//onmouseover,onmousemove
	　　	obj.bgColor=obj.bgColor==""?"#000000":""; 
		} 
		function bgMouseOut(obj)
		{ 	//onmouseover,onmousemove,onmouseout
	　　	obj.bgColor=obj.bgColor==""?"#000000":""; 
		} 
		function bgMouseDown(obj)
		{ 	//onmouseover,onmousemove,onmouseout
	　　	obj.bgColor=obj.bgColor==""?"#000000":""; 
		} 
		function bgMouseUp(obj)
		{ 	//onmouseover,onmousemove,onmouseout
	　　	obj.bgColor=obj.bgColor==""?"#ffffcc":""; 
		} 
		//<td onmouseover="bgMouseIn(this)" onmouseout="bgMouseOut(this)" onmousedown="bgMouseDown(this)" onmouseup="bgMouseUp(this)" onclick="gbClick(1)"></td> 
	</script>

	<?php
		$colKF="#F0ECDF";	//空房数
		$colZK="#66FF00";	//住客
		$colZD="#CCCC33";	//钟点
		$colZZ="#33FF00";	//住客脏房0099FF
		$colZF="#999999";	//脏房
		$colWX="#FF3737";	//维修
		$colYD="#0099FF";	//预订
		$colAL="#99FFFF";	//所有			
		
  		$rmCountKF=0;	//空房数
		$rmCountZK=0;	//住客
		$rmCountZD=0;	//钟点
		$rmCountZZ=0;	//住客脏房
		$rmCountZF=0;	//脏房
		$rmCountWX=0;	//维修
		$rmCountYD=0;	//预订
		$rmCountAL=0;	//所有
		$rmRate=0;		//出租率
		$intStateID=0;
		$strtemp="";
		$inttemp=0;
		
		$chainno=$_SESSION["ChainNo"];

		//开始去房间状态数量
		//状态:0空房,1预订房,2在住房,3钟点房,4自用房,5退客房,6维修房,7锁房(9为住客脏房)
		$sql=sprintf("SELECT a.Room_State,COUNT(Room_No)AS RoomCount FROM TR_Room_Inform a,TR_Room_Type b 
				WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' GROUP BY Room_State UNION 
				SELECT 9 AS Room_State,COUNT(a.Room_No)AS RoomCount FROM TR_Room_Inform a,TR_Room_Type b 
				WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' AND a.Room_State=2 AND a.Dirty_Flag=1",$chainno,$chainno);
				
		$result = querySql($sql);		
		while($row = fetch_array($result))
		{
			$intStateID= $row['Room_State'];
			$inttemp= $row['RoomCount'];
			switch($intStateID)
			{
				case 0:
					$rmCountKF=$rmCountKF + $inttemp;	//空房数
					break;
				case 5:
					$rmCountZF=$rmCountZF + $inttemp;	//脏房
					break;
				case 6:
					$rmCountWX=$rmCountWX + $inttemp;	//维修
					break;
				case 1:
					$rmCountYD=$rmCountYD + $inttemp;	//预订
					break;
				case 2:
					$rmCountZK=$rmCountZK + $inttemp;	//住客
					break;
				case 3:
					$rmCountZD=$rmCountZD + $inttemp;	//钟点				
					break;
				case 9:
					$rmCountZZ=$rmCountZZ + $inttemp;	//住客脏房
					$rmCountZK=$rmCountZK + $inttemp;	//住客
			}
			if($intStateID<>9)
				$rmCountAL=$rmCountAL + $inttemp;	//所有
		}
		$rmCountZK=$rmCountZK - $rmCountZZ;	//住客房中减去住客脏房
		//释放数据库
		freeResult($result);
		closeDb();
		
		if($rmCountAL>0)
		{
			$rmRate=round(100*($rmCountZK + $rmCountZD + $rmCountZZ)/$rmCountAL,2);		//出租率
		}
		else
		{
			$rmRate=0;
		}
	 ?>

	<header data-role="header" data-position="fixed" data-tap-toggle="false">
		<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td height="35" width="45" align="right">
					<a href="index.php" data-transition="flip" data-role="button" data-icon="carat-l" data-iconpos="notext" data-direction="reverse" rel="external"></a>
				</td>
				<td height="35" align="center"><?php echo $_SESSION['ChainName']?></td>
				<td height="35" width="45" align="left"><a href="#" data-role="button" data-icon="refresh" data-iconpos="notext" onclick="location.reload()"></td>
			</tr>
			
			<tr bgcolor="#FFFFFF">
				<td height="35" colspan="3">
					<table width="100%" height="90" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
						<tr>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colKF;?>" <?php echo $selbkimg1;?>align="center" onClick="gbClick(1)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">空房 <?php echo $rmCountKF; ?> 间</span></td>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colZK;?>" <?php echo $selbkimg2;?>align="center" onClick="gbClick(2)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">住客 <?php echo $rmCountZK; ?> 间</span></td>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colZD;?>" <?php echo $selbkimg3;?>align="center" onClick="gbClick(3)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">钟点 <?php echo $rmCountZD; ?> 间</span></td>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colZZ;?>" <?php echo $selbkimg4;?>align="center" onClick="gbClick(4)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">住脏 <?php echo $rmCountZZ; ?> 间</span></td>
						</tr>
						<tr>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colZF;?>" <?php echo $selbkimg5;?>align="center" onClick="gbClick(5)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">脏房 <?php echo $rmCountZF; ?> 间</span></td>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colWX;?>" <?php echo $selbkimg6;?>align="center" onClick="gbClick(6)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">维修 <?php echo $rmCountWX; ?> 间</span></td>
							<td width="25%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colYD;?>" <?php echo $selbkimg7;?>align="center" onClick="gbClick(7)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">预订 <?php echo $rmCountYD; ?> 间</span></td>
							<td width="25%" style="border-radius:5px;" bordercolor="#CCCCCC" bgcolor="<?php echo $colAL;?>" <?php echo $selbkimg8;?>align="center" onClick="gbClick(8)" class="STYLEM2"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:13px;text-shadow:none;">全部 <?php echo $rmCountAL; ?> 间</span></td>
						</tr>
					</table>		
				</td>
			</tr>
			
			<tr bgcolor="#FFFFFF"><td height="1" colspan="3"></td></tr>
		</table>		
	</header>
	
	<article data-role="none" data-shadow="none">		 
		<table width="100%" height="2" border="0" cellpadding="0" cellspacing="0" >
			<tr>
				<td  height="2" bgcolor="#FFFFFF" valign="top" align="center"></td>
			</tr>
			<tr>
				<td valign="top" align="center">
					<table width="100%" height="20" border="1" bordercolor="#FFFFFF" cellspacing="0" cellpadding="0">
					<?php
						//显示一行的6个房号
						$roomno1="";
						$roomno2="";
						$roomno3="";
						$roomno4="";
						$roomno5="";
						
						$isdirtyflag1=0;
						$isdirtyflag2=0;
						$isdirtyflag3=0;
						$isdirtyflag4=0;
						$isdirtyflag5=0;
						
						$statetext1="";
						$statetext2="";
						$statetext3="";
						$statetext4="";
						$statetext5="";
						$statetemp="";
						
						$statename1="#FFFFFF";
						$statename2="#FFFFFF";
						$statename3="#FFFFFF";
						$statename4="#FFFFFF";
						$statename5="#FFFFFF";
						
						$strroomurl="*";
						$strroomurl1="*";
						$strroomurl2="*";
						$strroomurl3="*";
						$strroomurl4="*";
						$strroomurl5="*";
												
						$strtemp="#FFFFFF";
						$intPos=0;
												
						$chainno=$_SESSION["ChainNo"];
						//开始取房间状态数量
						if($selroomstate=="")
						{
							$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' ORDER BY Room_No ASC",$chainno);
						}
						else
						{
							//状态:0空房,1预订房,2在住房,3钟点房,4自用房,5退客房,6维修房,7锁房(9为住客脏房)
							$intselroomstate=20;
							switch($selroomstate)
							{
								case "空净房":
									$intselroomstate=0;	//空房数
									break;
								case "退客房":
									$intselroomstate=5;	//脏房
									break;
								case "维修房":
									$intselroomstate=6;	//维修
									break;
								case "预订房":
									$intselroomstate=1;	//预订
									break;
								case "在住房":
									$intselroomstate=2;	//住客
									break;
								case "钟点房":
									$intselroomstate=3;	//钟点				
									break;
								case "住客脏房":
									$intselroomstate=9;	//住客脏房
									break;
								default:
									$intselroomstate=20;
									break;
							}
							
							if($intselroomstate==20)
								$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' ORDER BY Room_No ASC",$chainno);
							elseif($intselroomstate==9)
								$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' AND a.Room_State=2 AND a.Dirty_Flag=1 ORDER BY Room_No ASC",$chainno);
							else
								$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' AND a.Room_State=%d ORDER BY Room_No ASC",$chainno,$intselroomstate);
						}
						//状态:0空房,1预订房,2在住房,3钟点房,4自用房,5退客房,6维修房,7锁房(9为住客脏房)
						
						$result = querySql($sql);		
						while($row = fetch_array($result))
						{
							$inttemp1= $row['Room_State'];
							$strtemp2=$row['Room_No'];
							$intDirty= $row['Dirty_Flag'];
							$strroomurl="*";
							//生成状态颜色
							switch($inttemp1)
							{
								case 0:
									$strtemp=$colKF;	//空房数
									$statetemp="空净房";
									break;
								case 5:
									$strtemp=$colZF;	//脏房
									$statetemp="退客房";
									break;
								case 6:
									$strtemp=$colWX;	//维修
									$statetemp="维修房";
									break;
								case 1:
									$strtemp=$colYD;	//预订
									$statetemp="预订房";
									break;
								case 2:
									if($intDirty==1)
									{
										$strtemp=$colZZ;	//住客脏房
										$statetemp="住脏房";
									}
									else
									{
										$strtemp=$colZK;	//住客
										$statetemp="住客房";
									}
									$strroomurl=$strtemp2;
									break;
								case 3:
									$strtemp=$colZD;	//钟点				
									$statetemp="钟点房";
									$strroomurl=$strtemp2;
									break;
								default:
									$strtemp="#D7E8F3";
									if($inttemp1==5)
									{
										$statetemp="免费房";
										$strroomurl=$strtemp2;
									}
									if($inttemp1==7)
										$statetemp="锁房";
									else
										$statetemp="其他";
									break;
							}
								
							$intPos=$intPos+1;
							
							if($intPos==5)
							{
								//满足一行显示了
								$roomno5=$strtemp2;
								//生成状态颜色
								$statename5=$strtemp;
								$statetext5=$statetemp;
								$strroomurl5=$strroomurl;
								
								$isdirtyflag5=$intDirty;
					?>
					<tr height="50" style="border-radius:5px;" >						
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename1;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl1;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag1==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno1;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext1;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename2;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl2;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag2==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno2;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext2;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename3;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl3;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag3==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno3;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext3;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename4;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl4;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag4==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno4;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext4;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename5;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl5;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag5==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno5;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext5;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
					</tr>
					<?php
								//归为玲一行
								$roomno1="";
								$roomno2="";
								$roomno3="";
								$roomno4="";
								$roomno5="";
								
								$statetemp1="";
								$statetemp2="";
								$statetemp3="";
								$statetemp4="";
								$statetemp5="";
																
								$statename1="#FFFFFF";
								$statename2="#FFFFFF";
								$statename3="#FFFFFF";
								$statename4="#FFFFFF";
								$statename5="#FFFFFF";
								
								$strroomurl1="*";
								$strroomurl2="*";
								$strroomurl3="*";
								$strroomurl4="*";
								$strroomurl5="*";
								
								$intPos=0;
							}
							else
							{
								switch($intPos)
								{
									case 1:
										$roomno1=$strtemp2;
										$statename1=$strtemp;
										$statetext1=$statetemp;
										$isdirtyflag1=$intDirty;
										$strroomurl1=$strroomurl;
										break;
									case 2:
										$roomno2=$strtemp2;
										$statename2=$strtemp;
										$statetext2=$statetemp;
										$isdirtyflag2=$intDirty;
										$strroomurl2=$strroomurl;
										break;
									case 3:
										$roomno3=$strtemp2;
										$statename3=$strtemp;
										$statetext3=$statetemp;
										$isdirtyflag3=$intDirty;
										$strroomurl3=$strroomurl;
										break;
									case 4:
										$roomno4=$strtemp2;
										$statename4=$strtemp;
										$statetext4=$statetemp;
										$isdirtyflag4=$intDirty;
										$strroomurl4=$strroomurl;
										break;
								}
								
							}
						}
						//最后一行显示进行判断
						//=============================================================================================================================
						if($intPos>0)
						{
					?>
					<tr>
						<td height="48" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename1;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl1;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag1==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno1;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext1;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
					<?php
						}
						//=============================================================================================================================
						if($intPos>1)
						{
					?>
						<td height="48" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename2;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl2;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag2==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno2;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext2;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
					<?php
						}
						else
						{
					?>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
					<?php
						}
						//=============================================================================================================================
						if($intPos>2)
						{
					?>
						<td height="48" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename3;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl3;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag3==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno3;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext3;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
					<?php
						}
						else
						{
					?>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
					<?php
						}
						//=============================================================================================================================
						if($intPos>3)
						{
					?>
						<td height="48" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename4;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl4;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag4==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno4;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext4;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
					<?php
						}
						else
						{
					?>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
					<?php
						}
						//=============================================================================================================================
						if($intPos>4)
						{
					?>
						<td height="48" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $statename5;?>" align="center" valign="top">
							
								<div onClick="bmtShowRoomClick('<?php echo $strroomurl5;?>')" style="width:100%;height:100%">						
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr><td width="100%" height="6"> 
											<?php	if($isdirtyflag5==1) {?>
												<div style="width:100%;height:6px;background:#999;border-radius:5px;"></div>
											<?php } else {?>
												<div style="width:100%;height:6px;"></div>
											<?php } ?>
										</td></tr>
										<tr><td width="100%" align="center" valign="top">
											<div style="width:100%;height:15px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $roomno5;?></span></div>
											<div style="width:100%;height:10px;"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $statetext5;?></span> </div>
										</td></tr>
									</table>
								</div>
							
						</td>
					<?php
						}
						else
						{
					?>
						<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
					<?php
						}
						//=============================================================================================================================
						if($intPos>0)
						{
					?>
					<tr>
					<?php
						}
						//=============================================================================================================================
						//释放数据库
						freeResult($result);
						closeDb();
					?>
				</table>    
			</td>
		  </tr>
		</table>
	</article>
	
	<footer data-role="footer" data-position="fixed" data-tap-toggle="false" style="border-top:0px solid #F2E2E2;border-bottom:0px solid #F2E2E2;border-left:1px solid #F2E2E2;border-right:1px solid #F2E2E2;">
		<table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
			<tr height="100%" valign="top">
				<td width="50%">
					<a class="ui-btn ui-icon-grid ui-btn-icon-top" target="_parent" href="#" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666;background-color:#F3F4EC;">实时房态</a>
				</td>
				
				<td width="50%">					
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" target="_parent" href="#pageroomview2" style="width:100%;height:10px;margin:0px auto 0px auto;">房源预报</a>
				</td>
				
			</tr>
		</table>						
	</footer>
		
	 <script type="text/javascript">
				
		//相应提交按钮事件处理部分
		function bmtShowRoomClick(selroomno)
		{
			//得到当前选择的房间信息
			var selroomid=selroomno;
			if(selroomid=="*")
			{
				return;
			}
			//开始启动客房信息的界面
			var urlroom='roomorder.php?rmid=' + selroomid;
			window.location.href=urlroom;
							
		}
	</script>
</section>

<section data-role="page" id="pageroomview2">		
	<link rel="stylesheet" href="css/mycss.css"> 
	
  	<header data-role="header" data-position="fixed">
		<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
		   <tr>
			<td height="35" width="45" align="right">
				<a href="index.php" data-transition="flip" data-role="button" data-icon="carat-l" data-iconpos="notext" data-direction="reverse" rel="external"></a>
			</td>
			<td height="35" align="center">周房源预报(可用房数)</td>
			<td height="35" width="45" align="left"><a href="#" data-role="button" data-icon="refresh" data-iconpos="notext" onclick="location.reload()"></td>
		  </tr>
		</table>
	</header>
	
	<article data-role="none" style="background-color:#fff">
		<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr>
				<td height="30" width="1"></td>
				<td height="30">
					<table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8E1C4">
					<?php			
						function GetWeekDay($weekday)
						{
							$strRet="";
							switch($weekday)
							{
								case 1:
									$strRet="周日";
									break;
								case 2:
									$strRet="周一";
									break;
								case 3:
									$strRet="周二";
									break;
								case 4:
									$strRet="周三";
									break;
								case 5:
									$strRet="周四";
									break;
								case 6:
									$strRet="周五";
									break;
								case 7:
									$strRet="周六";
									break;
							}
							return $strRet;
						}
						
						$chainno=$_SESSION["ChainNo"];
						$OrderList=0;
						
						$intFixCountSum=0;
						$intRCountSum1=0;
						$intRCountSum2=0;
						$intRCountSum3=0;
						$intRCountSum4=0;
						$intRCountSum5=0;
						$intRCountSum6=0;
						
						//1.得到查询日期和周期
						$sql=sprintf("SELECT CONVERT(varchar(10),DATEADD(DAY,1,GETDATE()),120)AS SDay1,CONVERT(varchar(10),DATEADD(DAY,2,GETDATE()),120)AS SDay2,
									CONVERT(varchar(10),DATEADD(DAY,3,GETDATE()),120)AS SDay3,CONVERT(varchar(10),DATEADD(DAY,4,GETDATE()),120)AS SDay4,
									CONVERT(varchar(10),DATEADD(DAY,5,GETDATE()),120)AS SDay5,CONVERT(varchar(10),DATEADD(DAY,6,GETDATE()),120)AS SDay6,
									CONVERT(varchar(10),DATEADD(DAY,7,GETDATE()),120)AS SDay7,
									DATEPART(WEEKDAY,DATEADD(DAY,1,GETDATE()))AS WDay1,DATEPART(WEEKDAY,DATEADD(DAY,2,GETDATE()))AS WDay2,
									DATEPART(WEEKDAY,DATEADD(DAY,3,GETDATE()))AS WDay3,DATEPART(WEEKDAY,DATEADD(DAY,4,GETDATE()))AS WDay4,
									DATEPART(WEEKDAY,DATEADD(DAY,5,GETDATE()))AS WDay5,DATEPART(WEEKDAY,DATEADD(DAY,6,GETDATE()))AS WDay6");
						$result = querySql($sql);
						$row = fetch_array($result);
						$strDay1=$row['SDay1'];
						$strDay2=$row['SDay2'];
						$strDay3=$row['SDay3'];
						$strDay4=$row['SDay4'];
						$strDay5=$row['SDay5'];
						$strDay6=$row['SDay6'];
						$strDay7=$row['SDay7'];
						
						$intTemp=$row['WDay1'];
						$strWeek1=GetWeekDay($intTemp);
						$intTemp=$row['WDay2'];
						$strWeek2=GetWeekDay($intTemp);
						$intTemp=$row['WDay3'];
						$strWeek3=GetWeekDay($intTemp);
						$intTemp=$row['WDay4'];
						$strWeek4=GetWeekDay($intTemp);
						$intTemp=$row['WDay5'];
						$strWeek5=GetWeekDay($intTemp);
						$intTemp=$row['WDay6'];
						$strWeek6=GetWeekDay($intTemp);
						
						freeResult($result);
						//closeDb();
						
						$strRoomType="";
						$fltRoomPrice=0;
						$intFixCount=0;
						$intRCount1=0;
						$intRCount2=0;
						$intRCount3=0;
						$intRCount4=0;
						$intRCount5=0;
						$intRCount6=0;
						//开始去房间状态数量
						$sql=sprintf("SELECT Room_Type,SUM(RoomPrice)AS RoomPrice,SUM(FixCount)AS FixCount,SUM(RCount1)AS RCount1,SUM(RCount2)AS RCount2,SUM(RCount3)AS RCount3,
									SUM(RCount4)AS RCount4,SUM(RCount5)AS RCount5,SUM(RCount6)AS RCount6 FROM(
							SELECT b.Room_Type,b.Room_PriceS AS RoomPrice,Count(a.ListNo)AS FixCount,0 AS RCount1,0 AS RCount2,0 AS RCount3,0 AS RCount4,0 AS RCount5,0 AS RCount6 FROM TR_Room_Inform a,TR_Room_Type b 
							WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' GROUP BY b.Room_Type,b.Room_PriceS
							UNION SELECT Room_Type,0 AS RoomPrice,0 AS FixCount,RoomCount AS RCount1,0 AS RCount2,0 AS RCount3,0 AS RCount4,0 AS RCount5,0 AS RCount6 FROM dbo.TRF_RoomTypeFreeCount('%s','%s','%s')
							UNION SELECT Room_Type,0 AS RoomPrice,0 AS FixCount,0 AS RCount1,RoomCount AS RCount2,0 AS RCount3,0 AS RCount4,0 AS RCount5,0 AS RCount6 FROM dbo.TRF_RoomTypeFreeCount('%s','%s','%s')
							UNION SELECT Room_Type,0 AS RoomPrice,0 AS FixCount,0 AS RCount1,0 AS RCount2,RoomCount AS RCount3,0 AS RCount4,0 AS RCount5,0 AS RCount6 FROM dbo.TRF_RoomTypeFreeCount('%s','%s','%s')
							UNION SELECT Room_Type,0 AS RoomPrice,0 AS FixCount,0 AS RCount1,0 AS RCount2,0 AS RCount3,RoomCount AS RCount4,0 AS RCount5,0 AS RCount6 FROM dbo.TRF_RoomTypeFreeCount('%s','%s','%s')
							UNION SELECT Room_Type,0 AS RoomPrice,0 AS FixCount,0 AS RCount1,0 AS RCount2,0 AS RCount3,0 AS RCount4,RoomCount AS RCount5,0 AS RCount6 FROM dbo.TRF_RoomTypeFreeCount('%s','%s','%s')
							UNION SELECT Room_Type,0 AS RoomPrice,0 AS FixCount,0 AS RCount1,0 AS RCount2,0 AS RCount3,0 AS RCount4,0 AS RCount5,RoomCount AS RCount6 FROM dbo.TRF_RoomTypeFreeCount('%s','%s','%s')
							)t GROUP BY Room_Type ORDER BY Room_Type ASC",$chainno,$chainno,$strDay1,$strDay2,$chainno,$strDay2,$strDay3,$chainno,$strDay3,$strDay4,$chainno,$strDay4,$strDay5,$chainno,$strDay5,$strDay6,$chainno,$strDay6,$strDay7);
					
						$result = querySql($sql);		
						while($row = fetch_array($result))
						{
							//得到每一条的记录信息	
							$OrderList=$OrderList+1;
							
							$strRoomType=$row['Room_Type'];
							$fltRoomPrice=$row['RoomPrice'];
							$intFixCount=$row['FixCount'];
							$intRCount1=$row['RCount1'];
							$intRCount2=$row['RCount2'];
							$intRCount3=$row['RCount3'];
							$intRCount4=$row['RCount4'];
							$intRCount5=$row['RCount5'];
							$intRCount6=$row['RCount6'];
							
							$intFixCountSum=$intFixCountSum + $intFixCount;
							$intRCountSum1=$intRCountSum1+$intRCount1;
							$intRCountSum2=$intRCountSum1+$intRCount2;
							$intRCountSum3=$intRCountSum1+$intRCount3;
							$intRCountSum4=$intRCountSum1+$intRCount4;
							$intRCountSum5=$intRCountSum1+$intRCount5;
							$intRCountSum6=$intRCountSum1+$intRCount6;
							//以下开始显示数据							
					?>
					
						
							<tr>
								<td width="100%" height="20">
									<table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8E1C4" style="border-top:1px solid #E0E0E0">
										<tr>
											<td align="left">
											<span id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;">&nbsp;<?php echo $OrderList;?>. <?php echo $strRoomType;?></span>
											</td>
											<td width="90" align="left">
												<span id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;">房数: <?php echo $intFixCount;?></span>
											</td>
											<td width="90" align="left">
												<span id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;">房价: <?php echo $fltRoomPrice;?></span>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							
							
							<tr>
								<td width="100%" height="20">
									<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0" bgColor="#FEEEEE">
										<tr class="STYLEM2">
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;<?php echo substr($strDay1,5,5);?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo substr($strDay2,5,5);?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo substr($strDay3,5,5);?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo substr($strDay4,5,5);?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo substr($strDay5,5,5);?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo substr($strDay6,5,5);?></span></td>
											<td></td>
										</tr>
										<tr class="STYLEM2">
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;<?php echo $strWeek1;?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $strWeek2;?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $strWeek3;?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $strWeek4;?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $strWeek5;?></span></td>
											<td height="16" width="75" align="center"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $strWeek6;?></span></td>
											<td></td>
										</tr>
										<tr class="STYLEM1" bgColor="#FFFFFF">
											<td width="75" align="center">&nbsp;<?php echo $intRCount1;?></td>
											<td width="75" align="center"><?php echo $intRCount2;?></td>
											<td width="75" align="center"><?php echo $intRCount3;?></td>
											<td width="75" align="center"><?php echo $intRCount4;?></td>
											<td width="75" align="center"><?php echo $intRCount5;?></td>
											<td width="75" align="center"><?php echo $intRCount6;?></td>
											<td></td>
										</tr>
									</table>
								</td>
							</tr>
							
							
					<?php
						}
						//释放数据库
						freeResult($result);
						closeDb();
					?>
							<tr>
								<td width="100%" height="20">
									<table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8E1C4" style="border-top:1px solid #E0E0E0">
										<tr>
											<td align="left">
											<span id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;">&nbsp;&nbsp;合计</span>
											</td>
											<td width="80" align="left">
												<span id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;">房数: <?php echo $intFixCountSum;?></span>
											</td>
											<td width="85" align="left">
												<span id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"></span>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							
							
							<tr>
								<td width="100%" height="20">
									<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0" bgColor="#FEEEEE">
										<tr class="STYLEM2">
											<td height="16" width="75" align="center">&nbsp;<?php echo substr($strDay1,5,5);?></td>
											<td height="16" width="75" align="center"><?php echo substr($strDay2,5,5);?></td>
											<td height="16" width="75" align="center"><?php echo substr($strDay3,5,5);?></td>
											<td height="16" width="75" align="center"><?php echo substr($strDay4,5,5);?></td>
											<td height="16" width="75" align="center"><?php echo substr($strDay5,5,5);?></td>
											<td height="16" width="75" align="center"><?php echo substr($strDay6,5,5);?></td>
											<td></td>
										</tr>
										<tr class="STYLEM2">
											<td height="16" width="75" align="center">&nbsp;<?php echo $strWeek1;?></td>
											<td height="16" width="75" align="center"><?php echo $strWeek2;?></td>
											<td height="16" width="75" align="center"><?php echo $strWeek3;?></td>
											<td height="16" width="75" align="center"><?php echo $strWeek4;?></td>
											<td height="16" width="75" align="center"><?php echo $strWeek5;?></td>
											<td height="16" width="75" align="center"><?php echo $strWeek6;?></td>
											<td></td>
										</tr>
										<tr class="STYLEM1" bgColor="#FFFFFF">
											<td width="75" align="center">&nbsp;<?php echo $intRCountSum1;?></td>
											<td width="75" align="center"><?php echo $intRCountSum2;?></td>
											<td width="75" align="center"><?php echo $intRCountSum3;?></td>
											<td width="75" align="center"><?php echo $intRCountSum4;?></td>
											<td width="75" align="center"><?php echo $intRCountSum5;?></td>
											<td width="75" align="center"><?php echo $intRCountSum6;?></td>
											<td></td>
										</tr>
									</table>
								</td>
							</tr>
					
					
						</table>
					
				</td>
				<td height="30" width="1"></td>
			</tr>
		</table>
		
	</article>
	
	<footer data-role="footer" data-position="fixed" data-tap-toggle="false" style="border-top:0px solid #F2E2E2;border-bottom:0px solid #F2E2E2;border-left:1px solid #F2E2E2;border-right:1px solid #F2E2E2;">
		<table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
			<tr height="100%" valign="top">
				<td width="50%">					
					<a class="ui-btn ui-icon-grid ui-btn-icon-top" target="_parent" href="#pageroomview1" style="width:100%;height:10px;margin:0px auto 0px auto;">实时房态</a>
				</td>
				
				<td width="50%">					
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" target="_parent" href="#" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666;background-color:#F3F4EC;">房源预报</a>
				</td>
				
			</tr>
		</table>						
	</footer>
	
	
</section>
</body>
</htlm>


