|
<%
dim printmonth1(13)
printmonth1(1) = "Enero"
printmonth1(2)="Febrero"
printmonth1(3)="Marzo"
printmonth1(4)="Abril"
printmonth1(5)="Mayo"
printmonth1(6)="Junio"
printmonth1(7)="Julio"
printmonth1(8)="Agosto"
printmonth1(9)="Septiembre"
printmonth1(10)="Octubre"
printmonth1(11)="Noviembre"
printmonth1(12)="Diciembre"
%>
<%
' ---------- Page Functions ----------
Function FormatStr(String)
' Replaces a double carrige return with a paragraph break
' a single carrige return with a break rule and CHR(13) with nothing
String = Replace(String, CHR(13), "")
String = Replace(String, CHR(10) & CHR(10), " ")
String = Replace(String, CHR(10), " ")
FormatStr = String
End Function
' ---------- Page Variables ----------
Const intCharToShow = 20 ' The number of characters shown in each day
Const bolEditable = false ' If the calendar is editable or not (Can be tied into password verification)
Dim dtToday ' Today's Date
Dim dtCurrentDate ' The current date
Dim aCalendarDays(42) ' Array of possible calendar dates
Dim iFirstDayOfMonth ' The first day of the month
Dim iDaysInMonth ' The number of days in the month
Dim iColumns, iRows , iDay, iWeek ' The numer of columns and rows in the table, and counters to print them
Dim objRS ' Database Variables
Dim counter ' Loop counter
Dim strNextMonth, strPrevMonth ' The next and previous month dates
Dim dailyMsg ' The message for the day
Dim dtOnDay ' The current day being displayed by the loops
Dim strPage ' The link that each day takes you too
Dim cntEvent
' ---------- Variable Definitions ----------
dtToday = Date()
If Request("currentDate") <> "" Then
dtCurrentDate = Request("currentDate")
Else
dtCurrentDate = dtToday
End If
iFirstDayOfMonth = DatePart("w", DateSerial(Year(dtCurrentDate), Month(dtCurrentDate), 1))
iDaysInMonth = DatePart("d", DateSerial(Year(dtCurrentDate), Month(dtCurrentDate)+1, 1-1))
For counter = 1 to iDaysInMonth
aCalendarDays(counter + iFirstDayOfMonth - 1) = counter
Next
iColumns = 7
iRows = 6 - Int((42 - (iFirstDayOfMonth + iDaysInMonth)) / 7)
strPrevMonth = Server.URLEncode(DateAdd("m", -1, dtCurrentDate))
strNextMonth = Server.URLEncode(DateAdd("m", 1, dtCurrentDate))
' ---------- Drawing the Calendar ----------
%>
|