For
more info call
917-940-1692 or email to discuss how we can help you.
<%
' **************************************************************************************
' **************************************************************************************
' ** **
' ** ASP Calendar System **
' ** Digital Interchange **
' ** support@cramerdev.com **
' ** V. 5.5.0 **
' ** **
' **************************************************************************************
' ** ________________________________________________________________________________ **
' ** Copyright Notice **
' ** Digital Interchange **
' ** Copyright 2001-2004 Digital Interchange All Rights Reserved. **
' **************************************************************************************
' ** This copyright notice must remain intact and may not be removed. **
' ** This software is intellectual property and is owned by Digital Interchange and **
' ** is copyright of Digital Interchange in all countries in the world, and ownership **
' ** remains with Digital Interchange. The consumer (Licensee) is granted a **
' ** non-expiring license to use the software by Digital Interchange. The Licensee **
' ** is not allowed to distribute this source code (if released) to third parties. **
' ** Licensee is not allowed to reverse engineer, disassemble or decompile the code, **
' ** or make any modifications of the source code, remove or alter any trademark, **
' ** logo, copyright or other proprietary notices, legends, symbols, or labels in **
' ** the Software. Licensee is not allowed to sub-license the Software or any **
' ** derivative work based on or derived from the Software. It is understood by **
' ** Licensee that Digital Interchange shall not be liable for any loss or damage **
' ** that may arise, including any indirect special or consequential loss or damage **
' ** in connection with or arising from the performance or use of the software, **
' ** including fitness for any particular purpose. By using this Software, Licensee **
' ** agrees to abide by the copyright law and all other applicable laws of the **
' ** United States and the terms of this license. Licensee may be held legally **
' ** responsible for any copyright infringement that is caused or encouraged by the **
' ** Licensee's failure to abide by the terms of this license. **
' **************************************************************************************
' **************************************************************************************
%>
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
<%
Dim Events__MM_SortBy
Events__MM_SortBy = "dtStartDate"
If (Request("sortby") <> "") Then
Events__MM_SortBy = Request("sortby")
End If
%>
<%
Dim Events__MM_Orderby
Events__MM_Orderby = "ASC"
If (Request("ordering") <> "") Then
Events__MM_Orderby = Request("ordering")
End If
%>
<%
if rsConfiguration("bAllowMultipleCalendars") then
if Request("intDivisionID") <> "" then
Session("DivisionID") = request("intDivisionID")
else
if(isEmpty(Session("DivisionID"))) then
if(not isNull(rsConfiguration("intDefaultDivision")))then
Session("DivisionID") = rsConfiguration("intDefaultDivision")
else
Session("DivisionID") = 0
end if
end if
end if
if(Session("DivisionID") <> 0)then
Where_Clause = "intDivisionID = " & Session("DivisionID") & " AND intInstallationID = " & Session("intInstallationID") & " "
end if
else
Session("DivisionID") = "0"
end if
%>
<%
'07/11/04
'Added intIntallationID filter
Dim Events__MM_WhereClause
Events__MM_WhereClause = "WHERE intInstallationID = " & Session("intInstallationID") & " AND bApproved <>0"
If (Where_Clause <> "") Then
Events__MM_WhereClause = Events__MM_WhereClause & " AND " & Where_Clause
End If
%>
<%
Dim Events
Dim Events_numRows
Set Events = Server.CreateObject("ADODB.Recordset")
Events.ActiveConnection = MM_calendar_STRING
'07/11/04
'Added intIntallationID filter
Events.Source = "SELECT * FROM (SELECT vcLocation, intEventType, Calendar.CalendarID, dtdate as dtStartDate, dtDate as dtEndDate, stTitle, 'One Time Event' as vcFrequency, vcCity, vcState, intInstallationID FROM (Calendar INNER JOIN Calendar_Events ON Calendar.CalendarID = Calendar_Events.CalendarID) LEFT JOIN Calendar_Type on Calendar.intEventType = Calendar_Type.typeID " + Events__MM_WhereClause + " UNION SELECT vcLocation, intEventType, Calendar.CalendarID, dtStartDate, dtEndDate, stTitle, vcRecurDesc as vcFrequency, vcCity, vcState, intInstallationID FROM (Calendar INNER JOIN Calendar_Recurring_Events ON Calendar.CalendarID = Calendar_Recurring_Events.CalendarID) LEFT JOIN Calendar_Recurring_Events_Type on Calendar_Recurring_Events.intRecurType = Calendar_Recurring_Events_Type.intRecurTypeID " + Replace(Events__MM_WhereClause, "'","''") + ") AllEvents WHERE (datediff(" & GetDateDiffParameter("d",validateNumber(Session("DICalendar.iDBType"),DI_CALENDAR_DB_MSACCESS)) & ",dtStartDate,'" & date & "') <= 0 or datediff(" & GetDateDiffParameter("d",validateNumber(Session("DICalendar.iDBType"),DI_CALENDAR_DB_MSACCESS)) & ",dtEndDate,'" & date & "') <= 0) AND intInstallationID = " & Session("intInstallationID") & " ORDER BY " + Replace(Events__MM_SortBy, "'","''") + " " + Replace(Events__MM_Orderby, "'","''") + ""
'Response.Write(Events.Source)
'Old Query
'Events.Source = "SELECT * FROM (SELECT vcLocation, intEventType, Calendar.CalendarID, dtdate as dtStartDate, dtDate as dtEndDate, stTitle, stDesc as vcFrequency, vcCity, vcState FROM (Calendar INNER JOIN Calendar_Events ON Calendar.CalendarID = Calendar_Events.CalendarID) INNER JOIN Calendar_Type on Calendar.intEventType = Calendar_Type.typeID " + Events__MM_WhereClause + " UNION SELECT vcLocation, intEventType, Calendar.CalendarID, dtStartDate, dtEndDate, stTitle, vcRecurDesc as vcFrequency, vcCity, vcState FROM (Calendar INNER JOIN Calendar_Recurring_Events ON Calendar.CalendarID = Calendar_Recurring_Events.CalendarID) INNER JOIN Calendar_Recurring_Events_Type on Calendar_Recurring_Events.intRecurType = Calendar_Recurring_Events_Type.intRecurTypeID " + Replace(Events__MM_WhereClause, "'","''") + ") AllEvents WHERE (dtStartDate >= "&vcDateEscapeChar & date &vcDateEscapeChar&" or dtEndDate >= "&vcDateEscapeChar& date &vcDateEscapeChar& ") ORDER BY " + Replace(Events__MM_SortBy, "'","''") + " " + Replace(Events__MM_Orderby, "'","''") + ""
Events.CursorType = 0
Events.CursorLocation = 2
Events.LockType = 1
Events.Open()
Events_numRows = 0
%>
<%
Dim Division__MM_WhereClause
Division__MM_WhereClause = ""
If (Where_Clause <> "") Then
Division__MM_WhereClause = "WHERE intInstallationID = " & Session("intInstallationID") & " AND " & Where_Clause
End If
%>
<%
Dim Division
Dim Division_numRows
Set Division = Server.CreateObject("ADODB.Recordset")
Division.ActiveConnection = MM_calendar_STRING
Division.Source = "SELECT * FROM Calendar_Divisions " + Replace(Division__MM_WhereClause, "'","''") + ""
Division.CursorType = 0
Division.CursorLocation = 2
Division.LockType = 1
Division.Open()
Division_numRows = 0
%>
<%
Dim Divisions
Dim Divisions_numRows
Set Divisions = Server.CreateObject("ADODB.Recordset")
Divisions.ActiveConnection = MM_calendar_STRING
Divisions.Source = "SELECT * FROM Calendar_Divisions WHERE intInstallationID = " & Session("intInstallationID")
Divisions.CursorType = 0
Divisions.CursorLocation = 2
Divisions.LockType = 1
Divisions.Open()
Divisions_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Events_numRows = Events_numRows + Repeat1__numRows
%>
<% if rsConfiguration("bAllowMultipleCalendars") then %>
<% end if %>
<% If Events.EOF And Events.BOF Then %>
No Events Currently Listed
<% End If ' end Events.EOF And Events.BOF %>
<%
While ((Repeat1__numRows <> 0) AND (NOT Events.EOF))
%>
<%
Select Case CINT(Events("intEventType"))
Case 1: vcViewURL = "view_event.asp?CalendarID="&(Events.Fields.Item("CalendarID").Value)
Case 2: vcViewURL = "view_recurring_event.asp?CalendarID="&(Events.Fields.Item("CalendarID").Value)
Case 3: vcViewURL = "view_recurring_event.asp?CalendarID="&(Events.Fields.Item("CalendarID").Value)
Case else: vcViewURL = "#"
End Select
%>