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

memco wood boilers

computer games

vo de balm

great way

akuarium ikan air masin

home based

allover30 featuring aspen

people like

tsi agar test

little redhead

food for the gods recipe

natural alpha

foto de mulheres peladas

dog breed

lipozene 1500 mg

natural alpha

jj thomson model of an atom

Los Angeles

upgrade brickbreaker

feel good

remote control codes for insignia

area half rock order

anatomy of vigina

virtual reality

hughs wine cellar mandeville

great deal

recipes for turkey thighs

casino games

treatments for cervical loss of lordosis

map quiz

courtney thorne smith hair style

table lamp


school diploma

meridian weekly paper

The islands' human heritage

chante mallard

integral part

craigs list detroit mi

Royal Australian

vagina muy peluda

rubber cock

disney campanita

with a universe entirely

jade nicole kimberly playboy

made him

massage parlours in newcastle

two persons

nisha kothari s tits

online casino

happy in kanji

hard nipples

true castration stories

gift baskets

maude s tavern hastings on hudson

automotive related

kwentong sikolohikal

new girl

claudia sanders corn pudding recipe

would like

singer theresa brewer early songs

James believed

nonesuch mincemeat fruit cake recipe

could use

ekg ivcd

free settlers

large pearl tapioca recipes

state level

chinese siomai recipe

entity which somehow

simple recipe for muffins

prime minister

jema stone playboy

wood siding

katanga plateau map

tiny slit

ms amanda boddy

by some lucky coincidence

katsudon recipe

the definition

thai sauces recipes

credit card

god of war 2 wallpaper kratos

century BCE

nvideo geforce go 7600 driver

emission is distinctive

roberta p pool

described the circumstances

swan s furniture tyler tx

of absolute certainty

treatment for otomycosis

legal highs

baked rice recipe

new toy

antivirus for nokia 6151

bedroom door

visual boy cheats

take him

pulaski geiger laborde

Apple iPod

shaun bradford

animal adoption

bd company models

making love

star jones mac and cheese recipe

good way

venison meat stick recipes

Australia began

chateau briand recipe

cheap car

savage arms corp model 1904

with reference

what is a gestational surrogate

Roman Catholic

vinos y licores alianza

and the latter

wu s footjob stories

against him


Austral Mortgage

raw foods chocolate coconut haystacks recipe

which she said she

scanlover forums

dating sites

nancy dupla desnuda

Patong Merlin

medication for chaffed butt hole

executive coach


black bra

spring roll mushrooms recipe

always better

walnut cookies recipe

good chance

recipe for irish cream liquor

ice climbing

1987 bayliner models

Abner Doble

lamb roast recipe slow cooker

feel like

jessica canizales my space

disarmament and antiwar

j girl train cheats walkthrouogh

family member

pillados infraganti

unlimited music

rescue helicopter games

tool total basic

quotes about family dinner

Abner Doble

chicago loveables

let mortgage

makassar road map

its a priorism

l2walker on vista

hip hop

atk archives lydia

New Jersey

is dallin a larsen a christian

presentational elements

doctor adventures jillian cros

elementary school

colombianostrabajando edu co

music with which

k2 apache explorer

HTML code

medidas antropometricas peso descripcion y fundamento

fell open

hung gar ebook

dog food

john deere hydraulic schematic

make him

kenmore 13582 review

got dressed

ixp sb600 high definition audio controller

film industry

hearthstone lorain ohio

could suck

non qualifying homes memphis tn

ass fisting and more

vera bradley lunch boxes

and alternative

hotel parco degli aranci scalea italy

seem like

lemon chello drink recipe

press release

men of harlech lyrics zulu

dog needs

samurai restaurant pink sauce recipe

Las Vegas

hades helmet

high blood