⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbsshow.asp

📁 1. 硬件环境:MS WINDOWS NT PACK 4 OR LATER /WIN2000 WITH IIS 4.0 OR LATER /WIN9X+PWS 2. 数 据 库:Access2000
💻 ASP
📖 第 1 页 / 共 2 页
字号:
rs.pagesize=15
if IsNumEric(page)=False Then Error 2,"非法操作!\n您的IP已被记录!",""
page=Cint(page)
num=rs.recordcount
maxpage=rs.pagecount
if page > rs.pagecount Then page=rs.pagecount
if Not Rs.Eof Then showonepage rs,page
if maxpage < 1 Then maxpage=1
%>
	<table width="100%" border="0">
	<tr><td>本主题共有 <font color="#CC3300"> <strong><%= maxpage %></strong> </font>页 <strong>[ <% Npage page,maxpage,Bbs %>]</strong></td>
	<td><div align="right">页:[ <font color="#CC3300"><strong><%= page %></strong></font> ]</div></td></tr></table>
	<br>
<!----------------------------------------------快速回复-------------------------------------------->

	<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=5 width=100% border=1 style="border-collapse: collapse">
	<form name="form" method="post" action=AddnewTop.asp?menu=Quikly&BbsId=<%=BbsId%>&Bbs=<%= Bbs %>&page=<%= page %> onsubmit="return formCheck()"><TBODY>
	<TR><TD width="19%" height=15% background=images/title_sub.gif><B><FONT color=#333333>&nbsp;快速回复主题</FONT></B></TD>
	<TD width="81%" background=images/title_sub.gif><B><FONT color=#333333>Re:<%=Title%></FONT></B></TD></TR>
	<TR><TD width="19%" height=22%>&nbsp;输入用户名和密码</TD>
	<TD width="81%" valign=middle><center>用户名称:<INPUT size=15 name=username value='<%=Request.Cookies("username")%>' maxLength=20 >
	<a href="register.asp">没有注册?</a> 密码:<INPUT type=password size=15 name=userpass value='<%=Request.Cookies("password")%>'>
	<a href="modification.asp">忘记密码?</a></center></TD></TR>
	<TR><TD width="19%" height="63%"><INPUT type=checkbox value=1 name=htmlcode>HTML语法<BR>
	<INPUT type=checkbox value=1 name=ybbcode> 禁止YBB代码</A><BR>
	<INPUT type=checkbox value=1 name=smilies> 禁止表情字符</A><br>
	</TD><TD vAlign=top align=middle width="81%"> 
	<TEXTAREA name=content rows=6 style="width:90%" onkeydown=presskey()></TEXTAREA><BR>
	<INPUT tabIndex=4 type=submit value="Ctrl+Enter 回复主题"  name=submit1 onclick="return formCheck()">  <INPUT onclick=runEx() type=button value=" 调试代码 ">  <INPUT type=reset value=" 重 写 " name=reset onclick="checkclick('该项操作要清除全部的内容,您确定要清除吗?')"></TD></TR></TBODY></form></TABLE>
	<br><center>
<% If Request.Cookies("Product")<>"" Then 
If Cint(Request.Cookies("Product")) > 2 Then %>
管理选项: <a href=?menu=LaQian&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>拉前主题</a> | <a href=?menu=Close&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>关闭主题</a> | <a href=?menu=Open&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>打开主题</a> | <a href=?menu=TopTop&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>主题置顶</a> | <a href=?menu=Cancel&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>取消置顶</a> | <a href=?menu=GoodTop&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>添加到精华区</a> | <a href=?menu=MoveBbs&Bbsid=<%=BbsId%>&Bbs=<%= Bbs %>>移动主题</a> | <a onclick="checkclick('您确定要删除主题?')"  href="?menu=deltop&Delid=<%=BbsId%>&Bbs=<%= Bbs %>&BbsID=<%= BbsID %>">删除主题</a> </center>
<% End If 
End if%></center>

<%
Rs.Close
Set Rs = Nothing
Htmlend
sub showonepage(rs,page)
	rs.absolutepage=page
	For ipage=1 to rs.pagesize
	rsToGbook rs
	Response.Flush

	rs.MoveNext
	if rs.EOF Then Exit For
	Next
end sub

sub RsToGbook(rs)
if Rs("UserSex")=False Then
	Sex="♀"
Else
	Sex="♂"
