📄 man.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="func.asp"-->
<!--#include file="set.asp"-->
<!--#include file="char.asp"-->
<%
bid=request("bid")
findstr=request("findstr")
if bid="" or isempty(bid) then
bid=0
end if
logchk session("userid"),session("password")
if session("userid")="" or session("password")="" or session("manbid")="" then
errmsg="您无权管理论坛!如果您是版主请重新登录!"
session.abandon
errshow(errmsg)
else
pageno=request.querystring("pageno")
set reco=server.createobject("adodb.recordset")
if session("manbid")<>0 then
sqlstr="select * from book where bid=" &session("manbid")& " order by wdate desc"
if findstr<>"" then
sqlstr="select * from book where (title like '%" &findstr& "%' or username like '%" &findstr& "%' or content like '%" &findstr& "%') and bid=" &session("manbid")& " order by wdate desc"
end if
else
if cint(bid)<>0 then
sqlstr="select * from book where bid=" &bid& " order by wdate desc"
if findstr<>"" then
sqlstr="select * from book where (title like '%" &findstr& "%' or username like '%" &findstr& "%' or content like '%" &findstr& "%') and bid=" &bid& " order by wdate desc"
end if
else
sqlstr="select * from book order by wdate desc"
if findstr<>"" then
sqlstr="select * from book where (title like '%" &findstr& "%' or username like '%" &findstr& "%' or content like '%" &findstr& "%') order by wdate desc"
end if
end if
end if
reco.open sqlstr,conn,1,1
if pmcount="" or isempty(pmcount) or pmcount<1 then
pmcount=15
end if
reco.pagesize=pmcount '设置每页数
mpage=reco.pagecount '得到总页数
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
%>
<html>
<head>
<title>版主管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="style.css">
<script language="javascript">
<!--
function openbr(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<table border="1" cellspacing="0" cellpadding="0" width="600" align="center" height="10" bordercolor="#7C96B8" bordercolordark="#FFFFFF">
<%
if session("manbid")<>0 then
set manbdname=server.createobject("adodb.recordset")
sqlstr="select * from board where bid=" & session("manbid")
manbdname.open sqlstr,conn,1,1
if not manbdname.eof then
bdname=manbdname("cname")
else
bdname=""
end if
set manbdname=nothing
else
bdname="超 级 用 户"
end if
%>
<tr>
<td height="15" colspan="2" width="375"><font color='red'><%=bdname%></font> 版 主 管 理 页</td>
<td height="15" width="235">本论坛帖子数:<%=reco.recordcount%></td>
<td height="15" width="86"></td>
</tr>
<tr>
<td height="15" colspan="4" class=trtop>>>分页 第 <% for pno=1 to mpage
if pno=cint(pageno) then%> <%=pno%> <%else%>
<%if session("manbid")=0 then%>
<a href='man.asp?bid=<%=bid%>&pageno=<%=pno%><%if findstr<>"" then%>&findstr=<%findstr%><%end if%>'><%=pno%></a>
<%else%>
<a href='man.asp?pageno=<%=pno%><%if findstr<>"" then%>&findstr=<%findstr%><%end if%>'><%=pno%></a>
<%end if%>
<%end if%>
<%next%> 页 每页 <%=pmcount%> 条记录。</td>
</tr>
</table>
<br>
<table border="1" cellspacing="0" cellpadding="0" width="600" align="center" height="10" bordercolor="#7C96B8" bordercolordark="#FFFFFF">
<tr>
<td height="15" width="20"> </td>
<td height="15" width="200" align='center'>文章标题</td>
<td height="15" width="140" align='center'>发言人</td>
<td height="15" width="36" align='center'>回复</td>
<td height="15" width="50" align='center'>发表于</td>
<td height="15" width="150" align='center'>版主操作</td>
</tr>
<%if reco.eof then%>
<tr>
<td height="15" width="20"> </td>
<td height="15" width="576" colspan="6" align="center" class=trtop><%if findstr="" then%>此 版 暂 无 帖 子 !<%else%>无 法 找 到 与 <font color="red"><%=findstr%></font> 相 关 的 帖 子 !<%end if%></td>
</tr>
<%response.end%>
<%end if%>
<%
reco.absolutepage=pageno
loopno=pmcount
do while not reco.eof and loopno>0
id=reco("id")
title=reco("title")
username=reco("username")
usermail=reco("usermail")
reply=reco("reply")
wdate=reco("wdate")
faceimg=reco("faceimg")
retype=reco("type")
if retype=0 then
delstr="删除此帖子与回复!"
else
delstr="删除此回复"
end if
if usermail<>"" then
userlink="<a href='mailto:" &usermail& "' title='给 " &username& " 发封妹儿'>" &username& "</a>"
else
userlink=username
end if
wdate=month(wdate) &"/"& day(wdate)
%>
<tr>
<td height="15" width="20"><img src='images/<%=faceimg%>.gif'></td>
<td height="15" width="200"><a href="#" onclick="javascript:openbr('view.asp?id=<%=id%>','查看','width=460,height=350,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no')" title='查看此帖子'><%=title%></a></td>
<td height="15" width="140" align='center'><%=userlink%></td>
<td height="15" width="36" align='center'><%if retype=0 then%><%=reply%><%end if%></td>
<td height="15" width="50" align='center'><%=wdate%></td>
<td height="15" width="150" align='center'>[ <a href="#" onclick="javascript:openbr('del.asp?id=<%=id%>','删除','width=200,height=150')" title='<%=delstr%>'>删除</a> ] [ <a href="#" onclick="javascript:openbr('edit.asp?id=<%=id%>','修改','width=450,height=350')" title='修改此帖子'>修改</a> ]</td>
</tr>
<%
reco.movenext
loopno=loopno-1
loop
%>
</table>
<br>
<table border="1" cellspacing="0" cellpadding="0" width="600" align="center" height="10" bordercolor="#7C96B8" bordercolordark="#FFFFFF">
<tr>
<td align='center' height='15'>
<form method="post" action="man.asp" name="find"><input type='text' class=buinput maxlength="30" size="20" name='findstr' value='查找的内容'>
<input type='hidden' name='bid' value=<%=bid%>>
<input type="submit" value=" 查找 " name='find' class=buinput>
</form>
</td>
</tr>
</table>
<table border="1" cellspacing="0" cellpadding="0" width="600" align="center" height="10" bordercolor="#7C96B8" bordercolordark="#FFFFFF">
<tr>
<td height="15" colspan="2" width="375">版 主 管 理 页</td>
<td height="15" width="221">本论坛帖子数:<%=reco.recordcount%></td>
<td height="15" width="100"> </td>
</tr>
</table>
</body>
</html>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -