Shaggy,
I never did figure out what that green line is for, whether that is the only line that needs changed or something else.
When I looked around line 202 of topic.asp, I found the following code. Are you saying I should replace it entirely with everything you have?
if mypage = -1 and Request.QueryString("REPLY_ID") <> "" then
strSql1 = "SELECT REPLY_ID "
strSql2 = "FROM " & strActivePrefix & "REPLY "
strSql3 = "WHERE TOPIC_ID = " & Topic_ID & " "
' DEM --> if not a Moderator, all unapproved posts should not be viewed.
if AdminAllowed = 0 then
strSql3 = strSql3 & "AND (R_STATUS < "
if Moderation = "Y" then
' Ignore unapproved/rejected posts
strSql3 = strSql3 & "2 "
else
' Ignore any previously rejected topic
strSql3 = strSql3 & "3 "
end if
strSql3 = strSql3 & "OR R_AUTHOR = " & MemberID & ") "
end if
strSql4 = "ORDER BY R_DATE ASC "
if strDBType = "mysql" then
set rsReplies = Server.CreateObject("ADODB.Recordset")
rsReplies.open strSql1 & strSql2 & strSql3 & strSql4, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsReplies.EOF then
iReplyCount = ""
else
arrReplyData = rsReplies.GetRows(adGetRowsRest)
iReplyCount = UBound(arrReplyData, 2)
rREPLY_ID = 0
end if
LastPostReplyID = cLng(Request.QueryString("REPLY_ID"))
if iReplyCount <> "" then
for iReply = 0 to iReplyCount
intReplyID = arrReplyData(rREPLY_ID,iReply)
if LastPostReplyID = intReplyID then
intPageNumber = ((iReply+1)/strPageSize)
if intPageNumber > cLng(intPageNumber) then
intPageNumber = cLng(intPageNumber) + 1
end if
strwhichpage = "whichpage=" & intPageNumber & "&"
exit for
end if
next
else
strwhichpage = ""
end if
rsReplies.Close
set rsReplies = nothing
else
set rsReplies = Server.CreateObject("ADODB.Recordset")
rsReplies.cachesize = strPageSize
rsReplies.pagesize = strPageSize
rsReplies.open strSql1 & strSql2 & strSql3 & strSql4, my_Conn, adOpenStatic, adLockReadOnly, adCmdText
LastPostReplyID = cLng(Request.QueryString("REPLY_ID"))
rsReplies.Find = "REPLY_ID=" & LastPostReplyID & ""
if not (rsReplies.EOF or rsReplies.BOF) then
if rsReplies.absolutepage > 1 then strwhichpage = "whichpage=" & rsReplies.absolutepage & "&"
else
strwhichpage = ""
end if
rsReplies.Close
set rsReplies = nothing
end if
Response.Redirect("topic.asp?" & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "")
Response.End
end if
<