?? adminright2.asp
字號(hào):
<!--#include file="bbs.asp"-->
<%
dim action,strt,i,bad,b,id,paper,ggtitle,ggok,content,contentok,content2,rs1,sql,bdlist2,grade
dim name,url,picurl,readme,rs2
sub bdlist()
set bdlist2=conn.execute("select * from bdinfo where followid<>0 order by followid,orders desc,id")
response.write"<select size=1 name=bd style='font-size: 9pt'><option value=0>請(qǐng)選擇版面</option>"
do while not bdlist2.eof
response.write"<option value="&bdlist2("id")&">"&split(bdlist2("bdinfo"),"|")(0)&"</option>"
bdlist2.movenext
Loop
response.write"</select>"
set bdlist2=nothing
end sub
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"editgg","editggok" strt="公告修改"
case"bdinfo" strt="論壇版面設(shè)置"
case"addfl","addflsave" strt="添加分類"
case"delfl","delflok" strt="刪除分類"
case"addbd","addbdsave" strt="添加版面"
case"delbd","delbdok" strt="刪除版面"
case"adminbd","addbdadmin","delbdadmin" strt="版主設(shè)置"
case"allbd","addallbd","delallbd" strt="超級(jí)版主設(shè)置"
case"admiin","addadmin","deladmin" strt="管理員設(shè)置"
end select
sub send(str)
response.write"<div align=center><table class=td1 border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#cad6eb width=100% height=50><tr><td width=100% ><p style='margin:5px;line-height:150%'><font color= red>"&str&"</font></p></td></tr></table></div>"
end sub
%>
<body topmargin="0" leftmargin="0">
<%call admintop%>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#cad6eb">
<tr>
<td class=td1 width="90%" height="28" background="pic/titlebg.gif" align="center">
<span style="font-weight: 400"><font color="#000000"> <%=strt%></font></span></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="90%">
<tr>
<td width="100%" valign="top" height="475">
<%
select case action
case"editgg"
id=checknum(request.querystring("id"))
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="adminright2.asp?action=editggok&id=<%=id%>" name="topic">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#cad6eb">
<tr>
<td width="30%" class=td2>
<p style="line-height: 120%; margin: 4"><span style="font-weight: 400">
<font color="#000000">公告標(biāo)題:</font></span></td>
<td width="70%">
<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">公告內(nèi)容:<%call tie%></td>
<td> <p style="margin: 4"><%call adminqian%><p style="margin:4px">
<textarea rows="9" name="content" cols="60" 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>
<p style="line-height: 150%; margin: 5">
<SCRIPT>
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="#F4F6FC">
<input class=submit type=submit value=OK_!發(fā)送 name=B1> <input class=submit type=button value="預(yù) 覽!" onclick=openwin()> <input class=submit type=reset value=NO_!重寫 name=B2> [ 按 Alt+Enter 直接發(fā)送 ]</td>
</tr>
</table>
</div>
</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"editggok"
id=checknum(request.querystring("id"))
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
call send("<b>對(duì)不起!公告修改失敗,可能存在以下問題。</b><br>·請(qǐng)?zhí)顚懲暾鏄?biāo)題和公告內(nèi)容。<br>·<a href='javascript:history.go(-1)'>返回重新填寫</a>")
else
content2=ggtitle&"|"&lgname&"|"&now()+timeset/24&"|"&content
conn.execute("update [paper] set paper='"&content2&"' where id="&id&"")
call send("公告修改成功。")
end if
%>
<%case"bdinfo"
%>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#cad6eb">
<tr class=td2>
<td width="40%" bgcolor="#F4F6FC" height="28">
<p style="line-height: 150%; margin: 4"><font color="#000000">
<span style="font-weight: 400">當(dāng)前論壇已有的分類信息:</span></font></td>
<td width="60%" bgcolor="#F4F6FC">
<p style="line-height: 150%; margin: 4"><font color="#000000">
<span style="font-weight: 400">當(dāng)前論壇已有的版面信息:</span></font></td>
</tr>
<%
set rs=conn.execute("select * from bdinfo where followid=0 order by orders desc,id")
do while not rs.eof
response.write"<tr><td valign=top><p style='line-height: 150%; margin: 4'>分類 ID:<b>"&rs("id")&"</b><br>分類名稱:"&rs("bdinfo")&" <a href=adminright1.asp?action=editfl&flid="&rs("id")&">[ 編輯 ]</a> <a href=adminright1.asp?action=upfl&flid="&rs("id")&">[ 置前 ]</a></td><td valign=top><p style='line-height: 150%; margin: 4'>"
set rs1=conn.execute("select * from bdinfo where followid="&rs("id")&" order by orders desc,id")
do while not rs1.eof
response.write"版面 ID:<b>"&rs1("id")&"</b> 版面名稱:"&split(rs1("bdinfo"),"|")(0)&" <a href=adminright1.asp?action=editbd&bd="&rs1("id")&">[ 編輯 ]</a> <a href=adminright1.asp?action=upbd&bd="&rs1("id")&">[ 置前 ]</a>"
if rs1("type")=3 then response.write" <a href=adminright1.asp?action=pass&bd="&rs1("id")&">[ 認(rèn)證 ]</a>"
response.write"<br>"
rs1.movenext
loop
set rs1=nothing
response.write"</td></tr>"
rs.movenext
loop
set rs=nothing
%>
</table>
</div>
<div align="center">
<table border="1" bordercolor="#cad6eb" cellpadding="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="100%" background="pic/titlebg.gif" height="28"> <img src="../pic/fl.gif" border="0"> <a href="adminright2.asp?action=addfl">添加分類</a>
<img src="../pic/fl.gif" border="0"> <a href="adminright2.asp?action=delfl">
刪除分類</a> <img src="../pic/fl.gif" border="0"> <a href="adminright2.asp?action=addbd">添加版面</a>
<img src="../pic/fl.gif" border="0"> <a href="adminright2.asp?action=delbd">
刪除版面</a></td>
</tr>
</table>
</div>
<%
case"addfl"
%>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
<form method="POST" action="adminright2.asp?action=addflsave"><tr>
<td width="35%">
<p style="margin: 8">請(qǐng)輸入分類的 ID:<br>不能與已有的分類 ID 重復(fù),不能填 <b>0</b></td>
<td width="65%"> <input type="text" name="flid" size="9"></td>
</tr>
<tr>
<td width="35%">
<p style="margin: 8">選擇分類狀態(tài)<br>0為默認(rèn)方式,1簡(jiǎn)便方式,2為隱藏方式 </td>
<td width="65%"> <input type="text" name="flpcid" size="9"></td>
</tr>
<tr>
<td>
<p style="margin: 8">請(qǐng)輸入分類的名稱:<br>支持 HTML</td>
<td> <input type="text" name="flname" size="46"></td>
</tr> <tr>
<td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
<input type="submit" value=" 確 認(rèn) 添 加 " name="B1"></td>
</tr></form>
</table>
</div>
<%
case"delfl"
%>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
<form method="POST" action="adminright2.asp?action=delflok"><tr>
<td width="35%">
<p style="margin: 8; line-height:150%">請(qǐng)輸入要?jiǎng)h除的分類的 ID:<br>
<font color="#FF0000">注意:該操作將刪除該分類下的版面和帖子。</font></td>
<td width="65%"> <input type="text" name="flid" size="9"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
<input type="submit" value=" 確 認(rèn) 刪 除 " name="B1" onclick="{if(confirm('確定刪除此分類嗎?這樣將刪除該分類下的版面和帖子。')){return true;}return false;}"></td>
</tr></form>
</table>
</div>
<%
application(prefix&"allthebbs")=""
case"delflok"
flid=checknum(request.form("flid"))
conn.execute("delete*from bdinfo where (id="&flid&" and followid=0) or followid="&flid&"")
conn.execute("delete*from topic where bd="&flid&"")
conn.execute("delete*from paper where bd="&flid&"")
dim usedtable
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
conn.execute("delete*from bbs"&i&" where bd="&flid&"")
next
response.redirect"adminright2.asp?action=bdinfo"
%>
<%
application(prefix&"allthebbs")=""
case"addbd"
if conn.execute("select * from bdinfo where followid=0").eof then
call send("·對(duì)不起,分類 ID:論壇尚無分類,請(qǐng)先:<br>·<a href='adminright2.asp?action=addfl'><font color=#ffffff>添加分類</font></a>")
response.end
end if
%>
<form method="POST" action="adminright2.asp?action=addbdsave">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
<tr>
<td width="25%">
<p style="line-height: 150%; margin: 5">版面 ID:<br>不能與已有的版面 ID 重復(fù),不能填 <b>0</b></td>
<td width="75%"> <input type="text" name="bd" size="25"></td>
</tr>
<tr>
<td>
<p style="line-height: 150%; margin: 5">論壇名稱:<br>支持HTML</td>
<td> <input type="text" name="bdname" size="25"></td>
</tr>
<tr>
<td>
<p style="line-height: 150%; margin: 5">論壇LOGO:<br>可以不填</td>
<td> <input type="text" name="picurl" size="49"></td>
</tr>
<tr>
<td valign="top">
<p style="line-height: 150%; margin: 5">論壇介紹:</td>
<td>
<p style="margin: 4">
<textarea rows="4" name="bdinfo" cols="58" style="font-size: 9pt; font-family: 宋體"></textarea></td>
</tr>
<tr>
<td>
<p style="line-height: 150%; margin: 5">屬于分類:</td>
<td> <%set rs=conn.execute("select * from bdinfo where followid=0 order by orders desc,id")%><select size="1" name="followid" style="font-size: 9pt">
<%do while not rs.eof%><option value="<%=rs("id")%>"><%=rs("bdinfo")%></option><%
rs.movenext
Loop
rs.Close
set rs=nothing
%>
</select></td>
</tr>
<tr>
<td valign="top">
<p style="line-height: 150%; margin: 5">論壇類型:</td>
<td>
<p style="MARGIN: 4px">
<input type="radio" CHECKED value="0" name="bbstype">普通論壇(用戶和游客可以自由的進(jìn)入該類型論壇,·推薦·) </p>
<p style="MARGIN: 4px"><input type="radio" value="1" name="bbstype">會(huì)員論壇(只有注冊(cè)用戶才能進(jìn)入該類型論壇)</p>
<p style="MARGIN: 4px"><input type="radio" value="2" name="bbstype">鎖定論壇(會(huì)員和游客只能瀏覽帖子,不能對(duì)該論壇的帖子回復(fù)等)</p>
<p style="MARGIN: 4px"><input type="radio" value="3" name="bbstype">認(rèn)證論壇(只有版主認(rèn)證的注冊(cè)用戶才能進(jìn)入該類型論壇)</p>
<p style="MARGIN: 4px"><input type="radio" value="4" name="bbstype">VIP論壇(只有vip用戶方能進(jìn)入--版主甚至管理員如非vip也不能進(jìn)入)</td>
</tr>
<tr>
<td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
<input type="submit" value=" 確 認(rèn) 添 加 " name="B1"></td>
</tr>
</table></div>
</form>
<%
application(prefix&"allthebbs")=""
case"addbdsave"
dim bd,bdname,bdinfo,followid,bbstype
bd=checknum(request.form("bd"))
bdname=Replace(Request.Form("bdname"),"|","│")
picurl=Replace(Request.Form("picurl"),"|","│")
bdinfo=Replace(Request.Form("bdinfo"),"|","│")
followid=checknum(request.form("followid"))
bbstype=checknum(request.form("bbstype"))
if bd="" or bd<=0 or bdname="" or bdinfo="" then
call send("·請(qǐng)?zhí)顚懲暾靥畹馁Y料<br>·<a href='javascript:history.go(-1)'>返回重新填寫</a>")
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -