%@ LANGUAGE=VBScript %> <%Response.Buffer=TRUE 'Function NumReplies(inDBConn, inMID) ' Dim frs 'Function Recordset ' Dim retValue ' retValue=0 ' Set frs=Server.CreateObject("ADODB.Recordset") ' frs.Open "SELECT MID FROM Messages WHERE Re = " & inMID, inDBConn ' While Not(frs.EOF) ' retValue=retValue+NumReplies(inDBConn,frs("MID"))+1 ' frs.MoveNext ' Wend ' frs.Close ' Set frs = Nothing ' NumReplies = retValue 'End Function %> <% Dim DBConn, rs, temprs, CurrThreadLevel, SQLText ''Intialize the Database connection Set DBConn=Server.CreateObject("ADODB.Connection") ''If Request.QueryString("Forum") = "" Then '' Response.Redirect("forum.asp") ''End If '' 54000 is about Dec 2005 --- JKAG 2/23/2006 --- Added date cutoff via MID > 10000 (that's about Sept 2004) -- JKAG 2/2/2005 -- to 37000 JKAG 1/26/2006 DBConn.Open "Forum_i2k_dsn" Set rs=Server.CreateObject("ADODB.Recordset") SQLText = "SELECT Handle, TimeStamp, MID, Subject, NumRe FROM Messages WHERE Forum = '" & Request.QueryString("Forum") & "' and " & _ "ThreadLevel = 1 and MID < 54000 ORDER BY TimeStamp " rs.Open SQLText, DBConn %>
| DISCUSSION TOPIC | AUTHOR | DATE | REPLIES | <% While Not(rs.EOF) 'Fill Discussion Topic Table dim the_subject the_subject = rs("Subject") %>
| &MID=<%=rs("MID")%>&mMID=<%=rs("MID")%>"> <% if len (the_subject) < 35 then %> <%=the_subject%> <% elseif len (the_subject) < 45 then %> <%=the_subject%> <% else the_subject = left (the_subject, 40) + "..." %> <%=the_subject%> <% end if %> | <%=rs("Handle")%> | <%=NiceTimeStamp(rs("TimeStamp"))%> | <%=rs("NumRe")%> |
| &"> POST NEW TOPIC | |||