📄 adminbd.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
function gettop()
idtop=conn.execute("select top 1 top from topic where id="&id&" and bd="&bd&"")(0)
end function
%>
<table bordercolor=<%=c1%> align="center" border="1" 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,content,content2,contentok,ggtitle,ggok,bad,b,paper,sql,markn,umarkuserid,rs1
function umark(markn)
umarkuserid=conn.execute("select top 1 userid from topic where id="&id&"")(0)
set rs1=server.createobject("adodb.recordset")
sql="Select top 1 mark,del from [user] where userid="&umarkuserid&""
rs1.open sql,conn,1,3
rs1("mark")=rs1("mark")+int(markn)
rs1.Update
rs1.close
set rs1=nothing
end function
function umark2(markn)
umarkuserid=conn.execute("select top 1 userid from bbs"&totable&" where bbsid="&bbsid&"")(0)
set rs1=server.createobject("adodb.recordset")
sql="Select top 1 mark,del from [user] where userid="&umarkuserid&""
rs1.open sql,conn,1,3
rs1("mark")=rs1("mark")+int(markn)
if rs1("mark")<-1000 then
rs1("del")=true
end if
rs1.Update
rs1.close
set rs1=nothing
end function
function checkbad(str)
if isnull(str) then exit function
bad=split(application(prefix&"badcontent"), "|")
for b=0 to ubound(bad)
str=Replace(str,bad(b),string(len(bad(b)),"*"))
next
checkbad=str
end function
action=request.querystring("action")
select case action
%>
<%case"gonggao"%>
<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=savegg&bd=<%=bd%>" name="topic">
<%=ttop%>
<table align="center" border="1" bgcolor="<%=c2%>" cellpadding="0" bordercolor="<%=c1%>" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
<tr>
<td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28"> <img src="pic/fl.gif" border="0"><font color="<%=c3%>"> 发布公告</font></td>
</tr>
<tr>
<td width="100%" height="26">
<table border="1" 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"></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);></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"savegg"
ggtitle=Replace(Request.Form("ggtitle"),"'","")
ggtitle=replace(ggtitle,"|","│")
ggok=Replace(ggtitle," ","")
content=checkbad(Request.Form("content"))
content=replace(content,"|","│")
content=replace(content,"'","''")
contentok=Replace(content," ","")
if ggok="" or contentok="" then
tl=""
mes="<b>对不起!公告发送失败,可能存在以下问题。</b><br>·请填写完整公告标题和公告内容。<br>·<a href='javascript:history.go(-1)'><img src=pic/re.gif align=absmiddle border=0> 返回重新填写</a>"
else
content2=ggtitle&"|"&lgname&"|"&now()+timeset/24&"|"&content
conn.execute("insert into paper(paper,bd) values('"&content2&"',"&bd&")")
tl=1
mes="·公告发送成功。"
end if
call sendinfo(tl,mes)
%>
<%case"passuser"
%>
<form method="POST" action="adminbd.asp?action=editpassuser&bd=<%=bd%>"><%=ttop%>
<table align="center" border="1" 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/fl.gif" border="0"> 认证用户:</td>
</tr>
<tr>
<td width="100%" height="26">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<%if bdtype=3 then%><tr>
<td valign="top" width="30%">
<p style="line-height: 120%; margin: 8"><b>版面认证用户:</b><br>
该版面为认证版面,<br>请输入能够进入该版面的用户名。<br>各个用户名用<font color="#FF0000"> | </font> 隔开,<br>输入过程中<b><font color="#FF0000">不能按 Enter</font></b>。<br>
</td>
<td width="70%">
<p style="margin: 5">
<textarea name="passuser" cols="70" style="font-family: 宋体; font-size: 9pt" rows="8"><%=passuser%></textarea></td>
</tr>
<%end if%>
<tr>
<td colspan="2" bgcolor="<%=c2%>" height="40" align="center">
<input type="submit" value=" 确 认 修 改 " name="B1">
<input type="reset" value=" 取 消 修 改 " name="B2"></td>
</tr>
</table>
</td>
</tr>
</table><%=tbottom%>
</form>
<%set rs=nothing%>
<%case"editpassuser"
passuser=Replace(Request.Form("passuser"),"'","''")
conn.execute("update bdinfo set passuser='"&passuser&"' where id="&bd&" and followid<>0")
tl=1
mes="版面认证用户编辑成功。"
call sendinfo(tl,mes)
%>
<%case"gonggaogl"
set rs=conn.execute("select * from paper where bd="&bd&" order by id desc")
%><%=ttop%>
<table align="center" bordercolor=<%=c1%> border=1 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/fl.gif" border="0"><font color="<%=c1%>"> 版面现有公告:</font></td>
</tr>
<tr>
<td width="100%">
<table border="1" bgcolor="<%=c2%>" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr><td width="40%" height=28 bgcolor="<%=c2%>"> <b>公告标题:</b></td>
<td width="20%"> <b>发表者:</b></td><td width="20%" bgcolor="<%=c2%>"> <b>发表时间:</b></td>
<td width="20%"> <b>公告操作:</b></td></tr>
<%do while not rs.eof
paper=rs("paper")
paper=split(paper,"|")
%><tr><td width="40%">
<p style="margin: 4"><img src="pic/fl.gif" border="0"> <a href=# onclick=openscript('paper.asp?id=<%=rs("id")%>')><%=lefttrue(kbbs(paper(0)),25)%></a></td>
<td width="20%"> <%=kbbs(paper(1))%></td><td width="20%"> <%=paper(2)%></td>
<td width="20%"> <a href="adminbd.asp?action=delgg&id=<%=rs("id")%>&bd=<%=bd%>">删除</a> |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -