<%
dim oconn
dim ors
set oconn = server.createobject("ADODB.connection")
set ors = server.createobject("ADODB.recordset")
theid=""
theid=request("a")
if theid="" then theid="0"
oconn.open ODBCName
ors.open "Select ID, Title, Body, Active, Date from Articles order by ID", oconn
do while not ors.eof
if ors("ID")<>0 then
href="index.asp?a=" & ors("ID")
else
if theid=0 then href="index.asp#bishop" else href="index.asp"
end if
if ors("Title")<>"" and ors("Active") then
%>
<%=ors("Title") %>
(<%=ors("Date") %>)
<%
end if
ors.movenext
loop
ors.close
ors.open "select max(ID) from articles"
maxid=cint(ors(0))
ors.close
if cint(theid) > maxid then theid=0
ors.open "select * from Articles where ID=" & theid, oconn
%>
<%=ors("Title") %>
(<%=ors("Date") %>)
<%=replace(ors("Body"),vbcrlf," ") %>
<% if theid=0 then %>
Back to Home |
<% end if %>
back to top
|