📄 showpost.asp
字号:
<!-- #include file="setup.asp" --><%
id=Request("id")
if isnumeric(""&id&"") = flase then
error("<li>非法操作")
end if
forumid=Conn.Execute("Select forumid From forum where id="&id)(0)
sql="select * from bbsconfig where id="&forumid&""
rs.Open sql,Conn
''''''''''加密论坛验证'''''''
if rs("pass")<>Request.Cookies("pass") and rs("pass")<>"" then
%>
<script>var id=prompt("此论坛为加密论坛,请输入通行密码!","");if(id){document.location='login.asp?menu=pass&pass='+id+'';}
</script>
<%
message=message&"<li>您的通行密码没有输入"
error(""&message&"")
end if
'''''''''''''''''''''''''''''
bbsname=rs("bbsname")
rs.close
if Request("action")="next" then
sql="select top 1 * from forum where id > "&Request("ID")&" and forumid="&forumid&" and deltopic<>1"
elseif Request("action")="Previous" then
sql="select top 1 * from forum where id < "&Request("ID")&" and forumid="&forumid&" and deltopic<>1 order by id Desc"
else
sql="select * from forum where ID="&Request("ID")&" and forumid="&forumid&""
end if
rs.Open sql,Conn,1,3
if rs.eof or rs.bof then
error"<li>系统不存在该帖子的资料"
end if
if Request.Cookies("username")<>"" then
Set us = Server.CreateObject("ADODB.Recordset")
sql="select * from user where username='"&HTMLEncode(Request.Cookies("username"))&"'"
us.Open sql,Conn,1,3
userface=""&us("userface")&""
membercode=us("membercode")
us.close
set us=nothing
end if
if rs("deltopic")=1 and membercode < 4 then
error2"该主题已经被删除!"
end if
%>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<script>if(top==self)self.location.href='ShowPost.htm?<%=Request.ServerVariables("query_string")%>';var badwords= "<%=badwords%>";</script>
<script src="images/ybb.js"></script>
<script src="images/bbs.js"></script>
<title><%=replace(rs("topic")," <font color=red>(荐)</font>","")%></title>
<link href="images/skins/<%=Request.Cookies("skins")%>/bbs.css" rel="stylesheet">
<body topmargin="0">
<center>
<table cellSpacing="0" cellPadding="1" width="99%" border="0" class="a2">
<tr>
<td width="90%" class="a1"> <img src="images/ie.gif" width="17" height="16">
<b><font color="#ffffff">主题:<%=rs("topic")%> - BBSXP Internet Explorer</font></b></td>
<td align="right" width="10%" class="a1">
<a href="javascript:img();" title="最小化">
<img border="0" src="images/skins/bbs_off.gif"></a><a href="javascript:mid_f()" title="向下还原"><img border="0" src="images/skins/bbs_mid.gif" name="mid"></a><a href="loading.htm" title="关闭"><img border="0" src="images/skins/bbs_close.gif"></a></td>
</tr>
</table>
<title><%=replace(rs("topic")," <font color=red>(荐)</font>","")%></title>
<script>
function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}
function copyText(obj) {var rng = document.body.createTextRange();rng.moveToElementText(obj);rng.select();rng.execCommand('Copy');}
var i=0;
function formCheck(){
document.location='loading.htm'
}
function presskey(eventobject){
if(event.ctrlKey && window.event.keyCode==13){
document.location='loading.htm'
this.document.form.submit();}}
function runEx(){
if (event.srcElement.parentElement.children[0].value.length<1) {alert("请输入代码后按调试代码");return true;}
var winEx = window.open('', '', 'resizable,scrollbars');winEx.document.write(unescape(event.srcElement.parentElement.children[0].value));
}
</script>
<center>
<table width="97%" align="center" border="0">
<tr>
<td valign="top" width="30%"><img src="images/logo.gif" border="0"></td>
<td valign="center" align="top"> <img src="images/closedfold.gif" border="0"> <a onclick="document.location='loading.htm'" target="yuzi_frame" href="Default.asp?menu=listtitle"><%=clubname%></a><br>
<img src="images/bar.gif" border="0"><img src="images/closedfold.gif" border="0"> <a onclick="document.location='loading.htm';" target="yuzi_frame" href="ShowForum.asp?forumid=<%=forumid%>"><%=bbsname%></a><br>
<img src="images/bar.gif" border="0"><img src="images/openfold.gif" border="0"> <%=rs("topic")%></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="97%" align="center" border="0">
<tr>
<td height="35" width="190">
<a onclick="document.location='loading.htm';" target="yuzi_frame" href="newtopic.asp?forumid=<%=rs("forumid")%>">
<img alt="发表一个新主题" src="images/sbutton-post2.gif" border="0"></a> <a onclick="document.location='loading.htm';" target="yuzi_frame" href="retopic.asp?id=<%=rs("id")%>&topic=<%=rs("topic")%>"><img alt="回复帖子" src="images/newreply.gif" border="0"></a></td>
<td align="right" height="35" valign="bottom"><font color="#333333">您是本帖第 <b>
<%=rs("views")%></b> 个阅读者</font>
<img src="images/sendmail.gif" width="17" height="12">
<a target="_blank" href="sendfriend.asp?title=<%=rs("topic")%>">
<font color="#000000">将此页发给您的朋友</font></a>
<a href="?id=<%=rs("id")%>&action=Previous">
<img height="12" alt="浏览上一篇主题" src="images/prethread.gif" width="52" border="0"></a> <a style="text-decoration: none" href="javascript:location.reload()"><img height="12" alt="刷新本主题" src="images/refresh.gif" width="40" border="0"></a> <a href="?id=<%=rs("id")%>&action=next"><img height="12" alt="浏览下一篇主题" src="images/nextthread.gif" width="52" border="0"></a></font></td>
</tr>
</table>
<table width="97%" border="0" cellspacing="1" class="a2" height="21">
<tr class="a1">
<td width="87%" height="18"> <b>主题</b>:<%=rs("topic")%></td>
<td width="13%" align="right" height="18">
<a href="favorites.asp?menu=add&name=<%=rs("topic")%>">
<img alt="把本帖加入论坛收藏夹" src="images/fav.gif" border="0"></a>
<a href="javascript:window.print()">
<img alt="显示可打印的版本" src="images/printpage.gif" border="0"></a>
<a href="javascript:window.external.AddFavorite(location.href,document.title)">
<img alt="把本帖加入IE收藏夹" src="images/fav_add.gif" border="0"></a> </td>
</tr>
</table>
<%
if Request("topage")<2 then
sql="select * from user where username='"&rs("username")&"'"
rs1.Open sql,Conn
sign=rs1("sign")
if sign<>"" then
sign=replace(sign,chr(34),"'")
sign="<table style=TABLE-LAYOUT:fixed><tr><td style=HEIGHT:100px align=right valign=bottom>——————————<br>"&sign&"</td></tr></table>"
end if
if rs1("userhome")<>"" and rs1("userhome")<>"http://" then
userhome="<a target=_blank href="&rs1("userhome")&"><img alt=访问"&rs("username")&"的主页 src=images/homepage.gif border=0></a>"
else
userhome=""
end if
content=rs("content")
content=replace(content,chr(34),"'")
'''''''投票''''''''
if rs("polltopic")<>"" then
if rs("multiplicity")=1 then
multiplicity="checkbox"
else
multiplicity="radio"
end if
content=""&content&"<form action=postvote.asp?id="&rs("id")&" method=POST><table><tr><td><table>"
vote=split(rs("polltopic"),"|")
for i = 0 to ubound(vote)
if not vote(i)="" then
content=""&content&"<tr><td height=22>"&i+1&".<input type="&multiplicity&" value="&i&" name=postvote>"&vote(i)&"</td></tr>"
end if
next
content=""&content&"</table></td><td><table>"
allticket=0
vote=split(rs("pollresult"),"|")
for i = 0 to ubound(vote)
if not vote(i)="" then
content=""&content&"<tr><td height=22 valign=bottom>票数:"&vote(i)&"</td></tr>"
allticket=vote(i)+allticket
end if
next
content=""&content&"</table></td><td><table>"
vote=split(rs("pollresult"),"|")
for i = 0 to ubound(vote)
if not vote(i)="" and allticket<>0 then
content=""&content&"<tr><td height=22 valign=bottom><img src=images/red.gif width="&vote(i)/allticket*100&" height=10> ["&formatnumber(vote(i)/allticket*100)&"%]</td></tr>"
end if
next
content=""&content&"</table></td></tr><TR><TD align=center><INPUT type=submit value=' 投 票 '></TD><TD></TD><TD></TD></TR></table></form>"
end if
'''''''结束投票''''''''
%><table cellspacing="1" cellpadding="0" width="97%" align="center" border="0" class="a2">
<tr>
<td valign="top" align="left" height="78">
<table width="100%" border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td valign="top" class="a3" width="160"><br>
<table cellspacing="0" cellpadding="0" width="90%" align="center" border="0">
<tr>
<td align="left">
<table style="FILTER:glow(color=a4b6d7)">
<caption><b><font color="ffffff" style="font-size:10pt"><%=rs("username")%></font></b></caption>
</table>
<%=rs1("honor")%></td>
</tr>
<tr>
<td align="left" colspan="2" height=10>
<Script>
if (getCookie('showface')!='0'){
document.write("<img src=images/face/<%=rs1("userface")%>.gif height=32 width=32> ")
}
if ("<%=rs1("sex")%>"!=''){
document.write("<img src=images/<%=rs1("sex")%>.gif> ")
}
if ("<%=rs1("constellation")%>"!=''){
document.write("<img src=images/star/<%=rs1("constellation")%>.gif>")
}
</Script>
</td>
</tr>
<tr>
<td align="left" colspan="2"><Script>document.write(level(<%=rs1("experience")%>,<%=rs1("membercode")%>)+levelimage+"<br>等 级:"+levelname);</Script><br>
门 派:<%
if ""&rs1("faction")&""="" then
response.write "无"
else
response.write rs1("faction")
end if
%><br>
经 验 值:<%=rs1("experience")%> <br>
社区银两:<%=rs1("money")%><br>
总发贴数:<%=rs1("posttopic")+rs1("postrevert")%> <br>
注册日期:<%=rs1("regtime")%><br>
体 力 值:<img border="0" src="images/red.gif" width="<%=rs1("userlife")/2%>" height="9" alt="<%=rs1("userlife")%>">
</td>
</tr>
</table>
</td>
<td valign="bottom" align="middle" height="100%" class="a3">
<table height="100%" cellspacing="0" cellpadding="0" width="1" class="a2">
<tr>
<td width="1"></td>
</tr>
</table>
</td>
<td valign="top" align="left" height="100%" class="a3">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td colspan="3">
<a onclick="document.location='loading.htm';" target="yuzi_frame" href="Profile.asp?username=<%=rs("username")%>">
<img alt="查看<%=rs("username")%>的个人资料" src="images/Profile.gif" border="0"></a>
<a href="#" onclick="javascript:open('friend.asp?menu=post&incept=<%=rs("username")%>','','width=320,height=170')">
<img src="images/pm.gif" border="0" alt="发送短讯息给<%=rs("username")%>"></a>
<a href="friend.asp?menu=add&username=<%=rs("username")%>">
<img alt="把<%=rs("username")%>加入好友" src="images/friend.gif" border="0"></a>
<a onclick="document.location='loading.htm';" target="yuzi_frame" href="ShowForum.asp?forumid=<%=rs("forumid")%>&search=author&key=<%=rs("username")%>">
<img alt="搜索<%=rs("username")%>在『<%=bbsname%> 』的所有主题" src="images/find.gif" border="0"></a>
<a href="mailto:<%=rs1("usermail")%>">
<img alt="发送电邮给<%=rs("username")%>" src="images/email.gif" border="0"></a>
<%=userhome%> <a href="javascript:copyText(document.all.yu);">
<img alt="复制这个帖子" src="images/copy.gif" border="0"></a>
<a onclick="document.location='loading.htm';" target="yuzi_frame" href="retopic.asp?id=<%=rs("id")%>"e=1&topic=<%=rs("topic")%>">
<img alt="引用回复这个帖子" src="images/reply.gif" border="0"></a>
<a onclick="document.location='loading.htm';" target="yuzi_frame" href="retopic.asp?id=<%=rs("id")%>&topic=<%=rs("topic")%>">
<img src="images/replynow.gif" border="0" alt="回复这个帖子"></a></td>
</tr>
<tr>
<td colspan="3"><hr width="100%" color="#777777" size="1"></td>
</tr>
<tr valign="top" height="140">
<td colspan="3"><Script>document.write(ybbcode("<span id=yu<%=id%>><%=content%></span><p><%=sign%></p>"));</Script>
</td>
</tr>
<tr valign="top">
<td height="7" colspan="3">
<hr width="100%" color="#777777" size="1"></td>
</tr>
<tr valign="top">
<td>
<a onclick="document.location='loading.htm';" target="yuzi_frame" href="EditTopic.asp?id=<%=rs("id")%>&topic=<%=rs("topic")%>">
<img src="images/edit.gif" border="0"></a>
<a target="yuzi_frame" onclick="checkclick('您确定要删除主题?');onclick=document.location='loading.htm';" style="text-decoration: none; color: #000000" href="manage.asp?menu=deltopic&id=<%=rs("id")%>">
<img src="images/del.gif" border="0"></a></td>
<td><img src="images/posttime.gif"> 发表时间:<%=rs("posttime")%> </td>
<td align="right"><img src="images/ip.gif"> IP:<a href="manage.asp?menu=lookip&id=<%=rs("id")%>">已记录</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
rs1.close
rs("views")=rs("views")+1
rs.update
end if
id=rs("id")
act=rs("topic")
replies=rs("replies")
locktopic=rs("locktopic")
goodtopic=rs("goodtopic")
toptopic=rs("toptopic")
rs.close
if replies > 0 then
pagesetup=15 '设定帖子每页的显示数量
sql="select * from reforum where topicid="&id&" order by id"
rs.Open sql,Conn
if rs.eof then
conn.execute("update [forum] set replies=0 where id="&id&"")
htmlend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -