<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=SiteName%>_校无忧科技_Www.Xiao5u.Com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="description" content="校无忧教室预约系统_Www.Xiao5u.Com" />
<meta name="keywords" content="校无忧教室预约系统" />
<link href="images/xiao5u.css" rel="stylesheet" type="text/css">
<!--#include file=images/ini.sys -->
</head>
<body>
<table cellSpacing=0 cellPadding=0 align=center width="1000px">
  <tr>
    <td colSpan=3 id="banner"><%=SiteName%></td>
  </tr>
</table>
<table cellSpacing=0 cellPadding=0 align=center width="1000px">
 <tr>
  <td id="menu"><a href="index.asp">首页</a>  
 - <a href="index.asp">在线预约</a>
   </td>
 </tr>
</table>
<table width="1000px" align="center" bgcolor="#FFFFFF">
<%if ks=1 then %>
 <tr>
  <td id="info" ><%=Description%></td>
 </tr>
 <tr>
  <td colspan="4" style="line-height:20px">
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#aec3de" class="yy">
     <tr align="center" bgcolor="#ffffff" style="font-weight:bold;line-height:30px;">
	  <td colspan="10">请选择教室：
<%
cid=trim(request("cid"))
sqlClass="select * from Sclass order by id asc"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
if rsClass.eof then 
	response.Write("还没有任何教室，请先添加教室。")
else
	for a=1 to rsClass.recordcount
	b=rsClass("title")
	if cid="" then
	cid=rsClass("title")
	end if
	if rsClass("title")=cid then
	   response.Write("<a href='?cid=" & rsClass("title") & "'><font color='red'>" & rsClass("title") & "</font></a> | ")		
	else
	   response.Write("<a href='?cid=" & rsClass("title") & "'><font color='green'>" & rsClass("title") & "</font></a> | ")
	end if
    rsClass.movenext
	next
end if
rsClass.close
set rsClass=nothing
%>
	  </td>
	  </tr>
     <tr align="center" bgcolor="#EAF5BD" style="font-weight:bold;line-height:30px;">
	  <td>日期</td>
	  <td>星期</td>
	  <td width="10%">第一节</td>
	  <td width="10%">第二节</td>
	  <td width="10%">第三节</td>
	  <td width="10%">第四节</td>
	  <td width="10%">第五节</td>
	  <td width="10%">第六节</td>
	  <td width="10%">第七节</td>
	  <td width="10%">第八节</td>
     </tr>
<%for i=-1 to 6
Select Case i
 Case "-1" ys="gray"
 Case "0" ys="red"
 Case "1" ys="black"
end select
dd=DateAdd("d",+i,date())
ww=WeekdayName(Weekday(dd))  
hh=hour(now())
%>
      <tr align='center' bgcolor='#FFFFFF' height="50">
		  <td><font color=<%=ys%>><%=dd%></font></td>
		  <td><%=ww%></td>
		  <%for j=1 to 8%>
<%
sqlY="select * from Info where xx1=#"&dd&"# and xx2='"&ww&"' and xx3='第"&j&"节'"
if cid<>"" then 
   sqlY=sqlY & " and xx4='"&cid&"' "
else
   cid=b
   sqlY=sqlY & " and xx4='"&b&"' "
end if
set rsY=conn.execute(sqlY)
if rsY.eof then
   if i=-1 or (i=0 and hh<=12 and j<=4) or (i=0 and hh>12) then 
	  response.Write("<td><span class='scx'>过期</span></td>")
   else
	  response.Write("<td><a href='reserve.asp?cid="&cid&"&rq="&dd&"&xq="&ww&"&ks="&j&"'>预约</a></td>")
   end if 
else
   if rsY("sh")<>"待审核" then
	  response.Write("<td bgcolor=#F2FDFF>"&rsY("xx5")&"<br>"&rsY("xx6")&"</td>")
   else
	  response.Write("<td bgcolor=#F2FDFF>预约审核中</td>")
   end if
end if
rsY.close
Set rsY=nothing
%>
		  <%next%>
       </tr>
<%next%>
      </table>
  </td>
 </tr>
<%
else
%>
  <tr align="center" bgcolor="#FFFFFF">
    <td  height="150px" colspan="2"><b>校无忧科技友情提示：预约系统已关闭！</b></td>
  </tr>
<%end if%>
</table>
<table cellSpacing=0 cellPadding=0 align=center background="images/botbj.jpg" width="1000px">
  <tr>
    <td height=60 align="center"><a href="http://www.xiao5u.com/" target="_blank">校无忧</a> <%=Copyright%> <script type="text/javascript" src="https://js.users.51.la/4641655.js"></script></td>
  </tr>
</table>
</body>
</html>