<% mpage = "1" Id = "2" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "
" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "
" & mainfeature() & "
" & featuredproducts() & "
" mystr = mystr & "
 " mystr = mystr & "" mystr = mystr & "" 'mystr = mystr & "" 'mystr = mystr & "" 'mystr = mystr & "" mystr = mystr & "" mystr = mystr & "



" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "" mystr = mystr & "
" & shownews() & "
" & Calendar() & "

" & services() & "
" mystr = mystr & "
" 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 & "" Str=Str & "" mcount = 0 Do While NOT RS.EOF Str=Str & "" Str=Str & "" RS.MoveNext LOOP str = str & "" Str=Str & "
[ Upcoming Events ]
»" Str=Str & "" & RS(1) & "" Str=Str & "  " & FormatMyDate(RS(2)) & "

View Complete Calendar
" 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 & "

" str = str & "" mmTemp = "" mmTemp = mmTemp & RS(2) mmTemp = RemoveHTML(mmTemp) mmTemp = ExtractSummary(mmTemp) str = str & "" str = str & "" str = str & "
News & Events
" & formatmydate(rs(3)) & "
news" & RS(1) & "
" & mmTemp & "
Read More
" 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 & "" str = str & "" str = str & "" str = str & "
Our Services
" 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 & "

" str = str & "" str = str & "" if len(trim(rs(4))) > 0 then str = str & "" end if str = str & "
" & rs(1) & "
" & mtemp & "...Read More
" 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 & "" str = str & "" do while not rs.eof str = str & "" rs.movenext loop str = str & "
Latest products
" & rs(1) & "


" & listproducts(rs(0)) & "
" 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 & "" end if listproducts = str end function %>