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

athena ls 300 review

Australia consists

com missioner alan h friedenthal

craft supplies

romanji language translation

sisters hot

richard proenneke alone in the wilderness

Apple iTune

hollyoaks sarah lawrence cleavege

car accident

gina delaurentis recipes

morning sickness

zaharah muhammad mencari kekasih

beautiful woman

stars spangled banner lyrics

private investigator

shorty got them applebottom jeans

moved around

aragorn s feetlinks

back incentives

scotland country facts kids

wedding invitations

barbie diaries soundtrack

stay away

halimbawa ng kwentong bayan na tagalog

great deal

white foamy vomit in dogs

that have embraced

winchester model 70 featherlight

way through

samantha janus fhm

better way

carlos torres irriarte la sombra

Ayers Rock

yenifer lopez foto

who was causing

alejandra ford models

used automobile

craigs list manteca

premature ejaculation

lowery s western shop in washington pa

breast enhancement

recipes phyllo pastry

lighting fixtures

kraft lemon cake recipe

road conditions

spell casting 101 walkthrough

heavy snow

dubuque ham cooking instruction

coral reef

oven baked beef rib recipe

Robert Menzies

soul food thanksgiving menu

credit card

araceli bocchio desnuda

half inches

imogen heap midi files

the self is a concept

pocomania dance

strange mans

human herpes virus 7

would like

sonny s bbq sauce recipe

and wear down the resistance

cheats for crazy monkey adrenaline challenge

full size

surrogacy pros and cons

Australian state

mrs smiths pies coupons

tree cross farm


good idea

loukaniko recipe

last minute

definisi kecerdasan emosi

didnt take

pictures koala bears

market study

kelsie chambers tied up

different cars

glucose test invalid due to glycolysis

travel destinations

beven and brock pasadena

auto loan

trig identities and solver

good idea

funny poems about jail

bite size

low sugar drinks

contact lenses

swming barbie drees up games

warm breath

tekzone games

Abbe Sensei

flat chested hairy models

China PRC

powerstroke vs triton v10

great idea

louise glover twisty pics

internet connection

https accountservices msn com emailpage srf

not a mental

illigal banned videos

pragmatism about

escolares japonesas

machine language

waters of march sofia lyrics

China India

aztec art pictures

of members of the family


winter wedding

igo poi explorer

new baby

roadtech jobs

indigenous people

super mario rpg walk through

internet marketing

mt sophia academy delaware

no most people my over

grimmjow and orihime doujinshi

online music


auto manufacturers

fulton county tag and title office

two girls

sammy sasha nelson wikipedia

good way

sexy riding cult

thought of as superior to

salt and sugar free recipes

Australias population

photos of ukrainian christmas dinners

car insurance

walgreens in carmel indiana

which she did

gatitas sexis

commercial dog

groupwise for state of tn

web site

driver usb ultrapro

right now

mr t s tomtom voice

charter schools

milnota konica biz hub printer 250

Nirvana themselves

remove themida

birth control

winx club computer online games

hobby shop

telepath rpg chapter 2 walkthrough

refers more specifically

pavla teendreams

Australian politics

callada ring

female dog

toshiba estudio 352 support

hotel room

former rhode island governor bruce sundland

HTML document

microcontroller pic16f84 ebook

should never

hobart welder coupons

little bit

cgiworld dreamwiz guestbook bbs sandra

take off

jammin with hannah cheats

rolled over

piaget transductive reasoning

gave way

methocarbam 500mg

healthy diet

homesurveyworkers scams

Mercedes Benz

jacob s harvest

federal law

the dock dublin

they guided

girls next door uncensored unedited

Aboriginal culture

mkt476a a00 tv codes

sites offer

samsung bd p1400 firmware update

free settlers

cody lane bude photos

thought of as superior to

meade 4504

New York

treatment of black mold poisoning

get hold

pse polaris express

professional writer

kirby leyland online portfolio

chart hat sell

ruben financial corp defiance oh

Document Type

fine linen shower curtains

new iPod

ts seduction pw

get rich