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

sketchers bikers nomad

ice skating

open pi2 file

Indigenous Australian

itv recipes

real good

bcm2045

hydrogen fuel

unbeatable eatables

quality replacement

list of protein food

Australia Act

ruud gas furnace silhouette problems

search engine

location of clotoris

little asshole

chicos bel ami

teenage angst brigade

acadian lines bus schedule

Catholic Church

meade ds 2130ats lnt review

video conferencing

better homes garden recipes

feel better

rolex precision

San Francisco

roasted potatoes recipe

major cities

printable recipe book dividers

closer look

yourgirl

from black comedy

eskimo tube mika

estate investment

cooey model 600 parts

related emotions

craigs list minneapoli

with them at the same time

regal cinema in lancaster ohio

Dad now

children s cough naturist cure

high school

urban medical spa chico ca

name bio

oup recipes

having sex

color climax child

hosting plan

sonia grey qualche caps

truck bed

cheaters amp male strippers uncovered

Automotive Technology

r401a freon

character disordered

ophra alzheimer s quiz

hair loss

definicion trauma infantil

scuba diving

41 point buck in oklahoma

internet marketing

alisa vlad model

cheap auto

watch hollyoaks online

auto insurance

masha kozlova

assist those

furniture appliance mart superstore wausau wi

could ever

starting wages for phlebotomy

wish sky board joy

oops celebs kristin davis

liquid vitamin

peyton sawyer s drawings

East Timor

engine overhaul pellets

boarding schools

pearled barley recipes

Folk rock songs

homemade mod podge recipe

search engine

recipe for homemade lens cleaner

head again

tests for pale optic nerve

Shih Tzu

foods that make you hungry

begging him

egg pie recipe pinoy

commercial dog

susan mikula

car audio

thomas kincaid plates

beautiful country

soprano s penne alla vodka recipe

opposite sex

glock exploded view

wicked smile

redtu e

long term

rtl8029 xp driver

make love

quote from the great debaters

baby boy

misty vonage teacher

free VoIP

brawny stud blog

quantum computer

winchester 94 ae trapper

Brooklyn Real

shrimp poboy recipe

look good

potjiekos recipe

end tag

recipe for japanese melon bread

female sexual

bree olsen dp video

cum off

303 british surplus ammo

inner thighs

model steam boiler plans

dry dog

branded friendster layout

Buckingham Palace

julia bradbury stockings

us expeditiously through

toronto ontario lord stanley dinner theatre

good quality

intek america inc shredder

paintings biography

hayden kho

website links

jeffrey brothers furniture salem ma

mortgage broker

hofi geza

scuba diving

mohawk recipes

right now

levines auto and truck parts

like Mazda

interesting facts about the savanna biome

great deal

peugeot remote key fob programming guide

felt like

turtles recipe

unit power town

www ciret city com

wall catch mount

caramel squares recipe

used amongst medical

chicken coconut milk curry recipe

virtual communities

repossed ued autos

and the applied practice

paula dean mac and cheese recipe

better way

mee rebus recipe

food service

downright healthy foods toronto

sex toys

mach3 cnc license

RSS feed

redeemable itunes codes

email marketing

julia bradbury profile

online casinos

easy recipes for homade soup

right now

robert lewis salon rockville md

two ways

tropical rainforest precipitation charts

good idea

hannah hunter

moms ass

italian honey ball recipe

finger around

printable baby s first haircut certificate

year old

golf ball personalizer

had his name spelt

pavlova simple recipe

family member

creamette macaroni and cheese recipe

web design

royal mistic soda

how individuals

fann wen qing

Ice Cream

nicolette whippedass megaupload

Variety Access

hairy boys

game reserves

windsurfing by david solway

hosting companies