<% dim Rs_Events dim Rs_Messages dim Rs_Announcements dim mydate dim sScript dim ThisMonth dim ThisYear dim datToday dim intThisMonth dim strMonthName dim datFirstDay dim intFirstWeekDay dim intLastDay dim intPrevMonth dim intPrevYear dim intThisYear dim intNextMonth dim intNextYear dim LastMonthDate dim NextMonthDate dim intPrintDay dim dFirstDay dim dLastDay dim sSQL dim sSQL_Events dim sSQL_Messages dim sSQL_Announcements dim intLastMonth dim EndRows dim intLoopDay dim dToday dim bEvents dim DailyEventsList dim BackGroundColor dim CompanyName dim vchNotes dim UserGroup dim vchLocation dim dtStartTime dim dtEndTime dim View dim QryStr dim StrPos1 dim StrPos2 dim Temp dim SQLCrit dim SQLSearchString dim YearOfLastEvent dim vchItemThumbnail dim rsCats dim dbCats dim IdCat dim sql dim GetYearOfEvents Dim intPageCount ' The number of pages in the recordset. Dim intRecordCount ' The number of records in the recordset. Dim intPage ' The current page that we are on. Dim intRecord ' Counter used to iterate through the recordset. Dim intStart ' The record that we are starting on. dim I ' Page Display Number Counter Dim intFinish ' The record that we are finishing on. dim SQLCritColumn dim NumRecsPerPage dim BodyBGCOLOR dim TableBGCOLOR dim TableRowColor1 dim TableRowColor2 dim TableHeaderBGCOLOR dim TableBORDERCOLOR dim TableHeaderFont dim CalTableBGCOLOR dim CalTableBorderCOLOR dim CalTableRowBGCOLOR dim CalTableMonthTitleFont dim CalTableMonthDropdownRowBGCOLOR dim CalTableActiveDayBGCOLOR dim CalTDCellSizeWidth dim CalTDCellSizeHeight '************************************************ '*** Set Colors and Calendar Size ******* '************************************************ BodyBGCOLOR = "#ffffff" TableBORDERCOLOR = "#ffffff" TableBGCOLOR = "#ffffff" TableRowColor1 = "ffffff" TableRowColor2 = "#ffffff" TableHeaderBGCOLOR = "#ffffff" TableHeaderFont = "#000000" NumRecsPerPage = 10 CalTableBGCOLOR = "#fffff" CalTableBorderCOLOR = "#CCCCCC" CalTableRowBGCOLOR = "#ffffff" CalTableMonthTitleFont = "#993300" CalTableMonthDropdownRowBGCOLOR = "#ffffff" CalTableActiveDayBGCOLOR = "#eeeeee" CalTDCellSizeWidth = 15 CalTDCellSizeHeight = 15 '************************************************ UserGroup = Session("UserGroup") CompanyName = Session("CompanyName") NumRecsPerPage = cint(NumRecsPerPage) '------------------------------------------------------------ ' This function finds the last date of the given month '------------------------------------------------------------ Function GetLastDay(intMonthNum, intYearNum) Dim dNextStart If CInt(intMonthNum) = 12 Then dNextStart = CDate( "1/1/" & intYearNum) Else dNextStart = CDate(intMonthNum + 1 & "/1/" & intYearNum) End If GetLastDay = Day(dNextStart - 1) End Function Function MakeEventsList(Rs_Events, dToday) dim sEventsList dim sFontColor sEventsList = "
" Rs_Events.MoveFirst do until Rs_Events.EOF If (Rs_Events.Fields("dtStart")<= CDate(dToday)) AND (Rs_Events.Fields("dtEnd")>= CDate(dToday)) Then 'sFontColor = TypeColorCode(Rs_Events.Fields("vchDivision")) sFontColor = "#000000" sEventsList = sEventsList & "" & "" & Rs_Events.Fields("vchEventName") & "
" sEventsList = sEventsList & "
" Rs_Events.MoveNext Else Rs_Events.MoveNext End If Loop sEventsList = sEventsList MakeEventsList = sEventsList End Function %> <% '------------------------------------------------------------------------- ' This routine prints the individual table divisions for days of the month '------------------------------------------------------------------------- Sub Write_TD(sValue, sClass) IF sClass = "HL" then Response.Write " " & sValue & "" & vbCrLf ELSE Response.Write " " & sValue & "" & vbCrLf end if End Sub SQLCritColumn = Request.QueryString("Column") Select Case SQLCritColumn Case "dtStart" SQLCrit = " ORDER BY dtStart " & Request.QueryString("Direction") & ",vchEventName" Case "vchLocation" SQLCrit = " ORDER BY vchLocation " & Request.QueryString("Direction") & ",dtStart" Case Else SQLCrit = " ORDER BY dtStart,vchEventName" End Select QryStr = Request.ServerVariables("QUERY_STRING") View = Request.QueryString("View") StrPos1 = Instr(1,QryStr,"NAV") If StrPos1 > 0 then StrPos2 = Instr(StrPos1,QryStr,"&") StrPos2 = StrPos2 - StrPos1 StrPos2 = StrPos2 + 1 Temp = mid(QryStr,StrPos1,StrPos2) QryStr = replace(QryStr,Temp,"") end if StrPos1 = Instr(1,QryStr,"Column") If StrPos1 > 0 then StrPos2 = Instr(StrPos1,QryStr,"&") StrPos2 = StrPos2 - StrPos1 StrPos2 = StrPos2 + 1 Temp = mid(QryStr,StrPos1,StrPos2) QryStr = replace(QryStr,Temp,"") end if StrPos1 = Instr(1,QryStr,"Direction") If StrPos1 > 0 then StrPos2 = Instr(StrPos1,QryStr,"&") StrPos2 = StrPos2 - StrPos1 StrPos2 = StrPos2 + 1 Temp = mid(QryStr,StrPos1,StrPos2) QryStr = replace(QryStr,Temp,"") end if StrPos1 = Instr(1,QryStr,"idCat") If StrPos1 > 0 then StrPos2 = Instr(StrPos1,QryStr,"&") StrPos2 = StrPos2 - StrPos1 StrPos2 = StrPos2 + 1 Temp = mid(QryStr,StrPos1,StrPos2) QryStr = replace(QryStr,Temp,"") end if StrPos1 = Instr(1,QryStr,"Submit") If StrPos1 > 0 then StrPos2 = Instr(StrPos1,QryStr,"&") if StrPos2 = 0 then StrPos2 = len(QryStr) end if StrPos2 = StrPos2 - StrPos1 StrPos2 = StrPos2 + 1 Temp = mid(QryStr,StrPos1,StrPos2) QryStr = replace(QryStr,Temp,"") end if If Request.QueryString("NAV") = "" Then intPage = 1 Else intPage = Request.QueryString("NAV") End If ' Constants for the days of the week Const cSUN = 1, cMON = 2, cTUE = 3, cWED = 4, cTHU = 5, cFRI = 6, cSAT = 7 ' Get the name of this file sScript = Request.ServerVariables("SCRIPT_NAME") ' Check for valid month input If IsEmpty(Request("MONTH")) OR NOT IsNumeric(Request("MONTH")) Then if IsEmpty(Request.QueryString("Month")) then if IsEmpty(session("Month")) then datToday = Date() intThisMonth = Month(datToday) GetYearOfEvents = "YES" else intThisMonth = session("Month") end if else intThisMonth = Request.QueryString("Month") end if ElseIf CInt(Request("MONTH")) < 1 OR CInt(Request("MONTH")) > 12 Then datToday = Date() intThisMonth = Month(datToday) Else intThisMonth = CInt(Request("MONTH")) End If ' Check for valid year input If IsEmpty(Request("YEAR")) OR NOT IsNumeric(Request("YEAR")) Then if IsEmpty(Request.QueryString("Year")) then if IsEmpty(session("Year")) then datToday = Date() intThisYear = Year(datToday) else intThisYear = session("Year") end if else intThisYear = Request.QueryString("Year") end if Else intThisYear = CInt(Request("YEAR")) End If strMonthName = MonthName(intThisMonth) datFirstDay = DateSerial(intThisYear, intThisMonth, 1) intFirstWeekDay = WeekDay(datFirstDay, vbSunday) intLastDay = GetLastDay(intThisMonth, intThisYear) ' Get the previous month and year intPrevMonth = intThisMonth - 1 If intPrevMonth = 0 Then intPrevMonth = 12 intPrevYear = intThisYear - 1 Else intPrevYear = intThisYear End If ' Get the next month and year intNextMonth = intThisMonth + 1 If intNextMonth > 12 Then intNextMonth = 1 intNextYear = intThisYear + 1 Else intNextYear = intThisYear End If ' Get the last day of previous month. Using this, find the sunday of ' last week of last month LastMonthDate = GetLastDay(intPrevMonth, intPrevYear) - intFirstWeekDay + 2 NextMonthDate = 1 ' Initialize the print day to 1 intPrintDay = 1 ' Open a record set of events Set Rs_Events = Server.CreateObject("ADODB.RecordSet") ' These dates are used in the SQL dFirstDay = intThisMonth & "/1/" & intThisYear dLastDay = intThisMonth & "/" & intLastDay & "/" & intThisYear '***************************************************** ' Check for Event Cat If IsEmpty(Request("idCat")) OR NOT IsNumeric(Request("idCat")) Then if IsEmpty(Request.QueryString("idCat")) then if IsEmpty(session("idCat")) then idCat = -1 else idCat = session("idCat") end if else idCat = cint(Request.QueryString("idCat")) end if Else idCat = cint(Request("idCat")) End If '***************************************************** sSQL = "execute sp_RetrieveEventDatesByCat '" & _ dFirstDay & "','" & _ dLastDay & "'," & _ IdCat Select Case View Case "ALL" dLastDay = Dateadd("yyyy",1,date) dFirstDay = date if IdCat = -1 then sSQL_Events = "SELECT EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" sSQL_Events = sSQL_Events & SQLCrit else sSQL_Events = "SELECT Events.EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events,EventToCats WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "')) " & _ " AND (Events.EventId=EventToCats.EventId) " & _ " AND (EventToCats.IdDepartment =" & IdCat & " )" sSQL_Events = sSQL_Events & SQLCrit end if Case "SEARCH" dLastDay = Dateadd("yyyy",1,date) dFirstDay = date SQLSearchString = Request("SQLSearchString") if IdCat = -1 then sSQL_Events = "SELECT EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" sSQL_Events = sSQL_Events & " AND vchEventName like '%" & SQLSearchString & "%' " sSQL_Events = sSQL_Events & SQLCrit else sSQL_Events = "SELECT Events.EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events,EventToCats WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" sSQL_Events = sSQL_Events & " AND vchEventName like '%" & SQLSearchString & "%' " & _ " AND (Events.EventId=EventToCats.EventId) " & _ " AND (EventToCats.IdDepartment =" & IdCat & " )" sSQL_Events = sSQL_Events & SQLCrit end if Case "ONEMONTH" if IdCat = -1 then sSQL_Events = "SELECT EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" sSQL_Events = sSQL_Events & SQLCrit else sSQL_Events = "SELECT Events.EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events,EventToCats WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" & _ " AND (Events.EventId=EventToCats.EventId) " & _ " AND (EventToCats.IdDepartment =" & IdCat & " )" sSQL_Events = sSQL_Events & SQLCrit end if Case "ONEDAY" dFirstDay = Request.QueryString("Date") dLastDay = Request.QueryString("Date") if IdCat = -1 then sSQL_Events = "SELECT EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" sSQL_Events = sSQL_Events & SQLCrit else sSQL_Events = "SELECT Events.EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events,EventToCats WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" & _ " AND (Events.EventId=EventToCats.EventId) " & _ " AND (EventToCats.IdDepartment =" & IdCat & " )" sSQL_Events = sSQL_Events & SQLCrit end if Case Else dLastDay = Dateadd("yyyy",1,date) dFirstDay = date if IdCat = -1 then sSQL_Events = "SELECT EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" sSQL_Events = sSQL_Events & SQLCrit else sSQL_Events = "SELECT Events.EventId, dtStart,dtEnd,dtStarttime,dtEndTime, vchEventName, vchLocation, vchShortEventDescription, vchItemThumbnail " & _ " FROM Events,EventToCats WHERE " & _ "((dtStart >='" & dFirstDay & "' AND dtStart <= '" & dLastDay & "') " & _ "OR " & _ "(dtEnd >='" & dFirstDay & "' AND dtEnd <= '" & dLastDay & "') " & _ "OR " & _ "(dtStart < '" & dFirstDay & "' AND dtEnd > '" & dLastDay & "'))" & _ " AND (Events.EventId=EventToCats.EventId) " & _ " AND (EventToCats.IdDepartment =" & IdCat & " )" sSQL_Events = sSQL_Events & SQLCrit end if End Select ' Open the RecordSet with a static cursor. This cursor provides bi-directional navigation Rs.Open sSQL, dbConn, adOpenStatic, adLockReadOnly, adCmdText Rs_Events.Open sSQL_Events, dbConn, adOpenStatic, adLockReadOnly, adCmdText ' Set the PageSize, CacheSize, and populate the intPageCount and ' intRecordCount variables. Rs_Events.PageSize = NumRecsPerPage ' The cachesize property sets the number of records that will be cached ' locally in memory. Rs_Events.CacheSize = Rs_Events.PageSize intPageCount = Rs_Events.PageCount intRecordCount = Rs_Events.RecordCount ' Now you must double check to make sure that you are not before the start ' or beyond end of the recordset. If you are beyond the end, set ' the current page equal to the last page of the recordset. If you are ' before the start, set the current page equal to the start of the recordset. If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount If CInt(intPage) <= 0 Then intPage = 1 ' Make sure that the recordset is not empty. If it is not, then set the ' AbsolutePage property and populate the intStart and the intFinish variables. If intRecordCount > 0 Then Rs_Events.AbsolutePage = intPage intStart = Rs_Events.AbsolutePosition If CInt(intPage) = CInt(intPageCount) Then intFinish = intRecordCount Else intFinish = intStart + (Rs_Events.PageSize - 1) End if End If Set dtStartTime = New cCTimeAMPM Set dtEndTime = New cCTimeAMPM set dbCats = server.createobject("adodb.connection") set rsCats = server.CreateObject("adodb.recordset") dbCats.open Application("ConnStr") sql = "execute sp_GetEventCats" set rsCats = dbCats.Execute(sql) %>
<% ' Set the PageSize, CacheSize, and populate the intPageCount and ' intRecordCount variables. Rs_Events.PageSize = NumRecsPerPage ' The cachesize property sets the number of records that will be cached ' locally in memory. Rs_Events.CacheSize = Rs_Events.PageSize intPageCount = Rs_Events.PageCount intRecordCount = Rs_Events.RecordCount ' Now you must double check to make sure that you are not before the start ' or beyond end of the recordset. If you are beyond the end, set ' the current page equal to the last page of the recordset. If you are ' before the start, set the current page equal to the start of the recordset. If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount If CInt(intPage) <= 0 Then intPage = 1 ' Make sure that the recordset is not empty. If it is not, then set the ' AbsolutePage property and populate the intStart and the intFinish variables. If intRecordCount > 0 Then Rs_Events.AbsolutePage = intPage intStart = Rs_Events.AbsolutePosition If CInt(intPage) = CInt(intPageCount) Then intFinish = intRecordCount Else intFinish = intStart + (Rs_Events.PageSize - 1) End if End If ' Loop through the list. If intRecordCount > 0 Then For intRecord = 1 to Rs_Events.PageSize 'do until Rs_Events.EOF %> <% if BackGroundColor = TableRowColor1 then BackGroundColor = TableRowColor2 else BackGroundColor = TableRowColor1 end if %> <% ' Move to the next row Rs_Events.MoveNext If Rs_Events.EOF Then Exit for ' Loop back 'Loop Next end if 'this is the end of the intRecordCount > 0 %>
<% if intThisYear <> YearOfLastEvent AND YearOfLastEvent <> "" then Response.Write intThisYear & " - " & YearOfLastEvent else Response.Write intThisYear end if %> Events
Event
Location
<% vchItemThumbnail = Rs_Events("vchItemThumbnail") if (vchItemThumbnail = "") or (isnull(vchItemThumbnail)) then %> " BORDER="1"> <% else %> " BORDER="0" WIDTH="108" HEIGHT="78" NAME="EventPic" USEMAP="#Eventmap<%=intRecord%>Map"> " BORDER="1"> <% end if %>

