<%@ LANGUAGE = "VBScript" %> <% Option Explicit %> <% Response.Buffer = True %> <% Response.Expires = -1 %> <% Response.CacheControl = "Public" %> <% '**************************************************************************************** '** Copyright Notice '** '** iPortalX.com '** '** Copyright 2001-2003 Drew Gauderman All Rights Reserved. '** '** This program is a paid software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may NOT use parts of this program in your own private work, and you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to iPortalX.com and powered by logo's (if any) must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** Support is for those that have purchased it. Post support questions at: - '** http://www.iportalx.com/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** support@iportalx.com '** '**************************************************************************************** Dim intCalendarCategory Dim blnBannedIP Dim strMonth Dim strYear Dim dtmDate Dim strNow Dim dtmNextMonthDate Dim dtmLastMonthDate Dim dtmNextYearDate If bannedIP() Then 'If the user is using a banned IP then set the banned IP variable to true and active member variable to false blnBannedIP = True blnActiveMember = False End If intCalendarCategory = Clng(Request.QueryString("CatID")) If intCalendarCategory = 0 Then intCalendarCategory = Clng(Request.Form("category")) strMonth = Request.Form("month") If strMonth = "" Then strMonth = Request.QueryString("Month") If strMonth = "" Then strMonth = Month(Now()) strYear = Request.Form("year") If strYear = "" Then strYear = Request.QueryString("Year") If strYear = "" Then strYear = Year(Now()) dtmDate = DateSerial(strYear, strMonth, "1") strNow = dtmDate dtmNextMonthDate = strMonth + 1 If dtmNextMonthDate = 13 Then dtmNextMonthDate = 1 dtmLastMonthDate = strMonth - 1 If dtmLastMonthDate = 0 Then dtmLastMonthDate = 12 If strMonth = 12 Then dtmNextYearDate = strYear + 1 Else dtmNextYearDate = strYear End If blnUseRightColumn = False %> <% = strWebsiteName %> - <% = strTxtCalendar %>
<% = strWebsiteName %> : <% = strTxtCalendar %> : <% = MonthName(Month(dtmDate)) %>

<% = MonthName(Month(dtmDate)) %>
<% = strTxtChooseMonth %>   <% = strTxtChooseYear %>   <% strSQL = "SELECT " & strDbTable & "CalendarCategory.* FROM " & strDbTable & "CalendarCategory;" rsCommon.Open strSQL, adoCon If NOT rsCommon.EOF Then Response.Write(vbCrLf & strTxtChooseCategory) Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") End If rsCommon.Close %>
<% Call FormatTableTitleTop(MonthName(Month(dtmDate)), "100%", 7) Response.Write(vbCrLf & " ") For intLoopCounter = intFirstDayofWeek to (intFirstDayofWeek + 6) Response.Write(vbCrLf & " " & WeekDayName(WeekDay(intLoopCounter)) & "") Next Response.Write(" ") Dim intMonthLoopCounter Dim intWeekLoopCounter For intLoopCounter = 1 to (Weekday(dtmDate) - 1) Response.Write("  ") Next DO Response.Write(" Date() Then Response.Write(strThisMonthColour) ElseIf Month(dtmDate) = Month(Now()) Then Response.Write(strThisMonthColour) Else Response.Write(strLastMonthColour) End If Response.Write(""" height=""75"" valign=""top"" class=""table"">") If dtmDate = Date() Then Response.Write("" & Day(dtmDate) & "
") Else Response.Write("" & Day(dtmDate) & "
") End If If strDatabaseType = "SQLServer" Then strSQL = "SELECT " & strDBTable & "Calendar.* FROM " & strDBTable & "Calendar " & _ "WHERE ((Author_ID = " & lngLoggedInUserID & " AND Private = 1) OR Private = 0) AND " & _ "Start_date <= '" & CDate(dtmDate) & "' AND End_date >= '" & CDate(dtmDate) & "';" Else strSQL = "SELECT " & strDBTable & "Calendar.* FROM " & strDBTable & "Calendar " & _ "WHERE ((Author_ID = " & lngLoggedInUserID & " AND Private = True) OR Private = False) AND " & _ "Start_date <= #" & CDate(dtmDate) & "# AND End_date >= #" & CDate(dtmDate) & "#;" End If rsCommon.Open strSQL, adoCon If NOT rsCommon.EOF Then DO UNTIL rsCommon.EOF Response.Write("" & rsCommon("Title") & "") rsCommon.MoveNext If NOT rsCommon.EOF Then Response.Write("
") Loop End If rsCommon.Close Response.Write("") If WeekDay(dtmDate) = 7 AND NOT DateSerial(Year(dtmDate), Month(dtmDate) + 1, 0) = dtmDate then Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") End If dtmDate = DateAdd("d", 1, dtmDate) Loop Until (Month(dtmDate) <> CInt(strMonth)) If Weekday(dtmDate) <> 1 then For intLoopCounter = Weekday(dtmDate) to 7 Response.Write(vbCrLf & "  ") Next End If dtmDate = DateSerial(strYear, strMonth, 1) %> <% Call FormatBottomTable("100%") %> <% Call FormatTopTable2("100%") %>
<% = strTxtBacktoHome %> | <% = strTxtAddANewEvent %> <% = strTxtCalendarThisMonth %> | <% = strTxtCalendarLastMonth %> | <% = strTxtCalendarNextMonth %>
<% Call FormatBottomTable("100%") %> <% Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %>