More Articles...
<%
sub ShowLinks(pic, link, filename, linktitle)
if linktitle = "" then linktitle = "Related Link"
if link <> "" and filename <> "" then
if instr(lcase(filename),".jpg") or instr(lcase(filename),".gif") then
%>
<%=linktitle %>
<%
else
%>
<%=linktitle %>
Related File
<%
end if
elseif link <> "" then%>
<%=linktitle %>
<%
elseif filename <> "" then
if instr(lcase(filename),".jpg") or instr(lcase(filename),".gif") then
%>
<%
else
%>
Related File
<%
end if
else
end if
end sub
sub ShowPic(pic, link, filename, linktitle)
if pic <> "" then
%>
<%
end if
end sub
sub ShowArticle(s)
dim conn, rs
set conn = server.createobject("adodb.connection")
set rs = server.createobject("adodb.recordset")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../fpdb/news.mdb")
rs.open "select * from news where active=true and id = "&s &" order by ID desc", conn
do while not rs.eof
id=rs("id")
title=rs("title")&""
newsdate=rs("newsdate")&""
filename=rs("filename")&""
link = rs("link") &""
linktitle = rs("linktitle")&""
fulltext=replace(rs("fulltext")&"",chr(13)," ")
pic = rs("pic") &""
align = rs("align")
if not isnumeric(align) then
align=0
end if
select case align
case 0
%>
<%=title%> <%=newsdate%>
|
<% ShowPic pic, link, filename, linktitle %>
|
<%=fulltext%>
<% ShowLinks pic, link, filename, linktitle %>
|
<%
case 1
%>
<%=title%> <%=newsdate%>
|
<%=fulltext%>
<% ShowLinks pic, link, filename, linktitle %>
|
<% ShowPic pic, link, filename, linktitle %>
|
<%
case 2
%>
<%=title%> <%=newsdate%>
|
<% ShowPic pic, link, filename, linktitle %>
|
<% if fulltext <>"" then %>
<%=fulltext%>
<% ShowLinks pic, link, filename, linktitle %>
|
<% end if %>
<%
case 3
%>
<%=title%> <%=newsdate%>
<% if fulltext <>"" then %>
<%=fulltext %>
<% end if %>
<% ShowLinks pic, link, filename, linktitle %>
|
<% ShowPic pic, link, filename, linktitle %>
|
<%
end select
%>
<%
rs.movenext
loop
rs.close
conn.close
set rs=nothing
set conn=nothing
end sub
Call ShowArticle (request("id"))
%>
More Articles...
|