<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<!doctype html>

<html>
<head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<script src="../laydate/laydate.js"></script>
<style type="text/css">
<!--
.STYLE3 {color: #990033}
-->
</style>
<body>
<table width="100%" height="495" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="27">
	<div class="header">
	<div class="nav">
        <ul>
           
            <li><a href="Booking.asp" target="_self">室场预定</a></li>
			
            <li><a href="yilanbiao.asp" target="_self">预定一览表</a></li>
			<li class="on">预定查询</li>
        </ul>
    </div>	
	</td>
  </tr> 
  
  <tr>
    <td height="470" valign="top"   class="NemuMainBox">
	<br>
	
		<br>
	<%
		
		 shichang=request("shichang")		 
		 bookman=request("bookman")
		    
		 strdate1=request("date1")
		 strdate2=request("date2")		
		 if strdate1="" then 
		   strdate1=now-30
		 end if
		 if strdate2="" then 
		   strdate2=now
		 end if
				 
		
	%>
	 <form name="form1" method="get" action="tongji.asp"  onSubmit="return CheckForm();">
<div align="center">
  <table width="670" border="0" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8" >   
      <tr>
        <td width="30" nowrap class="STYLE1"><div align="center">室场</div></td>
        <td width="37" nowrap class="STYLE1"><div align="center">
            <select name="shichang" id="leibie"  >
              <option><%=shichang%></option>
              <option></option>
              <% Set RSsel = Conn.Execute("select vname from  varset where name='shichang' order by vid")
								   While NOT RSsel.EOF %>
              <OPTION value=<%=RSsel( "vname" )%>><%=RSsel( "vname" )%></OPTION>
              <% RSsel.MoveNext
								  Wend
								  RSsel.Close%>
            </select>
        </div></td>
        <td width="30" height="38" nowrap class="STYLE1"><div align="center"><span class="STYLE1 STYLE2">开始</span></div></td>
        <td width="72" nowrap class="STYLE1"><b><b>
          <input name=date1  placeholder="请输入日期"  style="width:90px"  value=<%=strdate1%> class="laydate-icon" onClick="laydate()">
        </b></b></td>
        <td width="30" nowrap class="STYLE1"><div align="center"><span class="STYLE2">结束</span></div></td>
        <td width="79" nowrap class="STYLE1"><b><b>
         <input name=date2  placeholder="请输入日期"  style="width:90px"  value=<%=strdate2%> class="laydate-icon" onClick="laydate()">
        </b></b></td>
        <td width="40" nowrap class="STYLE1"><div align="center">预定人</div></td>
        <td width="76" nowrap class="STYLE1"><div align="center">
          <input name="bookman" class="text" id="bookman"  size=10 maxlength="30" value=<%=bookman%>>
        </div></td>
		<td width="80" class="STYLE1"><div align="center">
          <input name="submit" type="submit" class="topanniu" value="查询">
        </div></td>
      </tr>
    </table>
	
    </div>
  <br>
  
  
   <%
     tname=request.cookies("tname")
	'检查权限
		   Set MyOAASPObj = Server.CreateObject("YFSchoolOApro.YFSchoolDll")
			   if MyOAASPObj.QuanXian(tname,"报修处理")=0 then 
				response.redirect  "../NoPower.asp"
			   end if 
			   set MyOAASPObj=nothing
	'检查权限结束
 
   Set Rsyipi=Server.CreateObject("Adodb.Recordset")
   sqlsended="SELECT * FROM ShiChangbooking s INNER JOIN    varSet v ON s.节次 = v.vname  where (name='作息时间') and (室场名称='"&shichang&"') and  (预定人 like '%"&bookman&"%') and  (预定日期 BETWEEN '"&strdate1&"'  AND   '"&strdate2&"')       order by 预定日期,vid"
   Rsyipi.open sqlsended,conn,1,1
%>
  <table width="95%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
    <tr style="background-color:#D6E4FF"  class="TableHeader">
	<td width="100" align="center" nowrap class="STYLE1"><div align="center">室场名称</div></td>
      <td height="30" align="center" nowrap="nowrap" class="STYLE1">预定人</td>
      <td align="center" nowrap="nowrap" class="STYLE1">预定日期</td>
      <td align="center" nowrap class="STYLE1">节次</td>
      <td align="center" nowrap class="STYLE1">预定年级</td>
      <td align="center" nowrap class="STYLE1">预定科目</td>
	  <td align="center" nowrap class="STYLE1">预定说明</td>
    </tr>
 
<% While NOT Rsyipi.EOF %>
 
    <tr  onmouseout="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#FFCCFF'"   height="30" >
	  <td width="100" align="center" nowrap class="STYLE1"><%=Rsyipi("室场名称")%></td>
      <td width="80" align="center" nowrap class="STYLE1"><%=Rsyipi("预定人")%></td>
      <td width="80" align="center" nowrap class="STYLE1"><%=Rsyipi("预定日期")%></td>
      <td width="80" align="center" nowrap class="STYLE1"><%=Rsyipi("节次")%></td>
      <td width="80" align="center" nowrap class="STYLE1"><%=Rsyipi("预定年级")%></td>
      <td width="80" align="center" nowrap class="STYLE1"><%=Rsyipi("预定科目")%></td> 
	  <td  align="center" nowrap class="STYLE1"><%=Rsyipi("预定说明")%></td>
     
    </tr>
   <%
			Rsyipi.MoveNext
			Wend
			Rsyipi.Close
			%>
  </table>
</FORM>
	
	
	
	
	   </td>
  </tr>
</table>
</body>
</html>