End if
Uleve=UserGroups(Rs("UserGrade"))
%>
	<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=1  borderColor="#a4b6d7" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none; border-collapse:collapse">
	<TBODY><TR>
	<TD vAlign=top align=left height=78>
	<TABLE cellSpacing=0 cellPadding=3 width=100% border=0>
	<TBODY><TR><TD vAlign=top width=20%  class=3 height=106>
	<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
	<TBODY>
	<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></TD>
	<TD align=left width=35> <b><font color=008080><%=Sex%> </b></TD></TR>
	<TR><TD align=left height=42 colspan="2"><IMG onload='javascript:if(this.width>80){this.width=80};if(this.height>80){this.height=80}'src="images/face/<%=Rs("UserHead")%>.gif"></TD></TR>
	<TR><TD align=left height=17 colspan="2"><IMG src="images/level<%=Rs("UserGrade")%>.gif" ></TD></TR>
	<TR><TD align=left height=54 colspan="2">等  级:<%=Uleve%><BR>
	社区存款:<%=Rs("UserMoney")%><BR>
	注册日期:<%=Rs("UserAddtime")%></TD></TR></TBODY></TABLE></TD>
	<TD vAlign=bottom align=middle width=1% height=106 class=3><TABLE height="100%" cellSpacing=0 cellPadding=0 width=1 Border=1 borderColor="#a4b6d7">
	<TBODY><TR>
	<TD width=1></TD></TR></TBODY></TABLE></TD><TD vAlign=top align=left width=79% height=106 class=3> 
	<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
	<TBODY><TR><TD colspan="3">
	<a href=ShowUserInfo.asp?UsId=<%=rs("UsID")%>><IMG alt=查看<%=rs("username")%>的个人资料 src="images/profile.gif" border=0></a> 
	<a href=# onclick="javascript:open('friend.asp?menu=post&inceptID=<%=rs("UsID")%>','','width=320,height=170')"> <img src="images/pm.gif" border="0" alt="发送短讯息给<%=rs("username")%>"></a>&nbsp; 
	<a href="BbsList.asp?Menu=Search&key=<%=rs("UsID")%>"><IMG alt="搜索<%=Rs("UserName_2")%>发表的所有主题" src="images/find.gif" border=0 ></a> 
	<a href="javascript:copyText(document.all.Text<%= rs("ReID") %>);"> <IMG alt=复制这个帖子 src="images/copy.gif" border=0></a> 
	<a href=AddnewTop.asp?menu=Rebbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>&Quote=<%= Rs("ReID") %>&page=<%= page %>><IMG alt=引用回复这个帖子 src="images/reply1.gif" border=0></a>&nbsp;<a href=AddnewTop.asp?menu=Rebbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>&page=<%= page %>><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"><span id=Text<%= rs("ReID") %>>
	<%=Rs("content")%></span></TD></TR>
	<TR vAlign=top>
	<TD height=7 colspan="3">
	<HR width="100%" color=#777777 SIZE=1>
	</TD></TR><TR vAlign=top><TD>
	<a href="AddnewTop.asp?menu=EditRebbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>&EditId=<%= Rs("ReID") %>&page=<%= page %>"><img src="images/edit.gif" border="0"></a>
	<a onclick="checkclick('您确定要删除回复?')" style="text-decoration: none; color: #000000" href="?menu=deltopic&Delid=<%=rs("ReID")%>&Bbs=<%= Bbs %>&BbsID=<%= BbsID %>&page=<%= page %>"><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 style="cursor:hand;" onclick="javascript:open('?menu=lookreip&Bbsid=<%=rs("ReID")%>&bbs=<%= Bbs %>','','width=320,height=170')">已记录</a></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<%

end sub

Sub Npage(page,Allpage,Bbs)
a=page-5
b=page+5
if page > 6 Then Response.write "<a href=?Menu="&menu&"&BbsID="&BbsID&"&page=1&Bbs="&Bbs&">1</a> ...&nbsp;"
	For a=a to b
	if a > 0 and a <= Allpage  Then 
	Response.write "<a href=?Menu="&menu&"&BbsID="&BbsID&"&page="&a&"&Bbs="&Bbs&">"&a&"</a>&nbsp;"
	End if
	Next
if Page < Allpage - 5 Then Response.write "... <a href=?Menu="&menu&"&BbsID="&BbsID&"&page="&Allpage&"&Bbs="&Bbs&">"&Allpage&"</a>&nbsp;"
End Sub


