<%@ 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 '** '**************************************************************************************** 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 Dim dtmEventDate dtmEventDate = CDate(Request.QueryString("Date")) %> <% = strTxtEvents %>
<% = strWebsiteName %> : <% = strTxtCalendar %> : <% = strTxtEvents %>

<% If strDatabaseType = "SQLServer" Then strSQL = "SELECT " & strDBTable & "Calendar.*, " & strDBTable & "Author.Username FROM " & strDBTable & "Calendar " & _ "LEFT JOIN " & strDBTable & "Author ON " & strDBTable & "Calendar.Author_ID = " & strDBTable & "Author.Author_ID " & _ "WHERE ((" & strDBTable & "Calendar.Author_ID = " & lngLoggedInUserID & " AND Private = " & CBoolConvert(1) & ") OR Private = " & CBoolConvert(0) & ") AND " & _ "(Start_date <= '" & dtmEventDate & "' AND End_date >= '" & dtmEventDate & "')" Else strSQL = "SELECT " & strDBTable & "Calendar.*, " & strDBTable & "Author.Username FROM " & strDBTable & "Calendar " & _ "LEFT JOIN " & strDBTable & "Author ON " & strDBTable & "Calendar.Author_ID = " & strDBTable & "Author.Author_ID " & _ "WHERE ((" & strDBTable & "Calendar.Author_ID = " & lngLoggedInUserID & " AND Private = " & CBoolConvert(1) & ") OR Private = " & CBoolConvert(0) & ") AND " & _ "(Start_date <= #" & dtmEventDate & "# AND End_date >= #" & dtmEventDate & "#)" End If rsCommon.Open strSQL, adoCon If rsCommon.EOF Then Call FormatTableTitleTop("No Event", "100%", 1) Response.Write(vbCrLf & " ") Response.Write(vbCrLf & "
Sorry there is no event for " & FormatDateTime(dtmEventDate, 2) & "

") Response.Write(vbCrLf & " ") Call FormatBottomTable("100%") Else Do UNTIL rsCommon.EOF Dim intEventID Dim strEventTitle Dim strEvent Dim intEventAuthorID Dim strEventAuthor Dim dtmEventStart Dim dtmEventEnd intEventID = rsCommon("Event_ID") strEventTitle = rsCommon("Title") strEvent = rsCommon("Message") intEventAuthorID = Clng(rsCommon("Author_ID")) strEventAuthor = rsCommon("Username") dtmEventStart = rsCommon("Start_date") dtmEventEnd = rsCommon("End_date") Call FormatTableTitleTop(strEventTitle, "100%", 1) %> <% = strTxtPostedBy %> <% = rsCommon("Username") %> <% If dtmEventStart <> dtmEventEnd Then Response.Write("") %>
<% = strEvent %>

Scheduled for " & FormatDateTime(dtmEventStart, 1) & " until " & FormatDateTime(dtmEventEnd, 1) & "
<% If (blnAdmin = True OR blnModerator = True) OR intEventAuthorID = lngLoggedInUserID Then %> <% = strTxtEditEvent %> | <% = strTxtDeleteEvent %> | <% End If %> <% = strTxtAddToFavorites %>
<% Call FormatBottomTable("100%") rsCommon.Movenext If NOT rsCommon.EOF Then Response.Write("
") Loop End If rsCommon.Close Call FormatTopTable2("100%") %>
<% = strTxtAddANewEvent %> <% = strTxtBacktoHome %> | <% = strTxtBackToCalendar %>
<% Call FormatBottomTable("100%") Call FormatTableTitleTop("More Events:", "100%", 2) Response.Write(vbCrLf & " ") Response.Write(vbCrLf & "  " & strTxtNewlyAddedEvents & "") Response.Write(vbCrLf & "  " & strTxtUpcomingEvents & "") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") strSQL = "SELECT TOP 5 " & strDBTable & "Calendar.Start_date, " & strDBTable & "Calendar.End_date, " & strDBTable & "Calendar.Title FROM " & strDBTable & "Calendar " & _ "WHERE (" & strDBTable & "Calendar.Private = " & CBoolConvert(1) & " AND " & strDBTable & "Calendar.Author_ID = " & lngLoggedInUserID & ") OR " & strDBTable & "Calendar.Private = " & CBoolConvert(0) & " " & _ "ORDER BY " & strDBTable & "Calendar.Event_ID DESC;" rsCommon.Open strSQL, adoCon If rsCommon.EOF Then Response.Write(vbCrLf & "

" & strTxtNoEvents & "

") Else Response.Write(vbCrLf & "
") Response.Write(vbCrLf & " ") DO UNTIL rsCommon.EOF dtmEventStart = CDate(rsCommon("Start_date")) dtmEventEnd = CDate(rsCommon("End_date")) Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") rsCommon.Movenext Loop Response.Write(vbCrLf & "
") Response.Write(vbCrLf & " " & rsCommon("Title") & "
") If dtmEventStart = dtmEventEnd Then Response.Write(vbCrLf & " " & FormatDateTime(dtmEventStart, 1) & "") Else Response.Write(vbCrLf & " " & FormatDateTime(dtmEventStart, 1) & " - " & FormatDateTime(dtmEventEnd, 1) & "") End If Response.Write(vbCrLf & "
") End If rsCommon.Close Response.Write(vbCrLf & "
") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") If strDatabaseType = "SQLServer" Then strSQL = "SELECT TOP 5 " & strDBTable & "Calendar.Start_date, " & strDBTable & "Calendar.End_date, " & strDBTable & "Calendar.Title FROM " & strDBTable & "Calendar " & _ "WHERE (" & strDBTable & "Calendar.Private = " & CBoolConvert(1) & " AND " & strDBTable & "Calendar.Author_ID = " & lngLoggedInUserID & ") OR " & strDBTable & "Calendar.Private = " & CBoolConvert(0) & " " & _ "AND End_date >= " & strDatabaseDateFunction & " " & _ "ORDER BY " & strDBTable & "Calendar.Start_date ASC;" Else strSQL = "SELECT TOP 5 " & strDBTable & "Calendar.Start_date, " & strDBTable & "Calendar.End_date, " & strDBTable & "Calendar.Title FROM " & strDBTable & "Calendar " & _ "WHERE (" & strDBTable & "Calendar.Private = " & CBoolConvert(1) & " AND " & strDBTable & "Calendar.Author_ID = " & lngLoggedInUserID & ") OR " & strDBTable & "Calendar.Private = " & CBoolConvert(0) & " " & _ "AND End_date >= " & strDatabaseDateFunction & " " & _ "ORDER BY " & strDBTable & "Calendar.Start_date ASC;" End If rsCommon.Open strSQL, adoCon If rsCommon.EOF Then Response.Write(vbCrLf & "

" & strTxtNoEvents & "

") Else Response.Write(vbCrLf & "
") Response.Write(vbCrLf & " ") DO Until rsCommon.EOF dtmEventStart = CDate(rsCommon("Start_date")) dtmEventEnd = CDate(rsCommon("End_date")) Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") rsCommon.Movenext Loop Response.Write(vbCrLf & "
" & rsCommon("Title") & "
") If dtmEventStart = dtmEventEnd Then Response.Write(vbCrLf & " " & FormatDateTime(dtmEventStart, 1) & "") Else Response.Write(vbCrLf & " " & FormatDateTime(dtmEventStart, 1) & " - " & FormatDateTime(dtmEventEnd, 1) & "") End If Response.Write(vbCrLf & "
") End If rsCommon.Close Response.Write(vbCrLf & "
") Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " ") Call FormatBottomTable("100%") %> <% Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %>