<%@LANGUAGE="VBSCRIPT"%> <%OPTION EXPLICIT%> <%Response.Buffer = True%> <% Function SelectFilterItem(item) If Showing = item then SelectFilterItem = "selected" End If End Function '*** Dimension all the variables. Dim ViewLast, Showing Dim objRec Dim strSQL Dim LastHere 'Variables used for paging. Dim intCurrentPage, intCount '*** Open the database. Set objConn = Server.CreateObject ("ADODB.Connection") Set objRec = Server.CreateObject ("ADODB.Recordset") objConn.Open strconnect '*** The table headings, Topic, Author and so on can be used to order the messages (much like an email program) this is the code that does it. If Request.QueryString("orderby") <> "" then Session("OrderBy") = Request.QueryString("orderby") End If Select Case Session("Orderby") Case "Topic" objRec.Sort = "MessageTitle ASC" Case "Author" objRec.Sort = "MessageAuthor ASC" Case "Last+Post" objRec.Sort = "LastPost DESC" Case "Replies" objRec.Sort = "Replies DESC" Case Else objRec.Sort = "LastPost DESC" Session("OrderBy") = "Last Post" End Select objRec.cursorlocation=aduseclient StrSQL = "SELECT * FROM messages" If Request.Form("cboSearchType") = "Message Topics" OR Request.Form("cboSearchType") = "Message Authors" Then Session("txtSearchString") = Request.Form("txtSearchString") Session("cboSearchType") = Request.Form("cboSearchType") End If If Session("cboSearchType") = "Message Authors" Then StrSQL = StrSQL & " WHERE MessageAuthor LIKE '%" & Session("txtSearchString") & "%'" End If If Session("cboSearchType") = "Message Topics" Then StrSQL = StrSQL & " WHERE MessageTitle LIKE '%" & Session("txtSearchString") & "%'" End If objRec.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText '*** Function to compare the date of the users last visit with the date of the last post. Function NewMessages(lpost) If datediff("s", LastHere, lpost) > 1 then NewMessages = MBImgNewMessage Else NewMessages = MBImgOldMessage End If End Function '*** Find out when the user was last here so that new messages can be highlighted. LastHere = Request.Cookies("aspmbuser")("Date") Response.Cookies("aspmbuser")("Date") = now() Response.Cookies("aspmbuser").Expires = Date + 30 '*** If they haven't been here before set the LastHere variable to a value that will highlight all messages as being new. if LastHere = "" then LastHere = dateadd("d",-10,now()) End if '*** Has the user just asked to view the messages updated in a certain time period? See select form field. If NOT Request.Form("days") = "" then ViewLast = Request.Form("days") '*** Write this value to the cookie so that next time the reload the page it will remain the same. Response.Cookies("aspmbuser")("ViewLast") = Request.Form("days") '*** If they haven't asked for a new time filter. Else '*** If there is no value in the cookie, show them all the messages. If Request.Cookies("aspmbuser")("ViewLast") = "" then ViewLast = "ALL" '*** Otherwise take the value from the cookie. Else ViewLast = Request.Cookies("aspmbuser")("ViewLast") End If End If Showing = ViewLast If Session("cboSearchType") = "" then If NOT ViewLast = "ALL" then '*** Subtract ViewLast amount of days from the current date. ViewLast = DateAdd("d",ViewLast, MediumDate(Date())) '*** Create a record set with only the fields from the last x days. objRec.Filter = "LastPost >= #" & MediumDate(ViewLast) & "#" End If End If %> <%=MBTitle%> <% '*** Print out the Body tag. Also a constant found in the config.inc file. Response.Write MBPageBody2 %>

<%=MBImgLogo%>
<%=PrintCredit%>

<%=FONT1%>
<%=MBImgAddNew%>  <%=MBImgSearch%>

 

<% '*** The code above makes sure that the correct item in the drop-down box is highlighted. I'm certain that this was poor coding but it worked. '*** The section below prints the heading for the topics table. Notice the link URLs to order it. See above. Images are defined in the config.inc file. %> <% On Error Resume Next If Request.QueryString("page") = "" Then intCurrentPage = 1 Else intCurrentPage = CInt(Request.QueryString("page")) End If objRec.PageSize = MBPageSize If objRec.PageCount > 0 then objRec.AbsolutePage = intCurrentPage Else intCurrentPage = 0 End If Session("CurrentPage") = intCurrentPage Do While objRec.AbsolutePage = intCurrentPage And Not objRec.EOF %> <% objRec.MoveNext Loop '*** Yeah. It's the end of the table. Response.Write "
  <%=MBImgTopic%> <%=MBImgAuthor%> <%=MBImgLastPost%>

<%=MBImgReplies%>

<%=NewMessages(objRec("LastPost"))%> <%=FONT1%>

"><%=objRec("MessageTitle")%>

<%=FONT1 & objRec("MessageAuthor")%> <%=FONT1%><%Call DisplayDateTime(objRec("LastPost"))%> <%=FONT1 & objRec("Replies")%>
" Response.Write "

