<?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;
	}
	
	$datday1=$_REQUEST["datday1"];
	
	//echo $datday1."**".$datday2;;
	
	if($datday1=="")
	{
		//设置默认日期
		$chainno=$_SESSION["ChainNo"];
		$sql=sprintf("SELECT convert(varchar(10),a.HotelDate,120)AS HotelDay FROM TR_RepHotelDayReport a,(SELECT MAX(ListNo)AS ListNo 
					FROM TR_RepHotelDayReport WHERE Chain_No='%s')b WHERE a.ListNo=b.ListNo",$chainno);
								
		$result = querySql($sql);
		$row = fetch_array($result);
		$datday1=$row['HotelDay'];
				
		freeResult($result);
		closeDb();
	}
	//echo $datday1."+++".$datday2."**".$strtemp1;
?>
<!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">-->
	<!--<link rel="stylesheet" href="jsp4/jquery.mobile.datepicker.css">-->
	
	<script src="jsp4/jquery.js"></script>
	<!--<script src="jsp4/jquery.mobile-1.4.3.min.js"></script>-->
	<!--<script src="jsp4/jquery.ui.datepicker.js"></script>-->
	<!--<script id="mobile-datepicker" src="jsp4/jquery.mobile.datepicker.js"></script>-->
	
	
	<script src="../jsp5/jquery.mobile-1.4.5.min.js"></script>
	<link rel="stylesheet" href="../jsp5/jquery.mobile-1.4.5.min.css">
</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>
	
	<script type="text/javascript">
			
		function bmtReturnPage()
		{	
			window.location="../indexm.php?rset=0";
		};
					
	</script>
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
		
