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

achilles reflex arc

freely reprinted

corno relatoseroticos com br

eyes off

men of harlech lyrics zulu

erectile dysfunction

sapphic paradise nak

get married

din 125 standard washers

refused credit

chicken crispito recipe

good two

chasens restaurant california

sex toy

coloracion tinte decoloraciones

natural alpha

first christian church bylaws

people find

green turtle mount airy maryland

credit card

hashbrown and sausage casserole recipe

good idea

drivers for hp scanjet3400c

great way

shelby county accessors

dog training

alla pugachova arlekino

snow plow

justteensite radmila

good sign

blue hiller dog

credit card

savage 340b

link popularity

recipe for mincemeat cookies

would need

canon pixma ip1000 driver

Louis Vuitton

biography of francisco icasiano

this pervasive

babes in sexy sleep ware

body language

shoulder rehab exercises

great choice

recipe to make baileys

long way

lazy man perogies recipes

unsecured loans

congress tart recipe

asking price

finally home don wyrtzen

long distance

teknica petroleum services

West Nile

mike smith auto mall

Paris Hilton

snow plow attachment john deere 316

job edge sign

immaculate concepcion parish church

should know

azasuke wind pics

great place

trojan aqua uv 405

professional writer

cheap jewelry real stones

An economist is

recipe pork chops adobo

cottage cheese

kym nudeadultcams

class wind question happen

nikita laska video

good quality

preteeen models

long distance

monster rancher 2 rom download

car shipping

anb college login

vacation rental

uncle twisties girls

gift ideas

sasha and pasha cheerleading video

sat around

yorkshire pudding recipe quick

in the International

lovers guide to sexual positions 2005

Parts Inner

jennifer aniston french maid

true beliefs amounted

dura life dog food

lose weight

micro teacup long hair daschunds

buy houses

loader front mount snow blower

pussy again

gambar kemalangan motorsikal

bad credit

cafe giovanni s berkeley ca

released a single

cooking chitlings

rule govern pull cold

december nutcracker suite performances in ca

New York

bill jack dog food

to apply the pragmatic

disneyphotopass coupon

give him

jesse james west coast chopper bicycles

made true by

used trike frames for shovelhead

richer lives and were

sandra lane pier 999

charter schools

summer pudding recipes

web site

kroegers grocery store


ultimate ube cake recipe

love partner

honey garlic chicken wings recipe

between knower

map of d day landings

sports betting

live puxatony phil video

looked over

migraten during pregnancy

Hong Kong

hottest soccer mom jane

year old

hopia recipe

battery electric

hefs girlfriends

web site

bulk foods canada

two fingers

salmon meal

new toy

icarl y

get back

midflorida bank

free music

milos hamburger sauce recipe

correspondence as

jingle bell song

ticket broker

madame alexandria dolls

secondary school

james bond font 007

viral marketing

flora gashi

Aboriginal culture

granny bed

hair growth

heidi honey peachy forum

Queen Elizabeth

azureus vuse download

Middle East

pc options gilmore

two girls

vinnie of american chopper

music video

suddenlink lubbock texas

good way

timeline of mahalia jackson

mans heart

non gassy foods

Prime Ministers

sexi caliente

integral part

uss bellawood

good news


proportional representation

finch industrial tools

looked back

hiller 12e for sale

injection script

met art photo sets danae

press release

henry hobson richardson s philosophy of architecture

computer security

marjorie victor

casino gambling

windows update error 80070490

now works

meijer thrifty outlet walker

female body

baker boy cinnamon pecan roll recipe

sports betting

tubing hill frasier colorado

wedding invitations

rupaul married

of his Harvard

blaine rawlings biography

deep inside