" If objRec.PageCount > 1 then 'Print Previous Page if required If intCurrentPage <> 1 then Response.Write "Previous Page" Else Response.Write "Previous Page" End If 'Print direct access page numbers. For intCount = 1 to objRec.PageCount If intCount = 1 then Response.Write " | " End If If intCount = intCurrentPage then Response.Write intCount & " | " Else Response.Write "" & intCount & " | " End If Next 'Print Next Page if required If intCurrentPage <> objRec.PageCount then Response.Write "Next Page" Else Response.Write "Next Page" End If End If Response.Write "

Page " & intCurrentPage & " of " & objRec.PageCount & _ " | Ordered By: " & Session("orderby") & " | Showing: " Select Case Showing Case "-0" Response.Write "Topics updated today." Case "-1" Response.Write "Topics updated in the last 2 days." Case "-4" Response.Write "Topics updated in the last 5 days." Case "-9" Response.Write "Topics updated in the last 10 days." Case "-29" Response.Write "Topics updated in the last 30 days." Case "-99" Response.Write "Topics updated in the last 100 days." Case "ALL" Response.Write "All topics." End Select Response.Write "" If NOT Session("cboSearchType") = "" Then Response.Write "

Searched for: " & Session("txtSearchString") & "
On: " & Session("cboSearchType") & "
" Response.Write "Remove Search Filter" End If Response.Write "

" '*** Have a tidy. Don't want any of those nast memory leaks. objRec.Close objConn.Close Set objRec = Nothing Set objConn = Nothing %>

christmas breakfasts

designer prom

capital theatre port hope

looked around

true north electric food smoker

graceful colonial

tias cachondas

Australian Democrats

watertown realty sd

ebook Craft

revista don juan

rental advice

easy portugal food recipes

remain intact

chinese mombo sauce recipe

search engines

bisk cpe

motor car

michelle mccool playboy

Apple iTune

show me hockey n54

rapid growth

mia nudeadultcams

designer prom

hp4300

Economics has

care of red ear slider turtle

New York

turkey crown cooking times

book carry took

boyd music jacksonville il

disk drives

chocolate truffles recipe

so highly

hungry hunter prime rib recipe

fuck him

ccc basketball 2007 sacramento

amorphous ice

tsubasa chronicle screensaver

public school

vajina waxing

white light

24porn7

help people

mathematician srinivas ramanujam

deep breath

justteensite radmila

the success of

refleksi dalam pengajaran dan pembelajaran

should help

mystery of heroism quiz

interest rates

green devil triple percolator

Kenshiro Abbe

girls using viberators

know why

leidy paola rios

and atonal music

matalesse

new home

maria da graca mello pics

web sites

sweatpants voyuer

said Now

weaning off strattera

on the former

woodstock colonial inn paradise newfoundland

got hard

brenda stafford foundation

firm grip

provident pantry freeze dried food

spread open

history of curanderas

various topics

you are a pirate lyrics lazytown

housing finance

livepix deluxe download

king space

video luly bosa follando

heart disease

jingle bell coloring sheet

North Africa

vital statistics frankfort kentucky

Great Depression

toddlers healthy recipes

felt myself

maduras gordas follando

learn German

selfshot pictures sexy

man said

htc phone malaysia

credit card

durham nc asian massage

Paris Hilton

powerpoint falling snow

look good

vegetarian cake recipes

domain names

mccamey animal center chattanooga tn

animal protein

sanborn airbrush kit

over again

residential schools for emotionally disturbed children

Queen Elizabeth

recipes fresh tuna

Costa Rica

thomas kincaid desktops wallpaper

data exclusivity

food of the philippines

state elections

colegialas putitas

continued exposure

yadira hidalgo desnuda

several occasions

h52pt 3020 xp

different ways

lenox sound telephone

suddenly realized

roll up downspout drain

electrical parts

culonas negras

freely reprinted

cody lambert poetry

extended warranty

download hack ntl cards

Yothu Yindi

illustrator cs3 serial number 1034

Putnam says this

nixxxe models

skin smile crease hole

tv5 sverige

estate investments

buccellati cookie recipe

Folk rock songs

kris sutton solar pv

left nipple

ford f150 fluid capacity

get rid

harvest moon free game

web hosting

bersa model 97

sex life

subsidy lock nextel i850 direct

search engines

gordon duncan sleeping tune sheet music

of science to carve

itaewon hooker hill

red blood

bottecchia road bikes

nuclear energy

robin tunney fakes

depicting Russian

indianhead food service eau claire wi

great way

tejido animal y vegetal

internet marketing

bone in chicken recipes

iPod video

kd prescription cat food

from important

breakfast menu examples

would never

cdd5263 driver download

it is currently

descarga messenger en espanol

the pragmatic theory

indonesian women bugil

right nipple

methamphetamine manufacture or recipe

used cars

suncoast discount arts and crafts

bike rack

jennifer reyna fm houston

acquaintance with

fenton mclaren furniture store berkley ca

web sites

pathophysiology of bronchopneumonia

martial arts

side effects of zyflamend

juices flowing

antique jockey hitching post

mortgage broker

transcripts from grey s anatomy

cock inside

jet tv 24

buy Intrinsa

award winning granola recipe

begging him

wikipedia i285 atlanta

prehistoric periods

puggle merchandise

sit race window