📄 showthread.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/BBSConfig.asp"-->
<!--#include file="INC/online.asp"-->
<!--#include file="INC/ShowMsg.asp"-->
<!--#include file="INC/header.asp"-->
<!--#include file="INC/CHAR.INC"-->
<!--#include file="INC/Board_Config.asp"-->
<!--#include file="INC/usergrade.asp"-->
<%
'****************************************************************
'* joinboard BBS Ver2.3.0/友盟论坛 Ver2.3.0
'*
'* 版权所有: JoinBoard V2.3
'*
'* 程序制作: 友盟工作室
'*
'* 主页地址: http://joinboard.com 友盟论坛
'*
'* 论坛地址: http://bbs.joinboard.com/、http://youmeng.com
'*
'****************************************************************
'* Powered by: JoinBoard V2.3
'* Copyright 2003-2004. - All Rights Reserved.
'* JoinBoard is a trademark of YouMeng Studio.
'****************************************************************
threadid = trim(request.QueryString("threadid"))
if Not(IsNumeric(threadid)) or threadid = "0" then
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
response.End()
End if
GotoX = trim(request.QueryString("Goto"))
if GotoX = "front" then
whereStr = "threadid<"&threadid&" order By threadid desc"
elseif GotoX = "next" then
whereStr = "threadid>"&threadid&" order By threadid asc"
else
whereStr = "threadid="&threadid
End if
set rs = Conn.ExeCute("select Top 1 threadid,thread_title,Board_ID,pollid,replycount,viewcount,rating,openpost From JBB_thread where "&whereStr)
if Not rs.eof then
threadid = rs("threadid")
if rs("openpost") then openpost = true
pollID = rs("pollID")
if rs("pollid") > 0 then poll = true
BoardID = rs("Board_ID")
replycount = rs("replycount")
viewcount = rs("viewcount")
thread_title = rtrim(rs("thread_title"))
rating = trim(rs("rating"))
Board_info BoardID
Board_Config = Application(JBBMasterCookies&"Board_Config"&BoardID)
title = Board_Config(2)
if Board_Config(6)=true then styleid = Board_Config(5)
Conn.exeCute("update JBB_thread set viewcount=viewcount+1 where threadid="&threadid)
else
%>
<!--#include file="INC/style.asp"-->
<%
set rs = Nothing
response.Write("<html><head><title>"& Board_Name&" - 错误信息"&"</title><link href="&Css_path&" rel=""stylesheet"" type=""text/css""></head><body leftmargin=""0"" topmargin=""0"">")
Call top()
ShowMsg "该文章不存在或者已经删除!~请点击 <a href=""javascript:history.back()"">这里</a> 返回"
Call bottom()
response.End()
End if
set rs = Nothing
%>
<!--#include file="INC/style.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="joinboard,forum,bbs,youmeng,友盟论坛">
<script>
function gopreview()
{
document.preview.txtcontent.value=document.myform.txtcontent.value;
var popupWin = window.open('', 'preview_page','scrollbars=yes,width=550,height=400');
document.preview.submit()
}
</script>
<title><%=BBS_Config(0)&" - "&thread_title%></title>
<link href="<%=Css_path%>" rel="stylesheet" type="text/css">
<script language="JavaScript" >
<!--
function openWin(url){
exampleWin = window.open(url,"exampleWin",'width=360,height=500,resizable=no,scrollbars=yes,menubar=no,status=no' );
exampleWin.focus();
exampleWin.moveTo(200,2);
}
//-->
</script>
<script src=inc/thread.js></script>
</head>
<body leftmargin="0" topmargin="0">
<%
Call onlineuser()
call top()
response.Write "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""path-table"">"
response.Write "<tr><td>"
response.Write "<img src="""& BBS_Skin(3) &"JBB_bullet.gif""> <a href="""&BBSHomeUrl&""">"& BBS_Config(0) &"</a> <img src="""& BBS_Skin(3) &"JBB_bullet.gif""> <a href=""board.asp?BoardID="& BoardID &""">"& Board_Config(2) &"</a> <img src="""& BBS_Skin(3) &"JBB_bullet.gif""> <a href=""showthread.asp?threadID="& threadID &"""><strong>"& thread_title &"</strong></a>"
response.Write "</td></tr></table>"
%>
<br>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<%
'=========================================================
set rsonline = server.CreateObject("adodb.recordset")
rsonline.open "select Uname,usergroup,userid,userhidden from JBB_online where threadID="&threadID &" order By userid desc",conn,1,1
if Not rsonline.Eof then
onlinecount = rsonline.recordCount
%>
<tr>
<td class="table-title"> <img src="<%=BBS_Skin(3)%>img.gif"> 当前有 <%=onlinecount%> 人在阅读此主题</td>
</tr>
<tr>
<td class="table-light"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
for o_tr = 1 to onlinecount
if rsonline.eof then exit for
%>
<tr>
<%
for o_td = 1 to 6
if rsonline.eof then exit for
%>
<td>
<%
if rsonline(1) <= 6 then
userimg="<img src=images/"& rsonline(1) &".gif>"
End if
if rsonline(0) <> "游客" then
if rsonline("userhidden") and usergroup <> 1 then
response.Write("<img src=images/7.gif> 隐身会员")
else
response.Write(userimg+"<a href=""user.asp?userid="& rtrim(rsonline(2)) &""">"&rtrim(rsonline(0))&"</a>")
End if
else
response.Write(userimg & rtrim(rsonline(0)))
End if
%>
</td>
<%
rsonline.MoveNext
Next
%>
</tr>
<%
Next
%>
</table></td>
</tr>
<%
End if
rsonline.close
set rsonline = Nothing
%>
</table>
<%
if Board_Config(18) = True then
if usergroup <= 4 then
enter = true
End if
else
enter = true
End if
if enter <> true or user_group(3) <> true then
ShowMsg "对不起!~您没有权限浏览此论坛的贴子,请点击 <a href=""javascript:history.back()"">这里</a> 返回."
Call Bottom()
response.End
End if
%>
<table height="38" border="0" align="center" cellpadding="0" cellspacing="0" class="table-noColor">
<tr>
<td>本主题 人气:<%=viewcount+1&" 回复:"&replycount%></td>
<td><div align="right"><a href="showthread.asp?threadID=<%=threadID%>&Goto=front"><<
上一主题</a> <a href="showthread.asp?threadID=<%=threadID%>&Goto=next">下一主题>></a></div></td>
<%
if Reads <> true or usergroup <= 4 then
%>
<td width="80"> <div align="right"><a href="newthread.asp?BoardID=<%=BoardID%>"><img src="<%=BBS_Skin(3)%>postnew.gif" border="0"></a></div></td>
<td width="80"> <div align="right"><a href="newvote.asp?BoardID=<%=BoardID%>"><img src="<%=BBS_Skin(3)%>votenew.gif" border="0"></a></div></td>
<%
End if
if Reads <> true or usergroup <= 4 or openpost=true then
%>
<td width="80"> <div align="right">
<%
if openpost = true then
%>
<a href="newreply.asp?threadID=<%=threadID%>"><img src="<%=BBS_Skin(3)%>reply.gif" border="0"></a></div></td>
<%
else
response.Write("<img src="""&BBS_Skin(3)&"postclose.gif"" border=""0"">")
End if
End if%>
</tr>
</table>
<%
'--------------------显示投票--------------------------
if poll = true then
dim votes
set rs = Conn.ExeCute("select * from JBB_poll where pollID="&pollID)
if Not(rs.eof and rs.bof) then
response.Write"<table border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" class=""table""><tr><td class=""table-title"" colspan=""2""> [投票]:"&thread_title&"</td></tr><form action=""vote.asp?pollID="&PollID&"&threadID="& threadID &""" method=""POST"">"
vote=split(rs("options"),"||")
votes=split(rs("votes"),"||")
time_out = trim(rs("time_out"))
polltime = trim(rs("times"))
votes_1 = 0
for vi = 0 to ubound(votes)
votes_1=cint(votes_1)+votes(vi)
next
if votes_1=0 then votes_1=1
for m = 0 to ubound(vote)
g=g+1
if g=11 then g=1
if not(rs("polltype")) then
votetype="<input type=""radio"" name=""votevalue"" value="""&m&""">"
else
votetype="<input type=""checkbox"" name=""votevalue_"&m&""" value="""&m&""">"
end if
response.write "<tr class=""table-dark""><td width=""40%"" height=25> "&m+1&"."&votetype & htmlencode(vote(m))&"</td><td width=""60%""><img src=""images/vote/"& g &".gif"" width="""&replace(FormatPercent(votes(m)/votes_1),"%","")*3.3&""" height=8> <b>"&votes(m)&"票</b></td></tr>"
next
if userOnline <> true then
response.write "<tr><td colspan=""2"" height=""25"" class=""table-title"">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -