<%@ LANGUAGE=VBScript %> <%Response.Buffer=TRUE '' This webpage shows the most recent 20 postings -- JKAG 4/4/04 '' The OLEDB switchover -- JKAG 2/23/2006 '**WEB DESIGN VARIABLES** 'Set the Width of the tables with this variable (by percentage) Dim TableWidth TableWidth=75 'Parameter explanation ' MID is the MID of the message to currently view ' mMID is the master MID, the top most level MID viewed. It is needed to make sure that the ' thread tree continues to display all items in the thread. %> <% Sub DisplayText(inStr) Dim x, currChar '''Response.Write "String: " & inStr & "
" '''Response.Write "x: " & x & "
Len: " & Len(inStr) if isNull (inStr) then Response.Write "[Null]" else For x = 0 To Len(inStr) currChar = Left(Right(inStr,(Len(inStr)-x)),2) If currChar = (Chr(13) & Chr(10)) Then Response.Write "
" x = x + 1 Else Response.Write Left(currChar,1) End if Next end if End Sub Dim DBConn, rs, temprs, CurrThreadLevel, SQLText, DBPath ''Intialize the Database connection -- the OLEDB switchover -- JKAG 2/23/2006 Set DBConn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") DBPath = Server.MapPath("../Database/forum_i2k.mdb") DBConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & DBPath '' WAS before the OLEDB switchover -- JKAG 2/23/2006 ''Intialize the Database connection ''Set DBConn=Server.CreateObject("ADODB.Connection") ''DBConn.Open "Forum_i2k_dsn" ''Set rs=Server.CreateObject("ADODB.Recordset") SQLText = "SELECT * FROM Messages WHERE Forum = '" & Request.QueryString("Forum") & "' order by TimeStamp DESC " rs.Open SQLText, DBConn If rs.EOF Then ''Message not found, bounce back Response.Redirect("forum.asp") End If Dim Message %>

  Most Recent Postings


<% dim recent_loop recent_loop = 0 While recent_loop < 20 and Not(rs.EOF) recent_loop = recent_loop + 1 Message = rs("Text") %>

%>
FORUM: <%=rs("Forum")%>   AUTHOR: <%=rs("Handle")%> <%=NiceTimeStamp(rs("TimeStamp"))%>
<%=rs("Subject")%>
  <%DisplayText(Message)%>  
 
&MID=<%=rs("MID")%>">VIEW THREAD     ">VIEW FORUM

<% rs.MoveNext Wend %>




Web Counter
Free Counter [Since May 4, 2004]