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

📄 bbsshow.asp

📁 1. 硬件环境:MS WINDOWS NT PACK 4 OR LATER /WIN2000 WITH IIS 4.0 OR LATER /WIN9X+PWS 2. 数 据 库:Access2000
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file ="setup.asp"--> 
<%
Menu=Trim(Request.QueryString("menu"))
BbsId=Trim(Request.QueryString("BbsId"))
Bbs=Request.QueryString("Bbs")
page=Request.QueryString("page")

if len(Menu) > 10 Then Error 1,"非法登陆信息!\n您的IP已被记录!",""
if Bbs="" Then Error 1,"非法登陆信息!\n您的IP已被记录!",""
if BbsId="" Then Error 1,"非法登陆信息!\n您的IP已被记录!",""
If IsNumEric(Bbs)=False Then Error 1,"非法登陆信息!\n您的IP已被记录!",""
If IsNumEric(BbsId)=False Then Error 1,"非法登陆信息!\n您的IP已被记录!",""

Select Case Menu
Case "deltopic"
	validate "Login.asp",0
	Delid=Request.QueryString("Delid")
	if IsNumEric(Delid)=Flase Then Error 1,"参数非法传递!\n您的IP已被记录!",""
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("delete From ReForum where ReID="&Delid)
	conn.execute("Update Forum set AllPost=AllPost-1 where ShowID="&BbsId)
	conn.execute("Update BbsInfo set AllRe=AllRe-1 where BbsId="&Bbs)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	else
	Error 2,"很抱歉,您没有权限删除该回复!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "deltop"
	validate "Login.asp",0
	Delid=Request.QueryString("Delid")
	if IsNumEric(Delid)=Flase Then Error 1,"参数非法传递!\n您的IP已被记录!",""
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set DelThis=True where ShowID="&Delid)
	Response.redirect "BbsList.asp?Menu=List&BbsId="&Bbs
	else
	Error 2,"很抱歉,您没有权限删除该主题!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "looktopip"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	Response.write conn.execute("Select Postip from Forum where ShowID="&Bbsid)(0)
	Response.end
	else
	Error 1,"很抱歉,您没有权限查看IP!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "lookreip"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	Response.write conn.execute("Select Postip from ReForum where ReID="&Bbsid)(0)
	Response.end
	else
	Error 1,"很抱歉,您没有权限查看IP!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "LaQian"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set LastTime=now where ShowID="&BbsId)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	Response.end
	else
	Error 2,"很抱歉,您没有权限拉前主题!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "Close"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set LockTopic=True where ShowID="&BbsId)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	Response.end
	else
	Error 2,"很抱歉,您没有权限关闭主题!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "TopTop"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set TopTopic=1 where ShowID="&BbsId)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	Response.end
	else
	Error 2,"很抱歉,您没有权限置顶主题!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "GoodTop"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set GoodTop=True where ShowID="&BbsId)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	Response.end
	else
	Error 2,"很抱歉,您没有权限将该主题加入精华区!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "Open"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set LockTopic=False where ShowID="&BbsId)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	Response.end
	else
	Error 2,"很抱歉,您没有权限打开主题!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "Cancel"
	validate "Login.asp",0
	leve=Cint(conn.execute("Select UserGrade from UserInfo where UserID="&Request.Cookies("User"))(0))
	if leve > 2 Then
	conn.execute("Update Forum set TopTopic=0 where ShowID="&BbsId)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsId&"&Bbs="&Bbs&"&page="&page
	Response.end
	else
	Error 2,"很抱歉,您没有权限置顶主题!\n如有任何疑问,请与管理员联系!",""
	end if
	Response.End()
