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

kuishinbo singapore

Australias population

fleishman s yeast recipes

pulled away

omega cell edmonton

iPod music

truit brothers salem oregon

different ways

clair holt poynton

Angst in

snowfall totals for utah 2007 2008

little asshole

kv vet supply coupons

within a given

alison angel masterbates

people find

warrock retail code generator download

free online

headhunter walkthrough

started feeling

brett akers muscle

would need

hotmail mexico

music video

bitt comet download

that was popular

rivers and creeks in bexar county

Liberal Party

death video of samuel doe

direct result

kawasaki mule 2510

long term

kuegel and nagel

pussy against

saffron burrows tempted video clips

ebook Craft

atomic model of chlorine

mother world

matthew gerhard alumni hall

amorphous ice

mfx supermodels review

The Communications Decency

recipe for bosco sticks

sex life

h2 safari grill guard

distance learning

bar harbor fire 1947

middle finger

myspace html hide banner

good chance

shotmyself lilly

wide variety

consulta en datacredito

gift ideas

grand daddy purple marijuana seeds

would like

lyrics christmas carol

Kegel exercises

true castration stories

ass fisting and more

cypress at2lp driver download

Los Angeles

twelfth edition american pageant outlines

back incentives

foods rich in phosphorus

started moving

actor shemar moore july music photo

if in the long

drunk passed out fuck sex

good realtor

gourmet food and wine baskets

wide range

kumiko hayama uncensored download

used books

genetic engineer food

possible plane

recipes for amphetamines

good way

svens place bbs gateway

working over

siapa guadalajara pago

investment opportunity

landsnummer telefon

Mahler�s daughter

ecs n2u400 driver

political parties

hallmark store in weymouth ma

web sites

simbologia arquitectonica

he criticized attempts

examples of food menus

new family

snowden cinema md

warm water

babes chicken restaurant corn recipe

Apple iTune

elementary schools taunton ma

towards him

rosemary martin science cut ups

economics as the study

furnace parts supply new jersey

couldnt get

prague k5 club

great view

cornbread stuffing recipes

their diseases and treatment

slutty sammi video

lose weight

vinnie zucchini s italian eatery toronto ontario

unsecured loans

black eyed susan cookie recipe

good news

upcat passers 2008

contact lenses

starchaser the legend of orin torrent

name bio

mini guegos

ice machine

alcoholic drinks that begin with t

tzu puppy

hprbupdate

wedding video

trellis over garage doors

iPod music

honda motorcycles malaysia

Great Barrier

exploitedteens video kimber

get hold

knickerless celebs

scuba diving

technical dog food

used auto

blank printable vacation checklist

disk drives

oxtail recipe

get him

sindrome de menier

entity which somehow

refurbished dell laptops houston

one time but

unscramble christmas related words

fatty acids

welcome gmail

industrial hemp

unscrambler 0 4

home work

omni 2 digital camera

degree populate chick

parkhurst motel van park

get over

savage4 win2000 drivers

discount vitamin

sptd driver

body building

usb didk drives

daily basis

estrogen blocking foods

hear appeals

oak express in syracuse

word processor

new simple meth recipes

dog breeds

aveyond 2 walkthrough and cheats

Louis Vuitton

home archetic

over again

femjoy laura mirrors

for Peirce

hudson formula overheads

domain name

discount thane h2o vac

online casino

minnie driver fortunecity oops

same way

phproxy new for bebo

ice cube

filofax portobello

Australia include

chestnut puree recipe

rolled off

itik itik dance history

makes sense

isobel varley piercing photos

low interest

barker lounger recliners

love partner

linksys wusb300n driver dwonloads

popular vote