%
Philanthropic = "-over"
'Get number of events, If more than one set link to archives
sqltext = "SELECT Count(id) as NumOfEvents FROM ComInv"
rs.open sqltext,conn
if not rs.bof then
NumOfEvents = cdbl(rs("NumOfEvents"))
if NumOfEvents > 1 then
ArchivesLink = " | Previous Community Service"
end if
end if
rs.close
'Get current archive info
id = request.querystring("id")
if not isEmpty(request.querystring("id")) then
'Display selected event
sqltext = "SELECT * FROM ComInv WHERE id = " & id
rs.open sqltext,conn
if not rs.bof then
Summary = trim(rs("summary"))
if len(Summary) > 0 then Summary = replace(Summary,vbCrLf,"
")
EventCopy = "" & rs("header") & "
" & _
Summary
end if
rs.close
else
'Display list of events
sqltext = "SELECT * FROM ComInv ORDER BY id DESC"
rs.open sqltext,conn
if not rs.bof then
Do While not rs.eof
EventCopy = EventCopy & "" & rs("header") & "
"
rs.MoveNext
Loop
end if
rs.close
end if
'Create filename based on the event id number if main image.
Filename = "event" & id
'Get the path of images
'Set upl = Server.CreateObject("SoftArtisans.FileUp")
'thePath = server.mappath("default.asp")
'thePath = left(thePath,len(thePath)-18) & "\images\cominv\"
'TempVar = "'"
'response.write thePath
'Get the existing file
'MyFile = Filename & ".gif"
'Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")
'if fsoObject.FileExists(thePath & myfile) then
'use gif
' ImageFile = myfile
' ImageFile = ""
'else
'use jpg
' ImageFile = filename & ".jpg"
' if fsoObject.FileExists(thePath & ImageFile) then
' ImageFile = "
"
' else
' ImageFile = ""
' end if
'end if
conn.close
%>
| Philanthropic | |