 |
|
 |
| View/Edit Event |
 |
<%
orderBy = request.querystring("orderby")
SearchWhere = request("SearchWhere")
SearchFor = request("SearchFor")
If (SearchWhere = "All") Then
SQL_SearchWhere = "(Event_Name LIKE ('%" & SearchFor & "%') OR Date LIKE ('%" & SearchFor & "%') OR Location LIKE ('%" & SearchFor & "%') OR Category LIKE ('%" & SearchFor & "%'))"
Else
SQL_SearchWhere = SearchWhere & " LIKE ('%" & SearchFor & "%')"
End If
If NOT (SearchFor = "") Then
SQL_SearchFor = " WHERE " & SQL_SearchWhere
Else
SQL_SearchFor = ""
End If
If orderBy = "Event_Name_Up" Then
SQL_OrderBy = " ORDER BY Event_Name DESC"
ElseIf orderBy = "Event_Name_Down" Then
SQL_OrderBy = " ORDER BY Event_Name"
ElseIf orderBy = "Date_Up" Then
SQL_OrderBy = " ORDER BY Date DESC"
ElseIf orderBy = "Date_Down" Then
SQL_OrderBy = " ORDER BY Date"
ElseIf orderBy = "Location_Up" Then
SQL_OrderBy = " ORDER BY Location DESC"
ElseIf orderBy = "Location_Down" Then
SQL_OrderBy = " ORDER BY Location"
ElseIf orderBy = "Category_Up" Then
SQL_OrderBy = " ORDER BY Category DESC"
ElseIf orderBy = "Category_Down" Then
SQL_OrderBy = " ORDER BY Category"
Else
orderBy = "Date_Down"
SQL_OrderBy = " ORDER BY Date"
End If
SQL = "SELECT * FROM Events" & SQL_SearchFor & SQL_OrderBy
%>
<%
Set RS = Server.CreateObject("ADODB.Recordset")
Dim colorchanger
Dim color1
Dim color2
colorchanger = 0
color1 = "#C5D3E7"
color2 = "#B0C4DE"
dim intPage
dim intPageCount
dim intRecordCount
If Request.QueryString("page") = "" Then
intPage = 1
Else
intPage = Request.QueryString("page")
End If
RS.CursorLocation = 3
RS.CursorType = 3
RS.ActiveConnection = Conn
RS.Open SQL, Conn, 1, 3
RS.PageSize = 20
RS.CacheSize = RS.PageSize
intPageCount = RS.PageCount
intRecordCount = RS.RecordCount
If NOT (RS.BOF AND RS.EOF) Then
%>
<%End If
Else
If (SearchFor = "") Then%>
There are currently no events.
<%Else%>
There are currently no events that match your search.
<%End If
End If
RS.close
Set RS = Nothing
%>
|
|
 |