<%@ LANGUAGE=VBScript %> <%Response.Buffer=TRUE ''' This webpage traces the thread back to the main entry (finds mMID) -- JKAG 8/4/04 '**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. Dim DBConn, rs, temprs, CurrThreadLevel, SQLText '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 MID = " & Request.QueryString("MID") & " " rs.Open SQLText, DBConn If rs.EOF Then ''' Message not found, bounce back Response.Redirect("forum.asp") End If if rs("Re") = 0 then ''' It's the top of the thread, so show the main one. Response.Redirect("forum_view.asp?Forum=" & Request.QueryString("Forum") & "&MID=" & Request.QueryString("MID") & "&mMID=" & Request.QueryString("MID") ) else '' It's not the top of the thread, so recurse Response.Redirect("forum_thread.asp?Forum=" & Request.QueryString("Forum") & "&MID=" & rs("Re") ) End If %>