<% response.Write GetMonthFromNumber(Month(Rs_Events("dtStart"))) Response.Write " " if day(Rs_Events("dtStart")) < 10 then Response.Write "0" & day(Rs_Events("dtStart")) else Response.Write day(Rs_Events("dtStart")) end if Response.Write ", " Response.Write Year(Rs_Events("dtStart")) %> <%if Rs_Events("dtStart") <> Rs_Events("dtEnd") then%> - <% response.Write GetMonthFromNumber(Month(Rs_Events("dtEnd"))) Response.Write " " if day(Rs_Events("dtEnd")) < 10 then Response.Write "0" & day(Rs_Events("dtEnd")) else Response.Write day(Rs_Events("dtEnd")) end if Response.Write ", " Response.Write Year(Rs_Events("dtEnd")) %> <%end if%>
<% dtStartTime.CTimeToAMPM(Rs_Events("dtStartTime")) dtEndTime.CTimeToAMPM(Rs_Events("dtEndTime")) if datediff("n",dtStartTime.MyTime,dtEndTime.MyTime) > -1 then if dtStartTime.MyHour < 10 then Response.Write "" & dtStartTime.MyHour else Response.Write dtStartTime.MyHour end if Response.Write ":" if dtStartTime.MyMinutes < 10 then Response.Write dtStartTime.MyMinutes else Response.Write dtStartTime.MyMinutes end if Response.Write " " & dtStartTime.AMPM %> <%if Rs_Events("dtStartTime") <> Rs_Events("dtEndTime") then%> - <% if dtEndTime.MyHour < 10 then Response.Write "" & dtEndTime.MyHour else Response.Write dtEndTime.MyHour end if Response.Write ":" if dtEndTime.MyMinutes < 10 then Response.Write dtEndTime.MyMinutes else Response.Write dtEndTime.MyMinutes end if Response.Write " " & dtEndTime.AMPM %> <%end if%> <%end if%> ">
"><%=replace(Rs_Events("vchEventName"), "''","'")%>
<%=replace(Rs_Events("vchShortEventDescription"), "''","'")%>

<%=Rs_Events("vchLocation")%>


<% ' Check to see if the current page is greater than the first page ' in the recordset. If it is, then add a "Previous" link. If cInt(intPage) > 1 Then %> << Prev <%End IF%> <% ' You can also show page numbers: For I = 1 To intPageCount If I = cInt(intPage) Then %> <%= I %> <% Else %> <%= I %> <% End If Next %> <% ' Check to see if the current page is less than the last page ' in the recordset. If it is, then add a "Next" link. If cInt(intPage) < cInt(intPageCount) Then %> Next >> <%End If%>

Page <%=intPage%>/<%=intPageCount%>


<% ' Initialize the end of rows flag to false EndRows = False Response.Write vbCrLf ' Loop until all the rows are exhausted Do While EndRows = False ' Start a table row Response.Write " " & vbCrLf ' This is the loop for the days in the week For intLoopDay = cSUN To cSAT ' If the first day is not sunday then print the last days of previous month in grayed font If intFirstWeekDay > cSUN Then Write_TD LastMonthDate, "NON" LastMonthDate = LastMonthDate + 1 intFirstWeekDay = intFirstWeekDay - 1 ' The month starts on a sunday Else ' If the dates for the month are exhausted, start printing next month's dates ' in grayed font If intPrintDay > intLastDay Then Write_TD NextMonthDate, "NON" NextMonthDate = NextMonthDate + 1 EndRows = True Else ' If last day of the month, flag the end of the row If intPrintDay = intLastDay Then EndRows = True End If dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear) If NOT Rs.EOF Then ' Set events flag to false. This means the day has no event in it bEvents = False Do While NOT Rs.EOF AND bEvents = False ' If the date falls within the range of dates in the recordset, then ' the day has an event. Make the events flag True If dToday >= Rs("dtStart") AND dToday <= Rs("dtEnd") Then ' Print the date in a highlighted font 'DailyEventsList = MakeEventsList(Rs_Events,dToday) Write_TD " " & intPrintDay & "", "HL" 'Write_TD " " & intPrintDay & "", "HL" 'Write_TD " " & intPrintDay & "" & DailyEventsList, "HL" 'Write_TD intPrintDay & DailyEventsList, "TOP" bEvents = True ' If the Start date is greater than the date itself, there is no point ' checking other records. Exit the loop ElseIf dToday < Rs("dtStart") Then Exit Do ' Move to the next record Else Rs.MoveNext End If Loop ' Checks for that day Rs.MoveFirst End If ' If the event flag is not raise for that day, print it in a plain font If bEvents = False Then 'Write_TD "" & intPrintDay & "", "SOME" 'Write_TD " " & intPrintDay & "", "SOME" Write_TD intPrintDay , "TOP" End If End If ' Increment the date. Done once in the loop. intPrintDay = intPrintDay + 1 End If ' Move to the next day in the week Next Response.Write " " & vbCrLf Loop Rs.Close Set Rs = Nothing %>
Previous Month <%=strMonthName & " " & intThisYear%> Next Month
S M T W T F S
Go To
Related