<% 'On Error Resume Next Set conn = server.CreateObject("adodb.connection") conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("##fangyuan.mdb") currentYear = Year(Now) currentMonth = Month(Now) nextMonth = 0 preMonth = 0 nextMonth = Request.QueryString("next") If nextMonth = "" Then nextMonth = 0 End If preMonth = nextMonth - 1 nextMonth = nextMonth + 1 DateSerialString = DateSerial(currentYear, currentMonth + nextMonth, 1)-1 DateSerialString = CDate(DateSerialString) maxDay = Day(DateSerialString) For i=1 To 15 TD = TD&""&i&"" Next For i=16 To maxDay TD2 = TD2&""&i&"" Next %> 三亚飞鱼之家旅舍房态查询 <%=TD%> <%=TD2%> <% Set rs = server.CreateObject("adodb.recordset") Set rsHasOrder = server.CreateObject("adodb.recordset") rs.open "select HouseType.name,HouseType.fname,HouseType.id,HouseType.sort from HouseType where fid>0 order by HouseType.sort ",conn,1,1 num = 1 While Not rs.eof If num = 18 Then Response.write ""&TD&""&TD2&"" num = 0 End If num = num + 1 Response.write "" For j=1 To 15 rsHasOrder.open "select Enroll.description,Enroll.sort from Enroll where Enroll.typeid="&rs("id")&" and Enroll.year="&Year(DateSerialString)&" and Enroll.month="&Month(DateSerialString)&" and Enroll.day="&j,conn,1,1 description = "" sort = 0 If Not rsHasOrder.eof Then description = rsHasOrder("description") sort = rsHasOrder("sort") End If rsHasOrder.close If description <> "" Then If sort = 1 Then Response.write "" Else Response.write "" End If Else Response.write "" End If Next Response.write "" For j=16 To maxDay rsHasOrder.open "select Enroll.description,Enroll.sort from Enroll where Enroll.typeid="&rs("id")&" and Enroll.year="&Year(DateSerialString)&" and Enroll.month="&Month(DateSerialString)&" and Enroll.day="&j,conn,1,1 description = "" sort = 0 If Not rsHasOrder.eof Then description = rsHasOrder("description") sort = rsHasOrder("sort") End If rsHasOrder.close If description <> "" Then If sort = 1 Then Response.write "" Else Response.write "" End If Else Response.write "" End If Next Response.write "" rs.movenext Wend rs.close Set rsHasOrder = Nothing Set rs = Nothing %> <%=TD%> <%=TD2%>
房型 房号房型 房号
房型房号房型房号
"&rs("fname")&""&rs("name")&""&description&""&description&""&rs("fname")&""&rs("name")&""&description&""&description&"
房型 房号房型 房号

<% conn.close Set conn = Nothing %>