<?php
	session_start();
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	
	$intFristLoadPage=$_REQUEST['flpid'];
	
	//判断是否登录系统
	if($_SESSION['main_wx_userlogined']!="1" | $_SESSION['main_wx_userno']=="")
	{
		//没有登录开始启动登录
		header('location:..\loginwx.php?rset=0');
		exit;
	}
	
	require_once("db/db.php");	
	require_once("common/common.php");
		
	$userno=trim($_SESSION['main_wx_userno']);
	
	//加载登陆用户的资料信息
	if($intFristLoadPage>0)
	{
		$_SESSION["main_defusernoflagfw"]="0";
		$_SESSION["main_canclearroomflag"]="0";
	
	
		$_SESSION['ChainCountfw'] ="1";
		$_SESSION['ChainNofw'] = "";  
		$_SESSION['ChainNamefw'] = "";  
		$_SESSION['usernofw'] = $userno;  
		$_SESSION['usernamefw']= $userno;  
		$_SESSION['pswdfw'] = $pswd;
		$_SESSION['logintimefw'] = time();
		$_SESSION['loginflagfw'] ="1";
				
					
		//得到该用户可以访问的分店信息
		$intRowCount=0;
		$sql=sprintf("SELECT TOP 2 a.Chain_No,a.Chain_Name FROM Chain_Infor a,dbo.TRF_AppGetChainFromUser('%s') b WHERE a.Chain_No=b.Chain_No And a.Web_Enabled=1 and a.wxfwflag=1;",$userno);
		$result = querySql($sql);
		
		while($row = fetch_array($result))
		{
			if($intRowCount==0)
			{
				$_SESSION['ChainNofw'] = $row['Chain_No'];  
				$_SESSION['ChainNamefw'] = $row['Chain_Name']; 
			}
			
			$intRowCount=$intRowCount +1;
		}
		
		//判断是否有多条记录
		if($intRowCount>1)
		{
			$_SESSION['ChainCountfw'] ="2";
		}
		else
		{
			$_SESSION['ChainCountfw'] ="1";
		}

		//得到用户名称
		$sql=sprintf("Select 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'",$userno);
		$result = querySql($sql);
		if($row = fetch_array($result))
		{
			if($row['Use_Flag']>0)
			{
				$_SESSION["main_canclearroomflag"]="1";
			}
			$_SESSION['usernamefw']= trim($row['Use_Name']);  
		}
		
		freeResult($result);		
	}
	
	header("Content-type: text/html; charset=gb2312"); 
?>
<!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>
	<link rel="stylesheet" href="css/mycss.css"> 
	
	<script>
		//清空登录信息资料
		var ddt=<?php echo $_SESSION["main_defusernoflagfw"]; ?>;
		if(ddt=="1")
		{	ddt=<?php echo $_SESSION["main_defusernofw"]; ?>;
			localStorage["main_defusernofw"]=ddt;
		}
	</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>
	
	<script>
		//自动刷新页面
		//setTimeout("window.location='indexref.php'",8000);
	</script>
	
	<script>
		var intTimerID1;
		//定期巡检
		intTimerID1=setTimeout("GetCancelRoomMsg()",6000);
		
		function GetCancelRoomMsg()
		{
			//alert("2222");
			clearInterval(intTimerID1);
			
			//3.判断是否有退房请求	
			var strret;
			//用ajax的“同步方式”调用一般处理程序
			$.ajax({
				url: "getcancelroom.php",
				async: false,//改为同步方式
				type: "POST",
				//data: {doid:1, rmid: "strRoomNo" },
				success: function (RetData) 
				{
					strret = RetData;
				}
			});

			if(strret>0)
			{
				//alert(strret);
				//发出声音提示
				playMusic();
			}
			intTimerID1=setTimeout("GetCancelRoomMsg()",5000);						

		};		

		function playMusic() 
		{
			var player = $("#audio1")[0]; /*jquery对象转换成js对象*/
			//if (player.paused)
			//{ /*如果已经暂停*/
				player.play(); /*播放*/
			//}
			//else 
			//{
			//	player.pause();/*暂停*/
			//}
		}

	</script>
	
	<audio id="audio1" controls="controls">
		<source src="6.wav" type="audio/mpeg"/>
	</audio>
	
