📄 topic.asp
字号:
IP = rsIP("T_IP")
Title = rsIP("T_Subject")
else
if Request.QueryString("REPLY_ID") <> "" then
'## Forum_SQL
strSql = "SELECT " & strTablePrefix & "REPLY.R_IP "
strSql = strSql & " FROM " & strTablePrefix & "REPLY "
strSql = strSql & " WHERE REPLY_ID = " & Request.QueryString("REPLY_ID")
rsIP = my_Conn.Execute(strSql)
IP = rsIP("R_IP")
end if
end if
set rsIP = nothing
%>
<P align=center><b>查看会员IP地址:</b><br>
<% =ip %></P>
<% else %>
<p align=center><b>只有版主和管理员才能执行此功能</B></p>
<%
end If
end sub
sub PostingOptions()
%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<%
if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (STRdbntUserName = "") then
'############### READ/WRITE ACCESS ###########################
if cInt(strPrivateForums) < 11 or AdminAllowed = 1 then
if ((rsCStatus("CAT_STATUS") = 1) and (rsFStatus("F_STATUS") = 1)) then %>
<a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_topic.gif" height=15 width=15 border=0></a> <a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">发表新主题</a>
<% else
if (AdminAllowed = 1) then %>
<a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_locked.gif" height=15 width=15 border=0></a> <a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">发表新主题</a>
<% else %>
<img src="<%=strImageURL %>icon_folder_locked.gif" height=15 width=15 border=0> 论坛已锁定
<% end if
end if
end if
'############### READ/WRITE ACCESS ###########################
if (cint(strPrivateForums) <> 10 and cint(strPrivateForums) <> 12) or AdminAllowed = 1 then
if (rsCStatus("CAT_STATUS") = 1) and (rsFStatus("F_STATUS") = 1) and (rsTStatus("T_STATUS") = 1) then %>
<a href="post.asp?method=Reply&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_reply_topic.gif" height=15 width=15 border=0></a> <a href="post.asp?method=Reply&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">回复主题</a>
<% Else
if (AdminAllowed = 1) then %>
<a href="post.asp?method=Reply&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_closed_topic.gif" height=15 width=15 border=0></a> <a href="post.asp?method=Reply&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">回复主题</a>
<% Else %>
<img src="<%=strImageURL %>icon_closed_topic.gif" height=15 width=15 border=0> 主题已锁定
<% end if
end if
end if
if (lcase(strEmail) = "1") then
if (mlev <> 0) or (mlev = 0 and strLogonForMail <> "1") then %>
<a href="JavaScript:openWindow('pop_send_to_friend.asp?url=<% = strForumURL & "link.asp&TOPIC_ID=" & Request.QueryString("TOPIC_ID") %>')"><img border="0" src="<%=strImageURL %>icon_send_topic.gif" height=15 width=15 border=0></a> <a href="JavaScript:openWindow('pop_send_to_friend.asp?url=<% = strForumURL & "link.asp&TOPIC_ID=" & Request.QueryString("TOPIC_ID") %>')">将本主题寄给朋友</a>
<!-- <a href="JavaScript:openWindow('pop_send_to_friend.asp?url=http://<% =Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL") & "?" & Request.QueryString %>')"><img border="0" src="<%=strImageURL %>icon_send_topic.gif" height=15 width=15 border=0></a> <a href="JavaScript:openWindow('pop_send_to_friend.asp?http://<% =Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL") & "?" & Request.QueryString %>')">将本主题寄给朋友</a> -->
<% end if
end if %>
<% end if %>
</font>
<%
end sub
sub AdminOptions()
%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<% if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then
if (rsCStatus("CAT_STATUS") = 0) then
if (mlev = 4) then %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=<% =Request.QueryString("CAT_ID") %>')"><img border="0" src="<%=strImageURL %>icon_folder_unlocked.gif" alt="解开分类锁定" height=15 width=15 border=0></a>
<% else %>
<img border="0" src="<%=strImageURL %>icon_folder_unlocked.gif" alt="分类已锁定" height=15 width=15 border=0>
<% end if
else
if (rsFStatus("F_STATUS") = 0) then %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')"><img border="0" src="<%=strImageURL %>icon_folder_unlocked.gif" alt="解开论坛锁定" height=15 width=15 border=0></a>
<% else
if (rsTStatus("T_STATUS") <> 0) then %>
<a href="JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"JSurlpath") %>')"><img border="0" src="<%=strImageURL %>icon_folder_locked.gif" alt="锁定论坛" height=15 width=15 border=0></a>
<% else %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"JSurlpath") %>')"><img border="0" src="<%=strImageURL %>icon_folder_unlocked.gif" alt="解开主题锁定" height=15 width=15 border=0></a>
<% end if
end if
end if %>
<% if ((rsCStatus("CAT_STATUS") <> 0) and (rsFStatus("F_STATUS") <> 0) and (rsTStatus("T_STATUS") <> 0)) or (AdminAllowed = 1) then %>
<a href="post.asp?method=EditTopic&REPLY_ID=<% =Request.QueryString("TOPIC_ID") %>&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_pencil.gif" alt="编辑主题" border="0" hspace="0"></a>
<% end if %>
<a href="JavaScript:openWindow('pop_delete.asp?mode=Topic&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"JSurlpath") %>')"><img border="0" src="<%=strImageURL %>icon_folder_delete.gif" alt="删除主题" height=15 width=15 border=0></a>
<a href="post.asp?method=Topic&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_folder_new_topic.gif" alt="发表新主题" height=15 width=15 border=0></a>
<a href="post.asp?method=Reply&TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"><img src="<%=strImageURL %>icon_reply_topic.gif" alt="回复主题" height=15 width=15 border=0></a>
<% end if %>
</font>
<%
end sub
sub Paging()
if maxpages > 1 then
if Request.QueryString("whichpage") = "" then
pge = 1
else
pge = Request.QueryString("whichpage")
end if
scriptname = request.servervariables("script_name")
Response.Write("<table border=0 width=100% cellspacing=0 cellpadding=1 align=top><tr>")
for counter = 1 to maxpages
if counter <> cint(pge) then
ref = "<td align=right ><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & ">" & " " & widenum(counter) & "<a href='" & scriptname
ref = ref & "?whichpage=" & counter
'ref = ref & "&pagesize=" & mypagesize
'####################################
if sortorder = "1" then
ref = ref & "&sort=" & sortorder
else
if sortorder = "2" then
ref = ref & "&sort=" & sortorder
end if
end if
'####################################
ref = ref & "&Forum_Title=" & ChkString(Request.QueryString("FORUM_Title"),"urlpath")
ref = ref & "&Topic_Title=" & ChkString(Request.QueryString("Topic_Title"),"urlpath")
ref = ref & "&CAT_ID=" & Request.QueryString("CAT_ID")
ref = ref & "&FORUM_ID=" & Request.QueryString("FORUM_ID")
ref = ref & "&TOPIC_ID=" & Request.QueryString("TOPIC_ID") & "'"
if top = "1" then
ref = ref & ">"
ref = ref & "</font><b><font face='" & strDefaultFontFace & "' "
ref = ref & "color='" & strHeadFontColor & "'"
ref = ref & ">" & counter & "</font></b></a></td>"
Response.Write ref
else
ref = ref & "'>" & counter & "</font></a></td>"
Response.Write ref
end if
else
Response.Write("<td align=right bgcolor=" & strPageBGColor & "><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & ">" & " " & widenum(counter) & "<b>" & counter & "</b></font></td>")
end if
if counter mod strPageNumberSize = 0 then
Response.Write("</tr><tr>")
end if
next
Response.Write("</tr></table>")
end if
top = "0"
end sub
Sub Topic_nav()
set rsLastPost = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT T_LAST_POST FROM " & strTablePrefix & "TOPICS "
strSql = strSql & "WHERE TOPIC_ID = " & Request.QueryString("TOPIC_ID")
set rsLastPost = my_Conn.Execute (StrSql)
T_LAST_POST = rsLastPost("T_LAST_POST")
strSQL = "SELECT T_SUBJECT, TOPIC_ID "
strSql = strSql & "FROM " & strTablePrefix & "TOPICS "
strSql = strSql & "WHERE T_LAST_POST > '" & T_LAST_POST
strSql = strSql & "' AND FORUM_ID=" & Request.QueryString("Forum_ID")
strSql = strSql & " ORDER BY T_LAST_POST;"
set rsPrevTopic = my_conn.Execute (strSQL)
strSQL = "SELECT T_SUBJECT, TOPIC_ID "
strSql = strSql & "FROM " & strTablePrefix & "TOPICS "
strSql = strSql & "WHERE T_LAST_POST < '" & T_LAST_POST
strSql = strSql & "' AND FORUM_ID=" & Request.QueryString("Forum_ID")
strSql = strSql & " ORDER BY T_LAST_POST DESC;"
set rsNextTopic = my_conn.Execute (strSQL)
if rsPrevTopic.EOF then
prevTopic = "<img src=""" & strImageURL & "icon_blank.gif"" height=15 width=15 alt=""上一个主题"" border=""0"" align=""absmiddle"" hspace=""6"">"
else
prevTopic = "<a href=topic.asp?cat_id=" & request.queryString("CAT_ID") & _
"&FORUM_ID=" & Request.QueryString("FORUM_ID") & _
"&TOPIC_ID=" & rsPrevTopic("TOPIC_ID") & _
"&Topic_Title=" & ChkString(rsPrevTopic("T_SUBJECT"),"urlpath") & _
"&Forum_Title=" & ChkString(Request.QueryString("Forum_Title"),"urlpath") & _
"><img src=""" & strImageURL & "1-prev.gif"" alt=""上一个主题"" border=""0"" align=""absmiddle"" hspace=""6""></a>"
end if
if rsNextTopic.EOF then
NextTopic = "<img src=""" & strImageURL & "icon_blank.gif"" height=15 width=15 alt=""上一个主题"" border=""0"" align=""absmiddle"" hspace=""6"">"
else
NextTopic = "<a href=topic.asp?cat_id=" & request.queryString("CAT_ID") & _
"&FORUM_ID=" & Request.QueryString("FORUM_ID") & _
"&TOPIC_ID=" & rsNextTopic("TOPIC_ID") & _
"&Topic_Title=" & ChkString(rsNextTopic("T_SUBJECT"),"urlpath") & _
"&Forum_Title=" & ChkString(Request.QueryString("Forum_Title"),"urlpath") & _
"><img src=""" & strImageURL & "1-next.gif"" alt=""下一个主题"" border=""0"" align=""absmiddle"" hspace=""6""></a>"
end if
Response.Write (prevTopic & "<b><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>主题:" & Request.QueryString("Topic_Title") & " </font></b>" & nextTopic)
rsLastPost.close
rsPrevTopic.close
rsNextTopic.close
set rsLastPost = nothing
set rsPrevTopic = nothing
set rsNextTopic = nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -