%@Language=VBScript%> <% Response.Buffer=True Response.ExpiresAbsolute=Now()-1 Response.AddHeader "Cache-Control", "private" %>
<%
Dim article,PageID,section,secID
section="all"
secID=Request.QueryString("sectionID")
if secID <> "" then
section=secID
end if
'response.write section
article="default"
PageID=Request.QueryString("PageID")
if PageID <> "" then
article=PageID
end if
'response.write article
Dim strSection
strSection="SELECT DISTINCT s.SectionName, a.SectionID FROM articles a INNER JOIN sections s ON a.SectionID = s.SectionID where a.articleActive='yes' order by sectionName"
Dim objRSSection
Set objRSSection=Server.CreateObject("ADODB.Recordset")
objRSSection.Open strSection, objConn
Do While not objRSSection.EOF
dim SectionID
SectionID= objRSSection("SectionID")
Dim strArticles
strArticles="select a.ArticleID,s.SectionName, a.ArticleTitle from articles as a, sections as s where s.SectionID=a.SectionID and s.SectionID=" & sectionID &" and a.articleActive='yes' and a.articleDate = '" & currentEdition & "' order by a.ArticleID desc"
Dim objRSArticles
Set objRSArticles=Server.CreateObject("ADODB.Recordset")
objRSArticles.Open strArticles, objConn
if objRSArticles.RecordCount <> 0 then %>
" end if objRSSection.MoveNext Loop objRSSection.Close set objRSSection= nothing %> myspace |
<%
Dim strGetArticle
if article="default" then
strGetArticle="SELECT * from articles where sectionID=21 order by articleID desc"
else
strGetArticle="SELECT * from articles where articleID="&article
end if
Dim objRSGetArticle
Set objRSGetArticle=Server.CreateObject("ADODB.Recordset")
objRSGetArticle.Open strGetArticle, objConn
Dim banner
set banner=objRSGetArticle("sectionID")
Dim strGetBanner
strGetBanner="SELECT Banner, Link from sections where sectionID="&banner
Dim objRSGetBanner
Set objRSGetBanner=Server.CreateObject("ADODB.Recordset")
objRSGetBanner.Open strGetBanner, objConn
dim tobjRSGetBanner
tobjRSGetBanner=trim(objRSGetBanner("Banner"))
dim lobjRSGetBanner
lobjRSGetBanner=trim(objRSGetBanner("Link"))
if tobjRSGetBanner <> "" then
if lobjRSGetBanner <> "" then
response.write " " & objRSGetArticle("ArticleTitle") & " "
if objRSGetArticle("ArticleLogo") <> "" then
response.write " |
<%
'Default allAdverts
Dim strGetAdvert,objRSGetAdvert
strGetAdvert="SELECT * from adverts where advertActive='yes' and sectionID = '36'"
Set objRSGetAdvert=Server.CreateObject("ADODB.Recordset")
objRSGetAdvert.Open strGetAdvert, objConn
response.write "
|
||||||||||
| © 2003 - Copyright Mauritius-News.co.uk. All rights reserved - Editor: Peter Chellen | Site by Shirley Haw |