📄 adminbd2.asp
字号:
<!--#include file="up.asp"-->
<%
if usertype<3 or (usertype=3 and instr("|"&adminbd&"|","|"&bd&"|")=0) then
tl=""
mes="<b>对不起!权限不够。</b>"
call sendinfo(tl,mes)
call down
response.end
end if%>
<table align="center" border="1" bordercolor="<%=c1%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="28">
<tr>
<td width="120" bgcolor="<%=c1%>" background="<%=tbg%>"> <img border="0" src="pic/gl.gif">
<a href="adminbd.asp?bd=<%=bd%>"><b><font color="<%=c3%>">管理选项:</font></b></a></td>
<td bgcolor="<%=c2%>"> ·<a href="adminbd.asp?bd=<%=bd%>&action=gonggao">发布公告</a>·<a href="adminbd.asp?bd=<%=bd%>&action=gonggaogl">公告管理</a><%if bdtype=3 then%>·<a href="adminbd.asp?action=passuser&bd=<%=bd%>"> 认证用户</a><%end if%>·<a href="adminbd2.asp?action=recycle&bd=<%=bd%>">回 收 站</a>·</td>
</tr>
</table><br>
<%
dim action,sql,ii,iii,pagesetup,totalpage,count,pagecount,content,usedtable,tablestr,delbbsid,baction,color,value,topictype,sql1,sql2,str1,str2,paper
topictype=checknum(request.querystring("topictype"))
action=request.querystring("action")
select case action
%>
<%case"editgg"
set rs=conn.execute("select*from paper where id="&id&"")
paper=rs("paper")
paper=split(paper,"|")
function hell(str)
dim re
Set re=new RegExp
re.IgnoreCase=true
re.Global=True
str = replace(str, ">", ">")
str = replace(str, "<", "<")
set re=Nothing
hell=str
end function
%>
<SCRIPT src=inc/ybbcode.js></script>
<SCRIPT>function openwin()
{
document.form1.topic.value=document.topic.ggtitle.value;
document.form1.content.value=document.topic.content.value;
var popupWin = window.open('paper.asp?action=preview', 'showgg', 'width=500,height=400,resizable=1,scrollbars=yes,menubar=no,status=yes');
document.form1.submit()
}
</SCRIPT>
<form method="POST" action="adminbd.asp?action=editggok&bd=<%=bd%>&id=<%=id%>" name="topic"><%=ttop%>
<table align="center" border="1" bordercolor=<%=c2%> bgcolor="<%=c2%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
<tr>
<td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28"> <img src="pic/gl.gif" border="0">
编辑公告</td>
</tr>
<tr>
<td width="100%" height="26">
<table border="1" bgcolor="<%=c2%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="25%">
<p style="line-height: 120%; margin: 4"><b>公告标题:</b></td>
<td width="75%">
<p style="line-height: 120%; margin: 4">
<input type="text" name="ggtitle" size="80" value="<%=hell(paper(0))%>"></td>
</tr>
<tr>
<td valign="top">
<p style="line-height: 120%; margin: 4"><font color="#0466CC"><b>公告内容:</b></font><%call tie%></td>
<td>
<p style="margin: 4"><%call qian%></p>
<p style="margin:4px"><textarea rows="9" name="content" cols="85" style="font-family: 宋体; font-size: 9pt" onkeydown=presskey(); onkeyup=gbcount(this.form.content,this.form.total,this.form.used,this.form.remain);><%=hell(paper(3))%></textarea>
<SCRIPT>
function emoticon(theSmilie){
document.topic.content.value +=theSmilie + '';
document.topic.content.focus();
}
function presskey(eventobject)
{
if(event.ctrlKey && window.event.keyCode==13){this.document.topic.submit();}else{return false}
}
</SCRIPT>
</p><br></td>
</tr>
<tr>
<td colspan="2" align="center" height="40" bgcolor="<%=c2%>">
<input class=submit type=submit value=OK_!发送 name=B1> <input class=submit type=button value="预 览!" onclick=openwin()> <input class=submit type=reset value=NO_!重写 name=B2> [ 按 Alt+Enter 直接发送 ]</td>
</tr>
</table>
</td>
</tr>
</table><%=tbottom%>
</form>
<form name=form1 action=paper.asp?action=preview method=post target=showgg>
<input type=hidden name=topic value=><input type=hidden name=content value=>
</form>
<%case"recycle"
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
color="#00000"
str1="话题"
str2="回帖"
if int(usedtable(i))=totable then
color=c1
if topictype=1 or topictype="" then
str1="<font color="&c1&">话题</font>"
elseif topictype=2 then
str2="<font color="&c1&">回帖</font>"
end if
end if
tablestr=tablestr&"·<a href=?action=recycle&totable="&usedtable(i)&"&bd="&bd&"><b><font color="&color&">数据表 "&usedtable(i)&"</font></b></a> [<a href=?action=recycle&totable="&usedtable(i)&"&bd="&bd&"&topictype=1>"&str1&"</a>][<a href=?action=recycle&totable="&usedtable(i)&"&bd="&bd&"&topictype=2>"&str2&"</a>] "
next
response.write"<script language='javascript'>function Check(){var Name=document.form.topage.value;document.location='?bd="&bd&"&action=recycle&topage='+Name+'&totable="&totable&"';}</script>"
%><SCRIPT language=JavaScript>
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
</SCRIPT>
<table align="center" border="1" bordercolor="<%=c1%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" bgcolor="<%=c2%>" height="28">
<tr>
<td width="100%"> <%=tablestr%></td>
</tr>
</table><br>
<form method="POST" action="adminbd2.asp?action=delbbsgg&bd=<%=bd%>&totable=<%=totable%>&topictype=<%=topictype%>">
<%=ttop%>
<table class=td1 align="center" bordercolor="<%=c1%>" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" bgcolor="<%=c1%>" background="<%=tbg%>" height="28">
<tr>
<td width="5%" align="center"><font color="<%=c3%>">选择</font></td>
<td width="55%" align="center"><font color="<%=c3%>">主题</font></td>
<td width="15%" align="center"><font color="<%=c3%>">作者</font></td>
<td width="25%" align="center"><font color="<%=c3%>">发表时间</font></td>
</tr>
</table>
<%
if topictype=1 or topictype="" then
sql="select * from bbs"&totable&" where type=3 and bd="&bd&" and bid=0"
elseif topictype=2 then
sql="select * from bbs"&totable&" where type=3 and bd="&bd&" and bid<>0"
end if
set rs = server.createobject("adodb.recordset")
pagesetup=checknum(application(prefix&"topiclistpage"))
rs.Open sql,conn,1
TotalPage=0
Count=rs.recordcount
if not rs.eof then
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.moveFirst
if Request.QueryString("ToPage")<>"" and isnumeric(Request.QueryString("ToPage")) then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
rs.move (PageCount-1) * pagesetup
i=1
do while not rs.eof
content=rs("content")
content=split(content,"|")
if topictype=1 or topictype="" then
value=rs("id")
elseif topictype=2 then
value=rs("bbsid")
end if
%>
<table bgcolor="<%=c2%>" align="center" border="0" cellpadding="0" cellspacing="0" style='border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1' width="<%=tbw%>" height="28">
<tr>
<td width="5%" align="center">
<input type="checkbox" name="delbbsid" value="<%=value%>"></td>
<td width="55%"> <a href=# onclick=openscript('paper.asp?action=showdelbbs&bbsid=<%=rs("bbsid")%>&totable=<%=totable%>&bd=<%=bd%>')><%=lefttrue(kbbs(content(4)),40)%></a></td>
<td width="15%" align="center"><%=kbbs(content(2))%></td>
<td width="25%" align="center"><%=kbbs(content(5))%></td>
</tr>
</table>
<%
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
end if
rs.Close
set rs=nothing%>
<table bordercolor="<%=c1%>" align="center" border="0" cellpadding="0" cellspacing="0" style='border-collapse: collapse; border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1' width="<%=tbw%>" height="26" bgcolor="<%=c2%>">
<tr>
<td width="100%">
<input onclick=CheckAll(this.form) type="checkbox" name=chkall value="ON">全 选
<INPUT type=submit value=" 删除所选 " name=action onclick="{if(confirm('确定删除你所选择的帖子吗?')){return true;}return false;}"> <INPUT type=submit value=" 还原所选 " name=action onclick="{if(confirm('确定还原你所选择的帖子吗?')){return true;}return false;}"></td>
</tr>
</table></form><%
response.write"<TABLE bgcolor="&c2&" align='center' bordercolor="&c1&" cellSpacing=0 cellPadding=0 width='"&tbw&"' border=1 style='border-collapse: collapse; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px'><TBODY><TR height=25><TD height=2><TABLE bgcolor="&c1&" cellSpacing=0 cellPadding=3 width='100%' border=0 background='"&tbg&"' style='border-collapse: collapse; border-left-width:0; border-top-width:0; border-bottom-width:0'><TBODY><TR><TD><b><font color="&c3&"><img border='0' src='pic/fl.gif'> 本回收站共有</font><font color='red'> "&TotalPage&" </font><font color="&c3&">页,<font color=red> "&count&" </font>张帖子,每页有<font color=red> "&pagesetup&" </font> 张帖子 >> ["
ii=PageCount-5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -