%@ Language=VBScript %>
<%option explicit
dim colorScheme : colorScheme = "blue"
dim pageTitle : pageTitle = "title_calendar.gif"
dim thisMonth : thisMonth = MonthName(Month(sDate), true) & Right("0" & Year(sDate), 2)
'dim thisWeek : thisWeek = "week_1"
%>
<%
dim numEvents
dim curEvent
dim oConn
dim oCmd
dim oRs
dim isAdmin: isAdmin = true
dim iOrigDayOfWeek
dim iDayOfWeek
dim sCurDate
dim allDayEvents
dim rowspan
dim dDate
dim sTime
dim sMonth
dim sStartDate
dim sEndDate
dim aDateTitles(7)
dim aDateIcons(7)
dim i
dim iCurDate
Dim dMinDate : dMinDate = "1/1/2003"
Dim dMaxDate : dMaxDate = "12/26/" & CStr(Year(date()) + 2)
dim sDate: sDate = Request.Item("date")
if sDate = "" then
sDate = date
end if
dim iCatId: iCatId = -1
If IsNumeric(Request.Item("category_id")) And Request.Item("category_id") <> "" Then
iCatId = CInt(Request.Item("category_id"))
Response.Cookies("category_id") = Request.Item("category_id")
ElseIf IsNumeric(Request.Cookies("category_id")) And Request.Cookies("category_id") <> "" Then
iCatId = CInt(Request.Cookies("category_id"))
End If
'Calculate start and end days of the week and use it for the Header.
sStartDate = DateAdd("D", 0 - (WeekDay(sDate) - 1), sDate)
sEndDate = DateAdd("D", 0 - (WeekDay(sDate) - 7), sDate)
%>
<%'=sWeekDayName(WeekDay(sStartDate) - 1) & ", " & MonthName(Month(sStartDate)) & " " & Day(sStartDate) & sDateAbbrev(Day(sStartDate) - 1) %>
<%'=sWeekDayName(WeekDay(sEndDate) - 1) & ", " & MonthName(Month(sEndDate)) & " " & Day(sEndDate) & sDateAbbrev(Day(sEndDate) - 1) %>
|
|
||||
|
<% if datediff("d", dMinDate, DateAdd("D", 0 - (WeekDay(dateadd("WW", -1, sDate)) - 7), sDate)) > 7 then %>
">
|
<% if datediff("d", dMaxDate, DateAdd("D", 0 - (WeekDay(dateadd("WW", 1, sDate)) - 9), sDate)) <= 0 then %>
">
<% else %>
<% else %>
|
<%renderMiniCalendar sDate, 0, isAdmin, true%>
<%
'Create the command object to return the reports
set oConn = Server.CreateObject("ADODB.Connection")
with oConn
.ConnectionString = Application("ConnString")
.Open
end with
%>
|
||
|
">
<%=sWeekDayName(WeekDay(sCurDate) - 1) & ", " & MonthName(Month(sCurDate)) & " " & Day(sCurDate) & sDateAbbrev(Day(sCurDate) - 1) %>
<% if not .EOF then
if len(aDateTitles(iDayOfWeek - 1)) > 0 then
Response.Write " (" & aDateTitles(iDayOfWeek - 1) & ")"
end if
end if
if not .EOF then
if len(aDateIcons(iDayOfWeek - 1)) > 0 then
Response.Write " |
<%=HebrewDate(sCurDate)%> | ||
|---|---|---|---|
| <%=sTime%> |
<% if len(aEvents(2,0)) > 0 then
Response.Write " |
|
<%=allDayEvents%> |
| <%=sTime%> |
<% if len(aEvents(2,curEvent)) > 0 then
Response.Write " |
||