"
response.write(top() & mystr & bottom())
Function Calendar()
sql = "SELECT TOP 2 ID, Title, StartDate, Venue FROM calendar WHERE StartDate >=#" & Date() & "# ORDER BY StartDate;"
Set RS = dba.Execute(sql, RecAffect, 1)
If NOT RS.EOF Then
Str=Str & "
"
Calendar = Str
End If
End Function
Function ShowNews()
sql="SELECT TOP 1 ID, Title, Content, date FROM news ORDER BY ID DESC;"
Set RS=dba.Execute(sql, RecAffect, 1)
If NOT RS.EOF Then
str = str & "
"
End If
ShowNews = Str
End Function
Function services()
sql="select TOP 4 id, title from section where sectionid = 4 and active=true order by positionid;"
Set RS=dba.Execute(sql, RecAffect, 1)
If NOT RS.EOF Then
str = str & "
"
End If
services = Str
End Function
function mainfeature()
sql = "select top 1 id, title, content, url, picture from mainfeature where active=true order by id desc;"
set rs = dba.execute(sql,recaffect,1)
if not rs.eof then
mtemp = ""
mtemp = mtemp & rs(2)
str = str & "
"
end if
mainfeature = str
end function
function featuredproducts()
sql = "select top 4 id, title, picture from productcategory order by id asc;"
set rs = dba.execute(sql,recaffect,1)
if not rs.eof then
str = str & "
"
str = str & "
Latest products
"
str = str & "
"
do while not rs.eof
str = str & "
" & rs(1) & "
" & listproducts(rs(0)) & "
"
rs.movenext
loop
str = str & "
"
end if
featuredproducts = str
end function
function listproducts(cat)
sql = "select top 5 id, title from products where productcategoryid =" & cat & " order by id desc;"
set rs = dba.execute(sql,recaffect,1)
if not rs.eof then
str = str & "