Case "MoveBbs"
	validate "Login.asp",3
	Call Top
	Call table()
		Response.Write("<style><!--	TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}--></style><br>")	%>

	<table borderColor="#a4b6d7" cellSpacing="0" cellPadding="0" width="100%" border="1" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none; border-collapse:collapse">
	<tr>
	<td height="25" background=images/title_sub.gif style="border-right: 0px none; border-top: 0px none">
	<b> &nbsp;■ </b><%=Community%></td>
	</tr>
	</table>
	<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
	<form method="POST" action="?Menu=MoveOK&BbsID=<%= BbsId %>&Bbs=<%= Bbs %>"><TR>
	<TD  height=25 width="100%" >将当前主题 <font color="#FF0000"><%= conn.execute("Select Title from Forum where ShowID="&BbsId)(0) %> </font>从 "<%=Conn.Execute("Select BbsName From BbsInfo where BbsId = "&Request.QueryString("bbs"))(0)%>" 移动到 <%BbsList%> <input name="Send" type="Submit" value="确定"></TD>
	</TR></form>
	</TABLE>
	<%Htmlend
	Case "MoveOK"
	validate "Login.asp",3
	SelBbsID=Request.Form("SelBbsID")
	conn.execute("Update Forum set BbsId="&SelBbsID&" where ShowID="&BbsID)
	Response.redirect "BbsShow.asp?Menu=Show&BbsId="&BbsID&"&Bbs="&SelBbsID&"&page="&page
	Response.End()
End Select
Call Top
Call table()
%>

<script language=javascript>
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(){i++;if (i>1) {document.form.submit1.disabled = true;}return true;}
function presskey(eventobject){if(event.ctrlKey && window.event.keyCode==13){i++;if (i>1) {alert('帖子正在发出,请耐心等待!');return false;}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>
<%
Response.Write("<style><!--	TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}--></style><br>")
If Menu="Show" Then
	Sql="Select UserName,Forum.UserID,BbsID,ShowID,Icon,Title,AllPost,Content,LastTime,Restore,GoodTop,TopTopic,LockTopic,PostTime,UserHead,UserName_2,UserSex,UserGrade,UserMoney,UserAddtime From Forum,userinfo Where Forum.DelThis=False and userinfo.Userid=Forum.UserID and ShowID="&BbsId
	Set Rs = Conn.Execute(Sql)
		if Rs.Eof or Rs.Bof Then
			Rs.Close
			Set Rs = Nothing
			Error 2,"系统不存在此帖子的资料!",""
		End if
	Title=rs("Title")
End if
BbsName=Trim(conn.execute("Select BbsName from BbsInfo where BbsId="&Bbs)(0))

%>
<title><%=rs("Title")%></title>
<table  cellSpacing="0" cellPadding="0" width=100% align="center" border="0">
  	<tr> 
    <td align="left" width="160"><a href=AddnewTop.asp?menu=Addnew&BbsID=<%= Bbs %>><img src=images/postnew.gif border="0"></a>&nbsp;<a href=AddnewTop.asp?menu=Rebbs&BbsID=<%= BbsID %>&Bbs=<%= Bbs %>><img src=images/reply.gif border="0"></a></td>
    <td align="right" > <div align="left"> <img src=images/Forum_nav.gif> 您现在的位置:<a href=defau.asp><%=Community%></a>  → <a href=BbsList.asp?Menu=List&BbsID=<%=Bbs %>><%= BbsName %> </a> → <%=rs("Title")%></div></td>
 	</tr>
	</table>
	<table borderColor="#a4b6d7" cellSpacing="0" cellPadding="2" width="100%" border="1" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none; border-collapse:collapse" background=images/title_sub.gif>
	<tr ><td width="87%" >&nbsp; <b>主题</B>:<%=Title%></td>
	<td width="13%" align="right"> &nbsp; 
	<a href="javascript:window.print()"> <img alt="显示可打印的版本" src="images/printpage.gif" border="0"></a>&nbsp; 
	<a href="javascript:window.external.AddFavorite(location.href,document.title)"> <img alt="把本帖加入IE收藏夹" src="images/fav_add.gif" border="0"></a>&nbsp; 
	</td></tr></table>
	
<%

if page = "" Then Page=1
if page < 1 Then Page=1
If Page <= 1  Then TTop
Rs.Close
Set Rs = Nothing
Set rs = Server.CreateObject("ADODB.Recordset")
Sql="Select ReID,TopID,Content,UsID,UserName,PostTime,UserHead,UserName_2,UserSex,UserGrade,UserMoney,UserAddtime From ReForum,userinfo Where TopID="&BbsId&" and Userid=Usid Order by PostTime"
rs.open Sql,conn,1

⌨️ 快捷键说明

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