NROTC – Events Detail Page

Upcoming Events Details

<%
if (request.QueryString("item") = "") then
response.write "item id missing"
%>

Search:
Date:      
Title: Description:

<%
'on error goto 0
dim arrMyData
dim objPagedList
Set objPagedList = New PagedList
With objPagedList
.dbConnection=Application("strSiteDBCnn")
.formName = "pickList"
'response.write listSQL()
.sql = listSQL()
.getPage()
.writePageNavJavascript()
Response.Write "

” & vbCRLF
Response.Write “
” & vbCRLF
Response.Write ”

” & vbCRLF
Response.Write “

” & vbCRLF
Response.Write “

” & .totalRecords & ” Item”
If .totalRecords <> 1 Then Response.Write “s”
Response.Write ” found ”
Response.Write “


Response.Write “

” & vbCRLF
.writePageNavBar()
.writePageNavHiddenFields()
arrMyData = .listArray
Call resultsBlock(arrMyData)
.writePageNavBar()
Response.Write “

” & vbCRLF
Response.Write “

” & vbCRLF
End With

Set objPagedList = Nothing
‘Set objFormField = Nothing

Else ‘itemid passed in querystring as “item”, display the event
Dim objItem : Set objItem = New dbChannelItem
With objItem
.ItemID = Request(“item”)
If .loadFromDB() Then
Response.Write “

” & .Title & “

” & vbCrLf
If .StartDateTime > “” Then
Response.Write “


Response.Write formatdatetime(.StartDateTime,1)
If .StopDateTime > “” Then Response.Write ” – ” & formatdatetime(.StopDateTime,1)
Response.Write “

” & vbCrLf
End If
If .CustomVC256_1 > “” Then
Dim regEx, image
Set regEx = New RegExp
regEx.Pattern = “.*]*src=”"([^""]*)”"[^>]*>.*”
regEx.IgnoreCase = True
image = regEx.Replace(.CustomVC256_1, “$1″) ‘ Make replacement.
Response.Write “

If .CustomVC128_1 > “” Then
Response.Write ” alt=”"” & .CustomVC128_1 & “”"”
Else
Response.Write ” alt=”"” & .title & “”"”
End If
Response.Write ” align=”"left”">

” & vbCrLf
End If
If .Subtitle > “” Then Response.Write “

” & .Subtitle & “

” & vbCrLf
If .RelatedURL > “” Then Response.Write “

Related URL: If .RelatedURL > “” and .RelatedURLPopWin <> 0 then Response.write ” target=”"_blank”"”
If .RelatedURL > “” Then Response.Write “>” & .RelatedURL & “

” & vbCrLf
If .Teasertext > “” Then Response.Write “

” & .Teasertext & “

” & vbCRLF
If .Content > “” Then Response.Write “

” & .Content & “

” & vbCrLf
Else
Response.Write “

Item not found.

” & vbCrLf
End If
End With
Set objItem = Nothing
response.write “

” & vbCRLF
End If

Function listSQL()
Dim sql, strDate, formattedDate
Dim arrSearchContent, searchProcess, searchFName
sql = “SELECT Title, dbo.channel.DetailURL, StartDateTime, ItemId ” &_
“FROM ChannelData ” &_
“Inner Join Channel on ChannelData.ChannelID = Channel.ChannelID ” &_
“WHERE ChannelData.Status = 1 AND ChannelData.ChannelID = ‘{4DDA124D-09F9-4D42-BE51-46D9B4A56255}’ ”
if not request.form(“datestart”) = “” then
strDate = request.form(“datestart”)
if isDate(strDate) then
formattedDate = cdate(strDate)

if not request.form(“datestart”) = “” then
sql = sql & “AND DatePart(mm, StartDateTime) >= ‘” & month(formattedDate) & “‘ ”
sql = sql & “AND DatePart(dd, StartDateTime) >= ‘” & day(formattedDate) & “‘ ”
sql = sql & “AND DatePart(yyyy, StartDateTime) >= ‘” & year(formattedDate) & “‘”
end if
Else
if strDate > “” then response.write “Invalid start date entered
End If
End If
if not request.form(“dateend”) = “” then
strDate = request.form(“dateend”)
if isDate(strDate) then
formattedDate = cdate(strDate)

if not request.form(“dateend”) = “” then
sql = sql & “AND DatePart(mm, StartDateTime) <= '" & month(formattedDate) & "' "
sql = sql & "AND DatePart(dd, StartDateTime) <= '" & day(formattedDate) & "' "
sql = sql & "AND DatePart(yyyy, StartDateTime) <= '" & year(formattedDate) & "'"
end if
Else
if strDate > “” then response.write “Invalid end date entered
End If
End If

if not request.form(“newstitle”) = “” then
sql = sql & ” AND Title LIKE ‘%” & request.form(“newstitle”) & “%’”
end if
if not request.form(“newscontent”) = “” then
sql = sql & ” AND Content LIKE ‘%” & request.form(“newscontent”) & “%’”
end if
sql = sql & ” ORDER BY StartDateTime DESC”

‘response.write sql
‘response.end
listSQL = sql
End Function
Sub resultsBlock(listData)
Dim i, numRecs
With Response
.Write “

” & vbCRLF
.Write ”
” & vbCRLF
.Write ”

” & vbCRLF
.Write ”

” & vbCRLF
‘.Write ”

” & vbCRLF
.Write ”

” & vbCRLF
If IsArray(listData) Then
numRecs = UBound(listData,2)
For i=0 To numRecs
.Write ”
If i Mod 2 Then .Write " bgColor=""#cccccc"""
.Write ">” & vbCRLF
.Write ”

” & vbCRLF ‘date released
.Write ”

” & vbCRLF ‘title
‘.Write ”

” & vbCRLF ‘subtitle
.Write ”

” & vbCRLF
Next
Else
.Write ”

” & vbCRLF
End If
.Write “

Date of Event Title Subtitle
” & FormatDateTime(listData(2,i), 2) & ” ” & listData(0,i) & “ ” & listData(1,i) & ”
Nothing to work with! No documents found.

” & vbCRLF
End With
End Sub

%>

Was this information helpful? Provide Feedback or report broken links.