<section data-role="page" id="hotelreportA">		

	
	
  	<header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;bkc">
		<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
		   
			<tr >
				<td height="35" align="center" colspan="3">
					<span style="color:#000 ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;"><?php echo $datday1;?>营业日报</span>  
				</td>
			</tr>
		  
			<tr bgcolor="#EFDCDC"><td height="1" align="center" colspan="3"></tr>
		  
			<tr >
				<td height="30" align="center" colspan="3">
					<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" >
						<tr>
							<td align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">&nbsp;项目名称</span></td>
							<td width="55" align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">本日</span></td>
							<td width="60" align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">本月累计</span></td>
							<td width="75" align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">本年累计</span></td>
							<td width="8" align="right"></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</header>
	
	<article data-role="none">		
		<ul data-role="listview" data-inset="true" data-divider-theme="a">   			
			<?php				
				$chainno=$_SESSION["ChainNo"];
				
				$inttypeid=0;
				$tempid=0;
				$tempsubid=0;
				$tempname="";
				$dayval=0;
				$monthval=0;
				$yearval=0;
				
				//开始去房间状态数量
				$sql=sprintf("SELECT TypeID,SubID,ItemName,DayVal,MonthVal,YearVal
							FROM TR_RepHotelDayReport WHERE HotelDate>='%s' AND HotelDate<='%s 23:59:59' AND Chain_No='%s'
							ORDER BY TypeID ASC,SubID ASC",$datday1,$datday1,$chainno);

				$result = querySql($sql);		
				while($row = fetch_array($result))
				{
					//得到每一条的记录信息
					$tempid=$row['TypeID'];
					$tempsubid=$row['SubID'];
					$tempname=$row['ItemName'];
					$dayval=$row['DayVal'];
					$monthval=$row['MonthVal'];
					$yearval=$row['YearVal'];
					
					if($tempname=="营业收入项目类型统计")
						$tempname="营业项目类型统计";
					if($tempname=="营业收入项目明细统计")
						$tempname="营业项目明细统计";
						
					if($tempsubid == 0)	//如果是不同组的第一个
					{
						$inttypeid=$inttypeid + 1;
			?>
			<div data-role="none" class="STYLEM3">
					<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="#f3f4ec">
						<tr>
							<td align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">&nbsp;<?php echo $inttypeid;?>.<?php echo $tempname;?></span></td>
							<td width="55" align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;"><?php echo number_format($dayval,1);?></span></td>
							<td width="60" align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;"><?php echo number_format($monthval,1);?></span></td>
							<td width="75" align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;"><?php echo number_format($yearval,1);?></span></td>
							<td width="8" align="right"></td>
						</tr>
					</table>
				<?php if($inttypeid==1)
					{?>
						<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td align="left"></td>
								<td width="55" align="right"></td>
								<td width="60" align="right"></td>
								<td width="75" align="right"></td>
								<td width="8" align="right"></td>
							</tr>
						</table>
				<?php } ?>
					
			</div>
			<?php
					}
					else
					{
			?>
			<div data-role="none" class="STYLEM3">
				<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td align="left">&nbsp;&nbsp;&nbsp;<?php echo $tempname;?></td>
						<td width="55" align="right"><?php echo number_format($dayval,1);?></td>
						<td width="60" align="right"><?php echo number_format($monthval,1);?></td>
						<td width="75" align="right"><?php echo number_format($yearval,1);?></td>
						<td width="8" align="right"></td>
					</tr>
				</table>
			</div>
			<?php
					}
				}
				//释放数据库
				freeResult($result);
				closeDb();
			?>
		</ul>
	</article>
	
	
	<footer data-role="footer" data-position="fixed" data-tap-toggle="false" style="border-top:0px solid #f0f0f0;border-bottom:0px solid #f0f0f0;border-left:1px solid #f0f0f0;border-right:1px solid #f0f0f0;">
		<table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
			<tr height="100%" valign="top">
				<td width="25%"> <!--index.php-->
					<a class="ui-btn ui-icon-home ui-btn-icon-top" target="_parent" href="..\indexm.php?rset=0" style="width:90%;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="25%">
					<a class="ui-btn ui-icon-bars ui-btn-icon-top" target="_parent" href="#" style="width:90%;height:10px;margin:0px auto 0px auto;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>
				
				<td width="25%">					
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" target="_parent" href="#hotelreportsited" style="width:90%;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="25%">
					
					<a class="ui-btn ui-icon-search ui-btn-icon-top" data-rel="popup" data-position-to="window" href="#ShowRoomInput" style="width:90%;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>
					
					<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="168" 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 ="15" colspan="3" align="center"></td></tr>
							<tr>
								<td height ="30" width="10"></td>
								<td height ="30">
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td width="90" height="100%" align="right">
												<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;text-shadow:none;">营业日期：</span>
											</td>
											<td height="100%" align="left">
												<input type="date" id="dtp1" name="dtp1"  value="<?php echo $datday1;?>"  data-mini="true" />
											</td>
											<td height ="100%" width="10"></td>
										</tr>
									</table>
								</td>
								<td height ="30" width="10"></td>
							</tr>
														
							<tr><td height ="30" colspan="3" align="center"></td></tr>

							<tr>
								<td height ="40" width="10"></td>
								<td height ="40" align="center">
									<div onClick="OnSendFindClick1()" style="border-radius:5px;width:86%; 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 ="30" colspan="3" align="center"></td></tr>
						
						</table>
					</div>
				</td>
			</tr>
		</table>
	</footer>
	
	<script type="text/javascript">
		//相应查询按钮的事件
		function OnSendFindClick1()
		{
			var strday1 = $("#dtp1").val();
			if(strday1=="")
			{	
				$("#dtp1").focus();
				return;
			}
			parent.window.location.href='repdayreport.php?datday1=' + strday1;
		};
	</script>
	
</section>

<!--页面二-->
<section data-role="page" id="hotelreportsited">		
	<link rel="stylesheet" href="css/mycss.css"> 
			
	<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" align="center" colspan="3">
					<span style="color:#000 ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;text-shadow:none;"><?php echo $datday1;?>住房明细</span>  
				</td>
			</tr>

		</table>
	</header>
	
	
	
	<article data-role="none">
		

		<ul data-role="listview" data-inset="true" data-divider-theme="a">   			
			
			<?php				
				$chainno=$_SESSION["ChainNo"];
				
				$OrderList=0;
				$Room_No="";
				$Order_No="";
				$CheckIn="";
				$CheckOut="";
				$SitedType="";
				$Room_Price=0;
				$RoomScore=0;
				$OtherSum=0;
				$RoomTotle=0;
				$Man_Name="";
				$Man_Sex="";
				$CustomType="";
				
				$SumCZCount=0;	//总出租数
				$SumMFCount=0;	//免费房数
				$SumZDCount=0;	//钟点房数
				$SumFFVal=0;	//总房费
				$SumAllVal=0;	//总收入
				
				$intSitedLong=0;
				$intSitedTime=0;
				$intSitedFree=0;
				
				//开始去房间状态数量
				$sql=sprintf("Select RowID,Room_No,Order_No,Convert(varchar(16),SelectRoomTime,120)AS CheckIn,Convert(varchar(16),Cancel_Date,120)AS CheckOut,
						Sited_LongFlag,Sited_TimeFlag,Sited_FreeFlag,RoomPrice,TJ_RoomVal,(TJ_TelVal+TJ_FBVal+TJ_PCVal+TJ_VIPVal+TJ_OtherVal)AS OtherSum,TJ_SumVal,
						CustomName,CustomSex,CustomType From TR_RepHotelDayList Where HotelDate='%s' And Chain_No='%s' ORDER BY RowID ASC",$datday1,$chainno);

				$result = querySql($sql);		
				while($row = fetch_array($result))
				{
					//得到每一条的记录信息					
					$OrderList=$row['RowID'];
					$Room_No=$row['Room_No'];
					$Order_No=$row['Order_No'];
					$CheckIn=$row['CheckIn'];
					$CheckOut=$row['CheckOut'];
					//$SitedType=$row['SitedType'];
					$Room_Price=$row['RoomPrice'];
					$RoomScore=$row['TJ_RoomVal'];
					$OtherSum=$row['OtherSum'];
					$RoomTotle=$row['TJ_SumVal'];
					$Man_Name=$row['CustomName'];
					$Man_Sex=$row['CustomSex'];
					$CustomType=$row['CustomType'];
					
					$intSitedLong=$row['Sited_LongFlag'];
					$intSitedTime=$row['Sited_TimeFlag'];
					$intSitedFree=$row['Sited_FreeFlag'];
					
					$SitedType="日租";
					if($intSitedLong>0)
						$SitedType="长包";	
					if($intSitedTime>0)
						$SitedType="钟点";	
					if($intSitedFree>0)
						$SitedType="免费";	
						
					$SumFFVal=$SumFFVal + $RoomScore;	//总房费
					$SumAllVal=$SumAllVal + $RoomTotle;	//总收入
				
					if($Room_No=="已退房" | $Room_No=="临时帐")	//如果是不同组的第一个
					{
			?>
			<div data-role="none" class="STYLEM3">
				<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="#F5F2E6">
					<tr>
						<td width="32" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;</td>
						<td width="43" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $Room_No;?></td>
						<td width="60" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;</td>
						<td width="65" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">房费 <?php echo  number_format($RoomScore);?></td>
						<td width="50" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">杂项 <?php echo  number_format($OtherSum);?></td>
						<td align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">合计 <?php echo  number_format($RoomTotle);?></td>
						<td width="8" align="right"></td>
					</tr>
				</table>
			</div>
			<?php
					}
					else
					{
						$SumCZCount=$SumCZCount+1;
						
						if($SitedType=="免费")
						{
							$SumMFCount=$SumMFCount+1;	//免费房数
						}
						elseif($SitedType=="钟点")
						{
							$SumZDCount=$SumZDCount+1;	//钟点房数
						}
						
			?>
			<div data-role="none" class="STYLEM3">
				<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0" bgcolor="#F5F2E6">
					<tr>
						<td width="32" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;<?php echo $OrderList;?></span></td>
						<td width="43" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;"><?php echo $Room_No;?></span></td>
						<td width="60" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">房价 <?php echo  number_format($Room_Price);?></span></td>
						<td width="65" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">房费 <?php echo  number_format($RoomScore);?></span></td>
						<td width="50" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">杂项 <?php echo  number_format($OtherSum);?></span></td>
						<td align="right"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">合计 <?php echo  number_format($RoomTotle);?></span></td>
						<td width="8" align="right"></td>
					</tr>
				</table>
			</div>
			<div data-role="none" class="STYLEM3">
				<table width="100%" height="40" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="135" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;入住: <?php echo $CheckIn;?></span></td>
						<td width="65" align="left" ><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">性别:<?php echo $Man_Sex;?></span></td>
						<td align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">姓名: <?php echo $Man_Name;?></span></td>
					</tr>
					<tr>
						<td width="135" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">&nbsp;退房: <?php echo $CheckOut;?></span></td>
						<td width="65" align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">模式:<?php echo $SitedType;?></span></td>
						<td align="left"><span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:11px;text-shadow:none;">客源: <?php echo $CustomType;?></span></td>
					</tr>
				</table>
			</div>
			<?php
					}
				}
				//释放数据库
				freeResult($result);
				closeDb();
			?>
		</ul>
	</article>
	
	<footer data-role="footer" data-position="fixed" data-tap-toggle="false" style="border-top:0px solid #f0f0f0;border-bottom:0px solid #f0f0f0;border-left:1px solid #f0f0f0;border-right:1px solid #f0f0f0;">
		<table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
			
			<tr bgcolor="#f1e3e3"><td height="1" align="center" colspan="4"></tr>
			
			<tr height="30" valign="top" bgcolor="#F3F4EC">
				<td height="100%" colspan="4">
					<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
						
						<tr>
							<td width="5" align="left"></td>
							<td width="70" align="left">
								<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">出租数 <?php echo $SumCZCount;?></span>
							</td>
							<td width="65" align="left">
								<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">免费房 <?php echo $SumMFCount;?></span>
							</td>
							<td width="65" align="left">
								<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">钟点房 <?php echo $SumZDCount;?></span>
							</td>
							<td width="70" align="left">
								<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">房费 <?php echo number_format($SumFFVal);?></span>
							</td>
							<td align="right">
								<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;text-shadow:none;">总计 <?php echo $SumAllVal;?></span>
							</td>
							<td width="5" align="left"></td>
						</tr>
					</table>
				</td>
				
			</tr>
			
			<tr height="100%" valign="top">
				<td width="25%">
					<a class="ui-btn ui-icon-home ui-btn-icon-top" target="_parent" href="..\indexm.php?rset=0" style="width:90%;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="25%">
					<a class="ui-btn ui-icon-bars ui-btn-icon-top" target="_parent" href="#hotelreportA" style="width:90%;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="25%">					
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" target="_parent" href="#" style="width:90%;height:10px;margin:0px auto 0px auto;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>
				
				<td width="25%">
					
					<a class="ui-btn ui-icon-search ui-btn-icon-top" data-rel="popup" data-position-to="window" href="#ShowRoomInput2" style="width:90%;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>
					
					<div data-role="popup" id="ShowRoomInput2" 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="168" 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 ="15" colspan="3" align="center"></td></tr>
							<tr>
								<td height ="30" width="10"></td>
								<td height ="30">
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td width="90" height="100%" align="right">
												<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;text-shadow:none;">营业日期：</span>
											</td>
											<td height="100%" align="left">
												<input type="date" id="dtp2" name="dtp2"  value="<?php echo $datday1;?>"  data-mini="true" />
											</td>
											<td height ="100%" width="10"></td>
										</tr>
									</table>
								</td>
								<td height ="30" width="10"></td>
							</tr>
														
							<tr><td height ="30" colspan="3" align="center"></td></tr>

							<tr>
								<td height ="40" width="10"></td>
								<td height ="40" align="center">
									<div onClick="OnSendFindClick2()" style="border-radius:5px;width:86%; 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 ="30" colspan="3" align="center"></td></tr>
						
						</table>
					</div>
				</td>
			</tr>
		</table>
	</footer>
	
	<script type="text/javascript">
		//相应查询按钮的事件
		function OnSendFindClick2()
		{
			var strday1 = $("#dtp2").val();
			if(strday1=="")
			{	
				$("#dtp2").focus();
				return;
			}
			parent.window.location.href='repdayreport.php?datday1=' + strday1;
		};
	</script>
	
</section>

</body>
</html>
