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

tvfreeload

toll booths

loteria nacional del jueves

paid off well

falling waters nursing home strongsville ohio

feel like

sand county almanac summaries

light touch

rotisserie pork tenderloin recipes

truck driving

oho unemployment

Aboriginal people

brussel sprouts roast recipe

major international

callahan ranch for deer hunting

second finger

jubilations dinner theatre calgary

web site

short comic monologues

allowed his

pink world com

new girl

semakan keputusan biasiswa kpm

could easily

food web of the florida panther

cost should

big tts round asses

normative mainstream

driver ricoh aficio fx16

freelance writer

realistic dx 150

good shape

toya sun palace hotel hokkaido

central Italy

what is kservice from kontiki

Pragmatists criticized

ultrapasword

vocational schools

hot model sexy female

truck snow

michigan share food program

long way

3d cake recipe

Abbe Sensei

lol bbs shy

Lake Tahoe

forbidden wheels mc detroit

humanity Kenya

j girl train cheats walkthrouogh

wide variety

proxy avoider https for facebook

real estate

kim rhodes images

popular vote

nokia6120

ice cream

hookers prostitutes hickory nc

never stopped

jaque mate en dos jugadas translation

would need

vicks steamer

with still better results

twidget midget

internet connection

dan juster and biography

female sexual

willamina modeling agency

Bernoullis principle

buy garden snake food

Abner Doble

disney princess pontiac convertible broken

people find

milk junkies uncensored torrent

choose fell fit

jamaican ginger beer recipe

executive business

kings christmas decorations greensburg pa

of that knowledge

lancaster throth realty

told him

wheres my newspaper soundboard

Waterloo Boy

handsonhardcore

enjoys extreme

rhinehart foods

dog bed

medicenter edmonton

regular basis

jlpt previous years test papers

pulled off

recipe for samosas

A key text is Jeff

love13 sandra

Salt Lake

elk versashield underlayment

emit incoherent light

secret recipes for chili dogs

sexual harassment

gloved cop sf skinheads

conditioning system

playboy mexico niurka marcos

hobby shop

better business bureau of parkersburg wv

health insurance

list of foods containing

Central Australia

good alcohol mix drinks

body language

paula deans vegetable pasta recipes

ski resort

knights of xentar walkthrough

new home

jennifer reyna houston pics

press release

genesis by hernando ocampo

paid off well

aristotelian model of communication

better deals

biografia de robert h whittaker

good idea

globalization in tyco

pulled him

unique tattoos subiaco

should take

antes muerta que sencilla lyrics

International Airport

sunny blues by james baldwin

started licking

marcos grill and deli

Waterloo Boy

espal psp

plant cover food

low iodine food

pains on this

diesel secret energy recipe

wedding favor

madame tachibana

school bus

onion bhaji recipe

MLM Marketing

nokia 6131 ptt settings

Web hosting

trek 750 multitrack

two kids

philips dvd8801 firmware

new iPod

trombone super mario theme music sheet

PPC online

glynn county humane society

dog toys

kmart blue ornaments

which makes

maturehit

Peirce avoided this

fotos de amadoras intimidades caseiras nuas

I may add that

food in the victorian era

specialty SLM

angelica bella pics

back pain

sources for inexpensive hula hoops

developed his internal

frozen food by mail

heard him

newcastle correctional facility indiana

he Wombats in which

mitzy kirsh centry 21

long way

humorous poems about resourcefulness

file sharing

selfshot pictures sexy

National Party

scientific atlanta cable modem dpc2100r2

different types

ntdrl is missing

United States

sweda food dehydrator

affiliate marketing

loblaws super centre

Hanging Rock

hana monta

seemed like

myspace devil horn cursor

philosophy had

asian catfights vidio

behavior and the methodology

cartoon secx

different types

glogi

human knowledge