<%@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 %>


<%=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%>


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


<%=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 %>

dog toxidia

head again

allen j suan

web site

shaven women shaven haven

of truth

rumah tumpangan sabulan

mommas big

food menu for a kids party

get back

biografia carlo magno

knew exactly

dean flynn unzipped

Internet connection

face centered cubic structure

listen six table

mahogany entry doors houston tx

new car

mistreated bride 03 torrent

little bit

peter hegre sian

pussy lips

horoscopo semanal sagitario

private investigator

hillary dupre

Mazda Motor


get over

medicine cabinets by fh lawson company

eligibility requirements

ktv girls china

security cameras

drinks that start with b

serial killer

winchester mdl 43

name bio

jake humphreys

cold sore

dikir dikir barat munirah

post punk

sleigh ride tabs

opposite sex

hack scientific atlanta 8300 hd

New York

soft chewy snickerdoodle recipes

integral part

seafood crepes recipe

pushing back

model eva pigford married

travel guides

brazil farts

Success Secrets

g magazine brazil

ass hole

marielle rodriguez

ever seen

msi motherboard wiring diagram

lift truck

jeff hardy kids sweatshirts

iPod Video

recetas maseca

Brenda said

christmas food puzzles brain teasers

high quality

true north electric food smokers

Surfers Paradise

chinese food delivery indianapolis

social anxiety

foto pono

fucking good

charlotte ayanna maxim

good little

sadlier oxford vocabulary level e answers

control over

reebok body trec ii elliptical parts

car buying

mai nadasaka

that beliefs could

neff cooker instructions

auto insurance


Coram Boy

cars tokyo drift

two years later

peoples jewellers catalogue

fingers around

roberta nogueira pics

legs apart

natalia chanapa

look like

jenny gilbertson model fargo

high quality

interac tv programming codes fisher price

United States

roland kr7 for sale

MLM Marketing

impala charms 1967

car bike

tialia food

top quality

anneta keys fotos

Louis Vuitton

djenne djeno

Kill the Director

black tie dinner etiquette

make use

fingernail longitudinal ridges

snake oil

arm goes numb while sleeping

carrot juice

unique foods found in davao

registry cleaner

sarah cosmi

Abbe Sensei

runners repeaters strangers

used cars

canadian tire newmarket ontario

use the theme

iq scale moron imbecile idiot

gift ideas

itchiness on labia majora

baby fuck

chihuahua micro breeders

would need

prepagos bogota

free settlers

divinci audio reviews

hard drive

nordstrom rack factoria

carpal tunnel

rendering plants in missouri

love making

eve fitting tool eft

started rubbing

eatable wild plants of north america

Australia Australian

tudric pewter

body language

la ley 102 5

restoring human


get away

formal invitation letter for dinner program

little asshole

emmie child model

general purpose

dave hunter fort lauderdale

long way

what is an electrogoniometer

storage unit

can i take food onto airplanes

cum covered

simple shepherds pie recipes

website links

tin lunch boxes

automobile insurance

lirik in team segenggam tabah

feel like

heather harmon deep throat 2007

New York

jello salad dersert recipes

file sharing

sks stainless steel bases rings

best auto

soursop cake recipes

search engine

hpw2207 reviews

Auto Parts