Sub TTop
	if Rs.eof or Rs.bof Then Error 2,TUserid,""
	if Rs("UserSex")=False Then
	Sex="♀"
	Else
	Sex="♂"
	End if

	Uleve=UserGroups(Rs("UserGrade"))
	%>
	<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=1  borderColor="#a4b6d7" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none; border-collapse:collapse">
	<TBODY><TR>
	<TD vAlign=top align=left height=78>
	<TABLE cellSpacing=0 cellPadding=3 width=100% border=0>
	<TBODY><TR><TD vAlign=top width=20%  class=3 height=106>
	<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
	<TBODY>
	<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></TD>
	<TD align=left width=35> <b><font color=008080><%=Sex%> </b></TD></TR>
	<TR><TD align=left height=42 colspan="2"><IMG src="images/face/<%=Rs("UserHead")%>.gif" onload='javascript:if(this.width>80){this.width=80};if(this.height>80){this.height=80}'></TD></TR>
	<TR><TD align=left height=17 colspan="2"><IMG src="images/level<%=Rs("UserGrade")%>.gif" ></TD></TR>
	<TR><TD align=left height=54 colspan="2">等  级:<%=Uleve%><BR>
	社区存款:<%=Rs("UserMoney")%><BR>
	注册日期:<%=Rs("UserAddtime")%></TD></TR></TBODY></TABLE></TD>
	<TD vAlign=bottom align=middle width=1% height=106 class=3><TABLE height="100%" cellSpacing=0 cellPadding=0 width=1 Border=1 borderColor="#a4b6d7">
	<TBODY><TR>
	<TD width=1></TD></TR></TBODY></TABLE></TD><TD vAlign=top align=left width=79% height=106 class=3> 
	<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
	<TBODY><TR><TD colspan="3">
	<a href=ShowUserInfo.asp?UsId=<%=rs("UserID")%>><IMG alt=查看<%=rs("username")%>的个人资料 src="images/profile.gif" border=0></a> 
	<a href=# onclick="javascript:open('friend.asp?menu=post&inceptID=<%=rs("UserID")%>','','width=320,height=170')"> 
	<img src="images/pm.gif" border="0" alt="发送短讯息给<%=rs("username")%>"></a>&nbsp; 
	<a href="BbsList.asp?Menu=Search&BbsID=<%=Rs("bbsID")%>&key=<%=rs("UserID")%>"><IMG alt="搜索<%=rs("username")%>在『<%=bbsname%> 』的所有主题" src="images/find.gif" border=0 ></a> 
	<a href="javascript:copyText(document.all.Text);"> <IMG alt=复制这个帖子 src="images/copy.gif" border=0></a> 
	<a href=AddnewTop.asp?menu=Rebbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>&Quot=<%= BbsID %>><IMG alt=引用回复这个帖子 src="images/reply1.gif" border=0></a>&nbsp;<a href=AddnewTop.asp?menu=Rebbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>><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"><span id=Text>
	<%=Rs("content")%></span></TD></TR>
	<TR vAlign=top>
	<TD height=7 colspan="3">
	<HR width="100%" color=#777777 SIZE=1>
	</TD></TR><TR vAlign=top><TD>
	<a href="AddnewTop.asp?menu=EditBbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>&EditId=<%= Rs("ShowID") %>"><img src="images/edit.gif" border="0"></a>
	<a onclick="checkclick('您确定要删除主题?')" style="text-decoration: none; color: #000000" href="?menu=deltop&Delid=<%=rs("ShowID")%>&Bbs=<%= Bbs %>&BbsID=<%= BbsID %>"><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 style="cursor:hand;" onclick="javascript:open('?menu=looktopip&Bbsid=<%=rs("ShowID")%>&bbs=<%= Bbs%>','','width=320,height=170')"> 已记录</a></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
	<%
End Sub 

Sub BbsList
	Response.write "<select name=SelBbsID>"
	Sql="Select BbsId,BbsName From BbsInfo"
	Set Rs = Conn.Execute(Sql)
	Do While Not Rs.Eof
	Response.write "<option value="&Rs("BbsId")&">"&Rs("BbsName")&"</option>"
	Rs.Movenext
	Loop
	Response.write "</select>"
	Rs.Close
	Set Rs = Nothing
End Sub

Function UserGroups(GroupsID)
dim Uleve
	Select case GroupsID
		case 0,1
		Uleve="普通用户"
		case 2
		Uleve="VIP会员"
		case 3
		Uleve="社区管理员"
		case 4
		Uleve="商城管理员"
		case 5
		Uleve="总管理员"
		case 6
		Uleve="商城站长"
	End Select
	UserGroups = Uleve
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -