<?php
	session_start();
	require_once("db/db.php");	
	require_once("common/common.php");
	require_once("..\Wx.Config.php");
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	//判断是否登录系统		
	if($_SESSION['main_wx_userlogined']!="1" | $_SESSION['main_wx_userno']=="")
	{
		//没有登录开始启动登录
		header('location:..\loginwx.php?rset=0');
		exit;
	}
	
	$strRevChainNo=$_REQUEST["chainno"];
	if(strlen($strRevChainNo)>0)
	{
		$sql=sprintf("SELECT Chain_No,Chain_Name FROM Chain_Infor WHERE Chain_No='%s'",$strRevChainNo);				
		$result = querySql($sql);		
		if($row = fetch_array($result))
		{
			$strNewChainNo= $row['Chain_No'];
			$strNewChainName= $row['Chain_Name'];
		}
		freeResult($result);
		
		$_SESSION["ChainNo"]=$strNewChainNo;
		$_SESSION["ChainName"]=$strNewChainName;
			
	}
	
	$chainno=$_SESSION["ChainNo"];
	
?>
<!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">
	
	<Meta http-equiv="Page-Enter" Content="blendTrans(Duration=0.5)"> 
	<Meta http-equiv="Page-Exit" Content="blendTrans(Duration=0.5)">
	
	<title><?php echo $_SESSION['ChainName']?></title>
	
	<link rel="stylesheet" href="css/mycss.css"> 
	
	<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>
</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
		$colKF="#F0ECDF";	//空房数
		$colZK="#66FF00";	//住客
		$colZD="#CCCC33";	//钟点
		$colZZ="#33FF00";	//住客脏房0099FF
		$colZF="#999999";	//脏房
		$colWX="#FF3737";	//维修
		$colYD="#0099FF";	//预订
		$colAL="#99FFFF";	//所有			
		
		$colKFTxt="#000";	//空房数
		$colZKTxt="#000";	//住客
		$colZDTxt="#000";	//钟点
		$colZZTxt="#000";	//住客脏房0099FF
		$colZFTxt="#000";	//脏房
		$colWXTxt="#000";	//维修
		$colYDTxt="#000";	//预订
		$colALTxt="#000";	//所有	
		
		$colMF='#33FF00';	//免费房
		$colMFTxt='#000';	//免费房
		$colSF='#D7E8F3';	//锁房
		$colSFTxt='#000';	//锁房
		
		//获取数据库中设置的状态颜色**************************************//
		$strSelSubStateName='';
		$strSelSubStateColor='';
		$strSelSubTextColor='';
		$lngSelSubColor=0;
		
		$sql=sprintf("SELECT State_Name,State_Color,TextColor FROM TR_Room_State ");

		$result = querySql($sql);		
		while($row = fetch_array($result))
		{
			$strSelSubStateName= $row['State_Name'];
			//背景色
			$lngSelSubColor= $row['State_Color'];
			$hexadecimalNumber = dechex($lngSelSubColor);
			$strSelSubStateColor="#".substr($hexadecimalNumber, -6);
			//字体颜色
			$lngSelSubColor= $row['TextColor'];
			$hexadecimalNumber = dechex($lngSelSubColor);
			$strSelSubTextColor="#".substr($hexadecimalNumber, -6);
		
			switch($strSelSubStateName)
			{
				case '空房':
					$colKF=$strSelSubStateColor;	//空房
					$colKFTxt=$strSelSubTextColor;	//空房
					break;
				case '在住房':
					$colZK=$strSelSubStateColor;	//住客
					$colZZ=$strSelSubStateColor;	//住客脏房
					
					$colZKTxt=$strSelSubTextColor;	//住客
					$colZZTxt=$strSelSubTextColor;	//住客脏房
					break;
				case '钟点房':
					$colZD=$strSelSubStateColor;	//钟点
					$colZDTxt=$strSelSubTextColor;	//钟点
					break;
				case '退客房':
					$colZF=$strSelSubStateColor;	//脏房
					$colZFTxt=$strSelSubTextColor;	//脏房
					break;
				case '维修房':
					$colWX=$strSelSubStateColor;	//维修
					$colWXTxt=$strSelSubTextColor;	//维修
					break;
				case '预订房':
					$colYD=$strSelSubStateColor;	//预订
					$colYDTxt=$strSelSubTextColor;	//预订
					break;
				case '免费房':
					$colMF=$strSelSubStateColor;	//免费房
					$colMFTxt=$strSelSubTextColor;	//免费房
					break;
				case '锁房':
					$colSF=$strSelSubStateColor;	//锁房
					$colSFTxt=$strSelSubTextColor;	//锁房
					break;					
					
					
			}
		}
		freeResult($result);
?>


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

<section data-role="page" id="reportsitedA">		
	
	<header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;">
        <table width="100%" height="45" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo WxMainConfig::colHeadBkColor;?>">
		   	<tr>
				<td height="45" width="30" align="center"></td>
				<td height="45" align="center" valign="middle">
	                <span id="MsgTxt" style="color:<?php echo WxMainConfig::colHeadTextColor;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:19px;text-shadow:none;">未分配房间信息</span>
               	</td>
				<td height="45" width="30" valign="middle"></td>
		  	</tr>
		</table>
	</header>
		
	<article data-role="none">
		<table width="100%"  border="1" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
			
            <?php
            	
				$strselroomno='';
				$introomstate=0;
				$strroomstate='';
				$strroomtype='';
				$intDirty=0;
				$colRoomBK='#F0ECDF';
				$colRoomTxt='#000';
				//****************************************
				$intRowIndex=0;
				$strRoomNo1='';
				$strRoomNo2='';
				$strRoomNo3='';
				$strRoomNo4='';
				$strRoomNo5='';
				$strRoomState1='';
				$strRoomState2='';
				$strRoomState3='';
				$strRoomState4='';
				$strRoomState5='';
				$strRoomType1='';
				$strRoomType2='';
				$strRoomType3='';
				$strRoomType4='';
				$strRoomType5='';
				
				$colRoomBK1='#F0ECDF';
				$colRoomTxt1='#000';
				
				$colRoomBK2='#F0ECDF';
				$colRoomTxt2='#000';
				
				$colRoomBK3='#F0ECDF';
				$colRoomTxt3='#000';
				
				$colRoomBK4='#F0ECDF';
				$colRoomTxt4='#000';
				
				$colRoomBK5='#F0ECDF';
				$colRoomTxt5='#000';
				
				$isdirtyflag1=0;
				$isdirtyflag2=0;
				$isdirtyflag3=0;
				$isdirtyflag4=0;
				$isdirtyflag5=0;
				//****************************************
								
				$sql=sprintf("SELECT a.ListNo,a.Room_No,a.Room_State,b.Room_Type,a.Dirty_Flag FROM TR_Room_Inform a,TR_Room_Type b
								WHERE a.TypeListNo=b.ListNo And b.Chain_No='%s' And (UserNameNow='' OR UserNameNow IS NULL) Order By a.Room_No ASC",$chainno);

				$result = querySql($sql);
											
				while($row = fetch_array($result))
				{
					$strselroomno=$row['Room_No'];
					$strroomtype=$row['Room_Type'];
					$introomstate=$row['Room_State'];
			
					$intDirty= $row['Dirty_Flag'];
			
					$intRowIndex = $intRowIndex + 1;
					
					$strroomstate='';
									
					//生成状态颜色
					switch($introomstate)
					{
						case 0:
							$colRoomBK=$colKF;	//空房数
							$colRoomTxt=$colKFTxt;
							$strroomstate="空净房";
							break;
						case 5:
							$colRoomBK=$colZF;	//脏房
							$colRoomTxt=$colZFTxt;
							$strroomstate="退客房";
							break;
						case 6:
							$colRoomBK=$colWX;	//维修
							$colRoomTxt=$colWXTxt;
							$strroomstate="维修房";
							break;
						case 1:
							$colRoomBK=$colYD;	//预订
							$colRoomTxt=$colYDTxt;
							$strroomstate="预订房";
							break;
						case 2:
							if($intDirty==1)
							{
								$colRoomBK=$colZZ;	//住客脏房
								$colRoomTxt=$colZZTxt;
								$strroomstate="住脏房";
							}
							else
							{
								$colRoomBK=$colZK;	//住客
								$colRoomTxt=$colZKTxt;
								$strroomstate="住客房";
							}
							break;
						case 3:
							$colRoomBK=$colZD;	//钟点	
							$colRoomTxt=$colZDTxt;
							$strroomstate="钟点房";
							break;
						default:
							$colRoomBK="#D7E8F3";
							$colRoomTxt='#000';
							if($introomstate==5)
							{
								$strroomstate="免费房";
								$colRoomBK=$colMF;
								$colRoomTxt=$colMFTxt;
							}
							if($introomstate==7)
							{
								$strroomstate="锁房";
								$colRoomBK=$colSF;
								$colRoomTxt=$colSFTxt;
							}
							else
							{
								$strroomstate="其他";
							}
							break;
					}
					

					//开始分配到指定房号
					switch($intRowIndex)
					{
						case 1:
							$strRoomNo1 = $strselroomno;
							$strRoomState1 = $strroomstate;
							$strRoomType1 = $strroomtype;
							$colRoomBK1=$colRoomBK;
							$colRoomTxt1=$colRoomTxt;
							$isdirtyflag1=$intDirty;
							break;
						case 2:
							$strRoomNo2 = $strselroomno;
							$strRoomState2 = $strroomstate;
							$strRoomType2 = $strroomtype;
							$colRoomBK2=$colRoomBK;
							$colRoomTxt2=$colRoomTxt;
							$isdirtyflag2=$intDirty;
							break;
						case 3:
							$strRoomNo3 = $strselroomno;
							$strRoomState3 = $strroomstate;
							$strRoomType3 = $strroomtype;
							$colRoomBK3=$colRoomBK;
							$colRoomTxt3=$colRoomTxt;
							$isdirtyflag3=$intDirty;
							break;
						case 4:
							$strRoomNo4 = $strselroomno;
							$strRoomState4 = $strroomstate;
							$strRoomType4 = $strroomtype;
							$colRoomBK4=$colRoomBK;
							$colRoomTxt4=$colRoomTxt;
							$isdirtyflag4=$intDirty;
							break;
						case 5:
							$strRoomNo5 = $strselroomno;
							$strRoomState5 = $strroomstate;
							$strRoomType5 = $strroomtype;
							$colRoomBK5=$colRoomBK;
							$colRoomTxt5=$colRoomTxt;
							$isdirtyflag5=$intDirty;
							break;
							
					}
					
					
					if($intRowIndex>4)
					{
						//如果满足一行了						
						//开始显示数据
			?>
			
			
			<tr height="50" style="border-radius:5px;" >					
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK1;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt1;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo1;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt1;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType1;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt1;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState1;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK2;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt2;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo2;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt2;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType2;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt2;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState2;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK3;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt3;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo3;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt3;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType3;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt3;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState3;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK4;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt4;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo4;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt4;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType4;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt4;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState4;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK5;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt5;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo5;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt5;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType5;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt5;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState5;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
							
				
			<?php
						//开始清空行缓存
						$intRowIndex=0;
						$strRoomNo1='';
						$strRoomNo2='';
						$strRoomNo3='';
						$strRoomNo4='';
						$strRoomNo5='';
						$strRoomState1='';
						$strRoomState2='';
						$strRoomState3='';
						$strRoomState4='';
						$strRoomState5='';
						$strRoomType1='';
						$strRoomType2='';
						$strRoomType3='';
						$strRoomType4='';
						$strRoomType5='';
					}
					
			?>
			
            
            
            <?php 
				}
				
				//显示剩余的部分
			?>
			
			<tr height="50" style="border-radius:5px;" >
				<?php if (strlen($strRoomNo1)>0) { ?>
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK1;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt1;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo1;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt1;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType1;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt1;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState1;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				<?php } else {?>
				<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
				<?php } ?>
				
				
				<?php if (strlen($strRoomNo2)>0) { ?>
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK2;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt2;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo2;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt2;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType2;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt2;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState2;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				<?php } else {?>
				<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
				<?php } ?>
				
				
				<?php if (strlen($strRoomNo3)>0) { ?>
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK3;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt3;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo3;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt3;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType3;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt3;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState3;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				<?php } else {?>
				<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
				<?php } ?>
				
				
				<?php if (strlen($strRoomNo4)>0) { ?>
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK4;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt4;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo4;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt4;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType4;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt4;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState4;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				<?php } else {?>
				<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
				<?php } ?>
				
				
				<?php if (strlen($strRoomNo5)>0) { ?>
				<td height="58" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="<?php echo $colRoomBK5;?>" align="center" valign="top">
					<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:<?php echo $colZF;?>;border-radius:0px;border-top-right-radius:5px;border-top-left-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:14px;"><span style="color: <?php echo $colRoomTxt5;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;text-shadow:none;"><?php echo $strRoomNo5;?></span></div>
								<div style="width:100%;height:14px;"><span style="color: <?php echo $colRoomTxt5;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:9px;text-shadow:none;"><?php echo $strRoomType5;?></span> </div>
								<div style="width:100%;height:10px;"><span style="color: <?php echo $colRoomTxt5;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:10px;text-shadow:none;"><?php echo $strRoomState5;?></span> </div>
							</td>
						</tr>
					</table>
				</td>
				<?php } else {?>
				<td height="30" width="17%" style="border-radius:5px;" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center" valign="top"> </td>
				<?php } ?>
			</tr>
			
			
				
			<?php
				//释放数据库
				freeResult($result);	
				//关闭数据库
				closeDb();	
			?>
			
			<tr><td height="10" colspan="3" bgcolor="#fff"></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="40" border="0" cellpadding="0" cellspacing="0">
			
			<tr height="42" valign="top">
				<td width="33%">
					<a class="ui-btn ui-icon-home ui-btn-icon-top" target="_parent" href="..\indexm.php?rset=0" style="width:93%;height:10px;margin:0px auto 0px auto;">
					<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">主页</span>
					</a>
				</td>
				
				<td width="33%">					
					<a class="ui-btn ui-icon-grid ui-btn-icon-top" target="_parent" href="fwmain.php" style="width:93%;height:10px;margin:0px auto 0px auto;text-shadow:none;">
					<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">已分房</span>
					</a>
				</td>
				<td width="34%">
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" target="_parent" href="#" style="width:93%;height:10px;margin:0px auto 0px auto;text-shadow:none;color:#666666;background-color:#F3F4EC;">
					<span style="color: #666666;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">未分房</span>
					</a>
				</td>
			</tr>
		</table>		
	</footer>
	
	
</section>




<script tyle="text/javascript"> 
		//处理点击事件进入相应的页面
		function gbClick(id)
		{ 
			switch (id)
			{
				case -1:	//返回
					parent.window.location.href='index.php';
					//window.location.href="repRoomView.php?roomstate=*";
					break;
				case 0:	//刷新
					//parent.window.location.href='index.php';
					window.location.href="repdaysited.php?datday1=" + $dp.$('dtp1').value;
					break;
			}
		}
			
	</script> 

</body>
</html>
