📄 admin-gl1.asp
字号:
<!--#include file="conn.asp"--><!--#include file="fun.asp"--><!--#include file="md5.asp"-->
<%
Server.ScriptTimeout="99999"
set bbs=myconn.execute("select*from bbsinfo")
sty="all"
sp=request.cookies(cn&"1")(sty)
c1=request.cookies(cn&"1")(sty&"c1")
c2=request.cookies(cn&"1")(sty&"c2")
tlinfo=bbs("tlinfo")
tli=split(tlinfo,"|?|")
tl=tli(0)
c11=tli(1)
c12=tli(2)
topinfo=tli(3)
upnum=tli(4)
upsize=tli(5)
b1s=tli(6)
autotable=tli(7)
alltb=tli(8)
cbi=tli(9)
lmbbs=tli(10)
if sp="" then sp=b1s
if c1="" then c1=c11
if c2="" then c2=c12
atb=split(alltb,"|")
tnum=ubound(atb)
set bbs=nothing
lgname=check2(Request.Cookies(cn&"0")("lgname"))
lgpwd=check2(request.cookies(cn&"0")("lgpwd"))
lgpwd=md5(lgpwd)
set cjbz=myconn.execute("select name from admin where name='"&lgname&"' and password='"&lgpwd&"' and bd='70767766'")
if cjbz.eof then
set cjbz=nothing
response.redirect"admin-login.asp"
end if
t1="<table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='98%' align=center><tr><td background='pic/"&sp&"3.gif' height=30 bgcolor="&c2&"> <p style='margin:5px'><img border='0' src='pic/fl.gif'> <font color='#FFFFFF'><b>"
t2="</b></font></p></td></tr></table><table align=center border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor="&c1&" width=98% >"
d1="<tr><td width=100% ><P style='MARGIN: 8px;line-height: 150%'>"
d2="</td></tr></table>"
bd=request.querystring("bd")
function bdlist(sename,n)
response.write"<select size=1 name="&sename&" style='font-size: 9pt; '>"
if n=1 then
response.write"<option value=0 selected>论坛首页</option>"
end if
set bf=myconn.execute("select bn,bdname from bdinfo where key<>'0'")
do while not bf.eof
str=""
if int(bd)=int(bf("bn")) then
str="selected"
end if
response.write"<option value="&bf("bn")&" "&str&">"&bf("bdname")&"</option>"
bf.movenext
loop
bf.close
set bf=nothing
response.write"</select>"
end function
menu=request.querystring("menu")%><link rel="stylesheet" type="text/css" href="css.css">
<body topmargin="0" leftmargin="0"><style>TABLE {BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px; }TD {BORDER-RIGHT: 0px; BORDER-TOP: 0px;}</style>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor=<%=c1%>>
<tr>
<td width="100%" height="28" background="pic/<%=sp%>3.gif" align="center">
<b><font color="#FFFFFF">论坛后台管理系统</font></b></td>
</tr>
</table><br>
<%select case menu
case"closebbs"
if cbi="" then
str1="checked"
else
str2="checked"
end if
%><form action="admin-gl1.asp?menu=openbbsyn" method="POST"><%=t1%>论坛开关<%=t2&d1%>(当你要修改论坛数据库时,或者进行消耗大量资源的操作时,可以关闭论坛。<br>
<input type="radio" value="yes" name="openbbs" <%=str1%>> 打开论坛
<input type="radio" value="no" name="openbbs" <%=str2%>> 关闭论坛
<br>显示信息:(支持html)<br><textarea rows="6" name="openbbsi" cols="50"><%=cbi%></textarea><p style='margin:8'><input type="submit" value=" 提 交 " name="B1"><%=d2%>
</form>
<%case"openbbsyn"
openbbs=request.form("openbbs")
openbbsi=replace(request.form("openbbsi"),"'","")
if openbbs="no" and openbbsi="" then
openbbsi="论坛暂时关闭 ........"
end if
if openbbs="yes" then openbbsi=""
tli(9)=openbbsi
for i= 0 to 10
str=str&tli(i)&"|?|"
next
str=left(str,len(str)-3)
myconn.execute("update bbsinfo set tlinfo='"&str&"'")
bbsupa=application(cn&"bbsup")
if bbsupa=1 then application(cn&"bbsup")=2
if bbsupa=2 then application(cn&"bbsup")=1
%><%=t1%>设置成功<%=t2&d1%>·论坛设置开关成功<%=d2%>
<%case"gonggao"%><form method="POST" action="admin-gl1.asp?menu=savegg">
<%=t1%>公告发布<%=t2&d1%><p style='margin:6'>公告主题:<br><input type="text" name="zhuti" size="67"><p style='margin:6'>显示位置:<%=bdlist("bd",1)%><p style='margin:6'>公告内容:(支持UBB代码)<p style='margin:6'>
<textarea rows="10" name="body" cols="65"></textarea><br><br>
<input type="submit" value=" 发 送 " name="B1">
<input type="reset" value=" 重 置 " name="B2"><%=d2%></form>
<%case"savegg"
zhuti=Replace(Request.Form("zhuti"),"'","''")
body=Replace(Request.Form("body"),"'","''")
bd=int(Request.Form("bd"))
if zhuti="" or body="" then
%><%=t1%>发送失败<%=t2&d1%>·请填写完整公告的内容<%=d2%><%else
myconn.execute("insert into gonggao(zhuti,name,body,riqi,bd) values('"&zhuti&"','"&lgname&"','"&body&"','"&now&"',"&bd&")")
%>
<%=t1%>发送成功<%=t2&d1%>·发送公告成功<%=d2%><%end if%>
<%case"gonggaogl"%>
<SCRIPT>
function openscript(id){var Win = window.open('showgg.asp?id='+id+'','open','width=600,height=300,resizable=1,scrollbars=yes,menubar=no,status=yes')}
</SCRIPT>
<%
set sgg=myconn.execute("select id,zhuti,bd from gonggao order by id desc")
if sgg.eof then%>
<%=t1%>公告管理<%=t2&d1%>·当前没有公告<%=d2%>
<%else%><%=t1%>公告管理<%=t2&d1%>
<%do while not sgg.eof%><%id=sgg("id")
zhuti=sgg("zhuti")
bd=sgg("bd")%><a href=javascript:openscript(<%=id%>)><%=kbbs(zhuti)%></a> <a href=?menu=delgg&id=<%=id%>><img src="pic/del.gif" border="0"> 删 除</a>
<a href="?menu=editgg&id=<%=id%>&bd=<%=bd%>">
<img src="pic/bmp.gif" border="0"> 编 辑</a><br>
<%sgg.movenext
loop
sgg.close
set sgg=nothing%><%=d2%><%end if%>
<%case"delgg"
id=request.querystring("id")
myconn.execute("delete*from gonggao where id="&id&"")
%><%=t1%>公告管理<%=t2&d1%>·删除公告成功<%=d2%>
<%case"editgg"
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
id=request.querystring("id")
set sgg=myconn.execute("select*from gonggao where id="&id&"")
zhuti=sgg("zhuti")
body=sgg("body")
set sgg=nothing
%><form method="POST" action="?menu=editggok&id=<%=id%>">
<%=t1%>编辑公告<%=t2&d1%>公告主题:<p style='margin:6'>
<input type="text" name="zhuti" size="67" value="<%=zhuti%>"><p style='margin:6'>
显示位置:<%=bdlist("bd",1)%><br>
<p style='margin:6'>公告内容:<br>
<textarea rows="10" name="body" cols="65"><%=hell(body)%></textarea><p style='margin:6'>
<input type="submit" value=" 修 改 " name="B1">
<input type="reset" value=" 重 置 " name="B2"><%=d2%></form>
<%case"editggok"
id=request.querystring("id")
zhuti=Replace(Request.Form("zhuti"),"'","''")
body=Replace(Request.Form("body"),"'","''")
bd=int(Request.Form("bd"))
if zhuti="" or body="" then
%><%=t1%>修改失败<%=t2&d1%>·请填写完整公告的内容<%=d2%><%else
myconn.execute("update gonggao set zhuti='"&zhuti&"',body='"&body&"',bd="&bd&" where id="&id&"")
%>
<%=t1%>修改成功<%=t2&d1%>·修改公告成功<%=d2%><%end if%>
<%case"bbszl"%><center><font color="#FF0000">注意:论坛整理中的各项运行都需要消耗比较多的资源,<br>所以请你选择论坛访问人数较少的时候进行整理,或者先<b><a href="admin-gl1.asp?menu=openbbs"><font color="#FF0000">关闭论坛</font></a></b></font></center><br>
<%=t1%>论坛整理<%=t2&d1%><b>总论坛整理</b><br>·<a href="?menu=all1">总帖数</a>·<a href="?menu=all2">用户数</a>·
<hr color="<%=c1%>" size="1"><P style='MARGIN: 8px;line-height: 150%'><b>各版面整理</b><br>
·<a href="?menu=bbs1">各版面帖数</a>·<a href="?menu=bbs2">各版面最新帖</a>·<br><hr color="<%=c1%>" size="1"><P style='MARGIN: 8px;line-height: 150%'><b>用户 | 版主整理</b>
<br>·<a href="?menu=user1">用户帖数</a>·<a href="?menu=user2">清理无效版主</a>·<hr color="<%=c1%>" size="1">
<P style='MARGIN: 8px;line-height: 150%'><b>帖子整理</b>
<br>·<a href="?menu=topic1">帖子回复数</a>·<a href="?menu=topic2">帖子最后回复</a>·
<%=d2%>
<%case"all1"%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%
for i=0 to tnum
bbsnum=myconn.execute("select count(bbsid) from bbs"&atb(i)&"")(0)
allnum=int(allnum)+int(bbsnum)
response.write"数据表 <b>"&atb(i)&"</b> 查询成功<br>"
next
topicnum=myconn.execute("select count(id) from bbstl")(0)
myconn.execute("update bbsinfo set bbsnum="&allnum&",topicnum="&topicnum&"")
response.write"<br>整理总帖数成功<br>整理总话题数成功<br><br><a href=?menu=bbszl>>>>返回</a>"
%>
</blockquote>
<%case"all2"%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%
usernum=myconn.execute("select count(userid) from user")(0)
set rs=myconn.execute("select top 1 name from [user] order by userid desc")
name=rs("name")
set rs=nothing
myconn.execute("update [bbsinfo] set usernum="&usernum&",newuser='"&name&"'")
response.write"整理总用户数成功<br><br><a href=?menu=bbszl>>>>返回</a>"
%>
</blockquote>
<%case"bbs1"%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -