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]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
<% if Request("Submit") <> "" then
if(request("dtStartDate") <> "Any" or request("dtStartDate") <> "") then
Dim strSQL
Dim EventSQL
Dim RecurringSQL
RecurringSQL = "WHERE Calendar.intInstallationID = " & Session("intInstallationID") & " AND bApproved <> 0 "
EventSQL = " WHERE Calendar.intInstallationID = " & Session("intInstallationID") & " AND bApproved <> 0 "
if(isDate(Request("dtStartDate")))then
RecurringSQL = RecurringSQL & " AND "& vcDateEscapeChar & Request("dtStartDate") &vcDateEscapeChar&" <= dtEndDate"
EventSQL = EventSQL & " AND "& vcDateEscapeChar & Request("dtStartDate") &vcDateEscapeChar&" <= dtDate"
else
bSDateErr=true
end if
end if
if(request("dtEndDate") <> "Any" or request("dtEndDate") <> "") then
if(isDate(Request("dtEndDate")))then
RecurringSQL = RecurringSQL & " AND "& vcDateEscapeChar & Request("dtEndDate") &vcDateEscapeChar&" >= dtStartDate"
EventSQL = EventSQL & " AND "& vcDateEscapeChar & Request("dtEndDate") &vcDateEscapeChar&" >= dtDate"
else
bEDateErr=true
end if
end if
if(request("vcLocation") <> "")then
RecurringSQL = RecurringSQL & " AND ((vcLocation LIKE '%" & replace(Request("vcLocation"),"'","''") & "%' OR vcLocation LIKE '" & replace(Request("vcLocation"),"'","''") & "%' OR vcLocation LIKE '%" & replace(Request("vcLocation"),"'","''") & "' OR vcLocation = '" & replace(Request("vcLocation"),"'","''") & "') OR (vcCity LIKE '%" & replace(Request("vcLocation"),"'","''") & "%' OR vcCity LIKE '" & replace(Request("vcLocation"),"'","''") & "%' OR vcCity LIKE '%" & replace(Request("vcLocation"),"'","''") & "' OR vcCity = '" & replace(Request("vcLocation"),"'","''") & "') OR (vcState LIKE '%" & replace(Request("vcLocation"),"'","''") & "%' OR vcState LIKE '" & replace(Request("vcLocation"),"'","''") & "%' OR vcState LIKE '%" & replace(Request("vcLocation"),"'","''") & "' OR vcState = '" & replace(Request("vcLocation"),"'","''") & "'))"
EventSQL = EventSQL & " AND ((vcLocation LIKE '%" & replace(Request("vcLocation"),"'","''") & "%' OR vcLocation LIKE '" & replace(Request("vcLocation"),"'","''") & "%' OR vcLocation LIKE '%" & replace(Request("vcLocation"),"'","''") & "' OR vcLocation = '" & replace(Request("vcLocation"),"'","''") & "') OR (vcCity LIKE '%" & replace(Request("vcLocation"),"'","''") & "%' OR vcCity LIKE '" & replace(Request("vcLocation"),"'","''") & "%' OR vcCity LIKE '%" & replace(Request("vcLocation"),"'","''") & "' OR vcCity = '" & replace(Request("vcLocation"),"'","''") & "') OR (vcState LIKE '%" & replace(Request("vcLocation"),"'","''") & "%' OR vcState LIKE '" & replace(Request("vcLocation"),"'","''") & "%' OR vcState LIKE '%" & replace(Request("vcLocation"),"'","''") & "' OR vcState = '" & replace(Request("vcLocation"),"'","''") & "'))"
end if
if(request("vcTopic") <> "")then
RecurringSQL = RecurringSQL & " AND (vcTopic LIKE '%" & replace(Request("vcTopic"),"'","''") & "%' OR vcTopic LIKE '" & replace(Request("vcTopic"),"'","''") & "%' OR vcTopic LIKE '%" & replace(Request("vcTopic"),"'","''") & "' OR vcTopic = '" & replace(Request("vcTopic"),"'","''") & "')"
EventSQL = EventSQL & " AND (vcTopic LIKE '%" & replace(Request("vcTopic"),"'","''") & "%' OR vcTopic LIKE '" & replace(Request("vcTopic"),"'","''") & "%' OR vcTopic LIKE '%" & replace(Request("vcTopic"),"'","''") & "' OR vcTopic = '" & replace(Request("vcTopic"),"'","''") & "')"
end if
if(request("stTitle") <> "") then
RecurringSQL = RecurringSQL & " AND (stTitle LIKE '%" & replace(Request("stTitle"),"'","''") & "%' OR stTitle LIKE '" & replace(Request("stTitle"),"'","''") & "%' OR stTitle LIKE '%" & replace(Request("stTitle"),"'","''") & "' OR stTitle = '" & replace(Request("stTitle"),"'","''") & "')"
EventSQL = EventSQL & " AND (stTitle LIKE '%" & replace(Request("stTitle"),"'","''") & "%' OR stTitle LIKE '" & replace(Request("stTitle"),"'","''") & "%' OR stTitle LIKE '%" & replace(Request("stTitle"),"'","''") & "' OR stTitle = '" & replace(Request("stTitle"),"'","''") & "')"
end if
strSQL = "(SELECT vcLocation, intEventType, Calendar.CalendarID, dtdate as dtStartDate, dtDate as dtEndDate, stTitle, stDesc as vcFrequency, vcCity, vcState, vcTopic FROM ((Calendar INNER JOIN Calendar_Events ON Calendar.CalendarID = Calendar_Events.CalendarID) LEFT JOIN Calendar_Type on Calendar.intEventType = Calendar_Type.typeID) LEFT JOIN Calendar_Topics ON Calendar.intTopic = Calendar_Topics.intTopic " + EventSQL + " UNION SELECT vcLocation, intEventType, Calendar.CalendarID, dtStartDate, dtEndDate, stTitle, vcRecurDesc as vcFrequency, vcCity, vcState, vcTopic 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) LEFT JOIN Calendar_Topics ON Calendar.intTopic = Calendar_Topics.intTopic " + RecurringSQL + ") ALLEVENTS"
Dim SearchResults__MM_SQL
SearchResults__MM_SQL = "SELECT * FROM Calendar WHERE Calendar.intInstallationID = " & Session("intInstallationID")
If (strSQL <> "") Then
SearchResults__MM_SQL = strSQL
End If
%>
<%
Dim SearchResults
Dim SearchResults_numRows
Set SearchResults = Server.CreateObject("ADODB.Recordset")
SearchResults.ActiveConnection = MM_calendar_STRING
SearchResults.Source = "Select * FROM " + SearchResults__MM_SQL
SearchResults.CursorType = 0
SearchResults.CursorLocation = 2
SearchResults.LockType = 1
SearchResults.Open()
SearchResults_numRows = 0
end if
%>
Event Title
Date Range
to
Location
Topic
<%if Request("Submit") = "Search" then %>
<% if SearchResults.EOF and SearchResults.BOF then %>
No Events Found
<% end if %>
<% While not SearchResults.EOF %>
<%
Select Case CINT(SearchResults("intEventType"))
Case 1: vcViewURL = "view_event.asp?CalendarID="&(SearchResults.Fields.Item("CalendarID").Value)
Case 2: vcViewURL = "view_recurring_event.asp?CalendarID="&(SearchResults.Fields.Item("CalendarID").Value)
Case 3: vcViewURL = "view_recurring_event.asp?CalendarID="&(SearchResults.Fields.Item("CalendarID").Value)
Case else: vcViewURL = "#"
End Select
%>