</head>



<?php
	//require_once("db/db.php");	
	//require_once("common/common.php");
	
	$strSelChainNo=$_SESSION["ChainNofw"];
	$strSelChainName=$_SESSION["ChainNamefw"];
	
	$strNewChainNo=$_REQUEST["mchid"];
	if(strlen($strNewChainNo)>0)
	{
		if($strSelChainNo<>$strNewChainNo)
		{
			$sql=sprintf("SELECT Chain_No,Chain_Name FROM Chain_Infor WHERE Chain_No='%s'",$strNewChainNo);				
			$result = querySql($sql);		
			if($row = fetch_array($result))
			{
				$strNewChainNo= $row['Chain_No'];
				$strNewChainName= $row['Chain_Name'];
			}
			freeResult($result);
			
			$_SESSION["ChainNofw"]=$strNewChainNo;
			$_SESSION["ChainNamefw"]=$strNewChainName;
			
			$strSelChainNo=$_SESSION["ChainNofw"];
			$strSelChainName=$_SESSION["ChainNamefw"];
		}
	}
	
	//1.房态过滤条件
	$selroomstate=$_REQUEST["roomstate"];
	if($selroomstate=="*" | $selroomstate=="")
	{
		$selroomstate=$_SESSION['roomstate'];
	}
	else
	{
		if($selroomstate=="ALL")
		{
			$selroomstate="";
			$_SESSION['roomstate']="";
		}
		else
		{
			$_SESSION['roomstate']=$selroomstate;
		}
	}
	
	//2.楼层过滤条件
	$selroomfloor=trim($_REQUEST["floorid"]);
	if(strlen($selroomfloor)>0)//=="*")
	{
		$_SESSION['roomfloorid']=$selroomfloor;
		//*=现实所有，楼层其他只
	}
	else
	{
		$selroomfloor=$_SESSION['roomfloorid'];
	}
	if($selroomfloor=="")
	{
		$selroomfloor="*";
	}
	if($selroomfloor<>"*")
	{
		if(strlen($selroomfloor)==1)
		{
			$selroomfloor="0".$selroomfloor;
		}		
	}
	
	//3.
	//===========
	$selbkimg1="";
	$selbkimg2="";
	$selbkimg3="";
	$selbkimg4="";
	$selbkimg5="";
	$selbkimg6="";
	$selbkimg7="";
	$selbkimg8="";
	//状态:0空房,1预订房,2在住房,3钟点房,4自用房,5退客房,6维修房,7锁房(9为住客脏房)
	switch($selroomstate)
	{
		case "空净房":
			$selbkimg1="background='images/selfocus1.png'";
			break;
		case "在住房":
			$selbkimg2="background='images/selfocus1.png'";
			break;
		case "钟点房":
			$selbkimg3="background='images/selfocus1.png'";
			break;
		case "住客脏房":
			$selbkimg4="background='images/selfocus1.png'";
			break;
		case "退客房":
			$selbkimg5="background='images/selfocus1.png'";
			break;
		case "维修房":
			$selbkimg6="background='images/selfocus1.png'";
			break;
		case "预订房":
			$selbkimg7="background='images/selfocus1.png'";
			break;
		default:
			$selbkimg8="background='images/selfocus1.png'";
			break;
	}	
		
?>
	

<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="index.php?roomstate=*";
					break;
				case 1:	//进入实时房态  空房 住客 钟点 住脏 脏房 维修 预订
					window.location.href="index.php?roomstate=空净房";
					break;
				case 2:	//进入总台缴款记录表
					window.location.href="index.php?roomstate=在住房";
					break;
				case 3:	//进入总台缴款记录表
					window.location.href="index.php?roomstate=钟点房";
					break;
				case 4:	//进入总台缴款记录表
					window.location.href="index.php?roomstate=住客脏房";
					break;
				case 5:	//进入总台缴款记录表
					window.location.href="index.php?roomstate=退客房";
					break;
				case 6:	//进入总台缴款记录表
					window.location.href="index.php?roomstate=维修房";
					break;
				case 7:	//进入总台缴款记录表
					window.location.href="index.php?roomstate=预订房";
					break;
				case 8:	//进入总台缴款记录表
					window.location.href="index.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> 
		
	function bmtSelNewChain()
	{	
		window.location="getchain.php";
	};
	</script>

	<?php
		$colKF="#22B14C";//"#F0ECDF";	//空房数
		$colZK="#00B7EF";//"#66FF00";	//住客
		$colZD="#FFFF200";//"#CCCC33";	//钟点
		$colZZ="#00B7EF";//"#33FF00";	//住客脏房0099FF
		$colZF="#999999";//"#999999";	//脏房
		$colWX="#F59D56";//"#FF3737";	//维修
		$colYD="#ED1C24";//"#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["ChainNofw"];
		$intUsedCheckOk =0;
		$sql=sprintf("SELECT Item_Value FROM TR_Config Where Chain_No='%s' And Item_Name='手机房务管理启用清扫检查房'",$chainno);
				
		$result = querySql($sql);		
		if($row = fetch_array($result))
		{
			if(trim($row['Item_Value'])=="1")
			{
				$intUsedCheckOk=1;
			}
		}
		freeResult($result);
		
		
		
		//开始去房间状态数量
		//状态:0空房,1预订房,2在住房,3钟点房,4自用房,5退客房,6维修房,7锁房(9为住客脏房)
		if($selroomfloor=="*")
		{
			$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);
		}
		else
		{
			$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' And a.Room_Floor=%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 And a.Room_Floor=%s",$chainno,$selroomfloor,$chainno,$selroomfloor);
		}
				
		$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="45" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td height="45" width="43" align="right">
					<a href="..\indexm.php?rset=0" target="_blank" data-role="button" data-icon="home" data-iconpos="notext">	
				</td>
				<td height="45" align="center">
					<span onClick="bmtSelNewChain();" id="MsgTxt" style="color:#000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:19px;text-shadow:none;"><?php echo $_SESSION['ChainNamefw'];?></span>
					<img onClick="bmtSelNewChain();" src="images\icon_up2.png" width="15" height="10" border="0" style="margin-top:5px;">
				</td>
				<td height="45" width="45" align="left"></td>
			</tr>
			
			<tr bgcolor="#FFFFFF">
				<td height="40" colspan="3">
					<table width="100%" height="80" 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"></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";
						
						$intCheckOk1=0;
						$intCheckOk2=0;
						$intCheckOk3=0;
						$intCheckOk4=0;
						$intCheckOk5=0;
						
						$strtemp="#FFFFFF";
						$intPos=0;
												
						$chainno=$_SESSION["ChainNofw"];
						//开始取房间状态数量
						if($selroomstate=="")
						{
							if($selroomfloor=="*")
							{
								$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk 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
							{
								$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' And a.Room_Floor=%s ORDER BY Room_No ASC",$chainno,$selroomfloor);
							}
						}
						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)
							{
								if($selroomfloor=="*")
								{
									$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk 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
								{
									$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' And a.Room_Floor=%s ORDER BY Room_No ASC",$chainno,$selroomfloor);
								}
							}
							elseif($intselroomstate==9)
							{
								if($selroomfloor=="*")
								{
									$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk 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,a.CheckOk 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 And a.Room_Floor=%s ORDER BY Room_No ASC",$chainno,$selroomfloor);
								}
							}
							else
							{
								if($selroomfloor=="*")
								{
									$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk 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);
								}
								else
								{
									$sql=sprintf("SELECT a.Room_No,a.Room_State,a.Dirty_Flag,a.CheckOk FROM TR_Room_Inform a,TR_Room_Type b 
										WHERE a.TypeListNo=b.ListNo AND b.Chain_No='%s' AND a.Room_State=%d And a.Room_Floor=%s ORDER BY Room_No ASC",$chainno,$intselroomstate,$selroomfloor);
								}
							}
						}
						//状态: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'];
							if($intUsedCheckOk>0)
							{
								$intCheckOk= $row['CheckOk'];
							}
							else
							{
								$intCheckOk= 0;
							}
							
							//生成状态颜色
							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="住客房";
									}
									break;
								case 3:
									$strtemp=$colZD;	//钟点				
									$statetemp="钟点房";
									break;
								default:
									$strtemp="#D7E8F3";
									if($inttemp1==5)
									{
										$statetemp="免费房";
									}
									if($inttemp1==7)
										$statetemp="锁房";
									else
										$statetemp="其他";
									break;
							}
								
							$intPos=$intPos+1;
							
							if($intPos==5)
							{
								//满足一行显示了
								$roomno5=$strtemp2;
								//生成状态颜色
								$statename5=$strtemp;
								$statetext5=$statetemp;
								
								$isdirtyflag5=$intDirty;
								if($isdirtyflag5==1)
								{
									$intCheckOk5=$intCheckOk;
								}
								else
								{
									$intCheckOk5=0;
								}
					?>
					<tr height="48" 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 $roomno1;?>')" 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:3px;"></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>
									<?php if($intCheckOk1==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno2;?>')" 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:3px;"></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: #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>
									<?php if($intCheckOk2==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno3;?>')" 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:3px;"></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>
									<?php if($intCheckOk3==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno4;?>')" 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:3px;"></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>
									<?php if($intCheckOk4==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno5;?>')" 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:3px;"></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>
									<?php if($intCheckOk5==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</div>
							
						</td>
					</tr>
					<?php
								//归为玲一行
								$roomno1="";
								$roomno2="";
								$roomno3="";
								$roomno4="";
								$roomno5="";
								
								$statetemp1="";
								$statetemp2="";
								$statetemp3="";
								$statetemp4="";
								$statetemp5="";
																
								$statename1="#FFFFFF";
								$statename2="#FFFFFF";
								$statename3="#FFFFFF";
								$statename4="#FFFFFF";
								$statename5="#FFFFFF";
								
								$intCheckOk1=0;	
								$intCheckOk2=0;	
								$intCheckOk3=0;	
								$intCheckOk4=0;	
								$intCheckOk5=0;	
								
								$intPos=0;
							}
							else
							{
								switch($intPos)
								{
									case 1:
										$roomno1=$strtemp2;
										$statename1=$strtemp;
										$statetext1=$statetemp;
										$isdirtyflag1=$intDirty;
										if($isdirtyflag1==1)
										{
											$intCheckOk1=$intCheckOk;
										}
										else
										{
											$intCheckOk1=0;
										}
										break;
									case 2:
										$roomno2=$strtemp2;
										$statename2=$strtemp;
										$statetext2=$statetemp;
										$isdirtyflag2=$intDirty;
										if($isdirtyflag2==1)
										{
											$intCheckOk2=$intCheckOk;
										}
										else
										{
											$intCheckOk2=0;
										}
										break;
									case 3:
										$roomno3=$strtemp2;
										$statename3=$strtemp;
										$statetext3=$statetemp;
										$isdirtyflag3=$intDirty;
										if($isdirtyflag3==1)
										{
											$intCheckOk3=$intCheckOk;
										}
										else
										{
											$intCheckOk3=0;
										}
										break;
									case 4:
										$roomno4=$strtemp2;
										$statename4=$strtemp;
										$statetext4=$statetemp;
										$isdirtyflag4=$intDirty;
										if($isdirtyflag4==1)
										{
											$intCheckOk4=$intCheckOk;
										}
										else
										{
											$intCheckOk4=0;
										}
										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 $roomno1;?>')" 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:3px;"></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>
									<?php if($intCheckOk1==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno2;?>')" 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:3px;"></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>
									<?php if($intCheckOk2==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno3;?>')" 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:3px;"></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>
									<?php if($intCheckOk3==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno4;?>')" 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:3px;"></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>
									<?php if($intCheckOk4==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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 $roomno5;?>')" 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:3px;"></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>
									<?php if($intCheckOk5==1) {?>
										<div align="left" style="width:100%;height:10;margin-top:-13px;margin-left">		
											<div style="width:10px;height:10px;background:#555;border-radius:4px;margin-left:3px;"></div>
										</div>
									<?php } ?>
								</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="25%">					
					<a class="ui-btn ui-icon-comment ui-btn-icon-top" target="_parent" href="checkoutlist.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">查房信息</a>
				</td>
				<!--
				<td width="20%">					
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" target="_parent" href="checkoutlist.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">入账记录</a>
				</td>
				-->
				<td width="25%">					
					<a class="ui-btn ui-icon-refresh ui-btn-icon-top" target="_parent" href="indexref.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">刷新房态</a>
				</td>
				<td width="25%">
					<?php if(strlen($selroomfloor)>0 && $selroomfloor<>"*") {?>
						<a class="ui-btn ui-icon-bars ui-btn-icon-top" target="_parent" href="getfloor.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">当前<?php echo $selroomfloor;?>层</a>
					<?php } else {?>
						<a class="ui-btn ui-icon-bars ui-btn-icon-top" target="_parent" href="getfloor.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">所有楼层</a>
					<?php } ?>
					
				</td>
				<td width="25%">										
					<a class="ui-btn ui-icon-tag ui-btn-icon-top" data-transition="slide" href="#ShowRoomInput" data-rel="popup" data-position-to="window" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">房号操作</a>
					
					<div data-role="popup" id="ShowRoomInput" data-corners="false">
						<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
						<table width="280" height="155" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
							<tr><td height ="2" colspan="3" align="center"></td></tr>
							<tr><td height ="35" colspan="3" align="center"><span style="color: #808000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:18px;text-shadow:none;">房号查询</span></td></tr>
							<tr><td height ="1" colspan="3" align="center" bgcolor="#F2E2E2"></td></tr>
							<tr><td height ="10" colspan="3" align="center"></td></tr>
							<tr>
								<td height ="15" width="10"></td>
								<td height ="15">
									<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;text-shadow:none;">请输入房间号</span>
								</td>
								<td height ="15" width="10"></td>
							</tr>
							<tr>
								<td height ="20" width="10"></td>
								<td height ="20">
									<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;">
										<input id="mytext1" name="mytext1" value='' type="text" placeholder="请输入房号" autocomplete="off"/>
									</span>
									
								</td>
								<td height ="20" width="10"></td>
							</tr>
														
							<tr><td height ="10" colspan="3" align="center"></td></tr>
														
							<tr>
								<td height ="40" width="10"></td>
								<td height ="40" align="center">
									<div onClick="RoomFindClick()" style="border-radius:5px;width:80%; height:38px; background-color:#D7AA28;">
										<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
											<tr><td width="100%" height="100%" align="center">
												<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;">确 定</span>                            	
											</td></tr>
										</table>
									</div>
								</td>
								<td height ="40" width="10"></td>
							</tr>
							
							<tr><td height ="15" colspan="3" align="center"></td></tr>
						
						</table>
					</div>
										
				</td>
			</tr>
		</table>						
	</footer>
	
	 <script type="text/javascript">
				
		//相应提交按钮事件处理部分
		function bmtShowRoomClick(selroomno)
		{
			//alert(selroomno);
			//得到当前选择的房间信息
			var selroomid=selroomno;
			if(selroomid=="*")
			{
				return;
			}
			//开始启动客房信息的界面
			var urlroom='roominform.php?rmid=' + selroomid;
			window.location.href=urlroom;
							
		}
		
		
		function RoomFindClick()
		{
			var selroomid=$("#mytext1").val();
			
			if(selroomid.length>0)
			{
				//开始启动客房信息的界面
				var urlroom='roominform.php?rmid=' + selroomid;
				window.location.href=urlroom;			
			}
		}
	</script>
	
</section>

</body>
	
</html>