⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin-gl.asp

📁 一个小巧的论坛程序 本程序基本功能:  可开设任意数目的讨论区类别和版块 使用Cookies
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%response.end
end if
if dw="delbbs" then
myconn.execute("delete*from bdinfo where bn="&bn&" and key<>'0'")
%><%=t1%>删 除 成 功<%=t2&d1%>·删除论坛成功·<%=d2%>
<%end if%>
<%case"addlm"%>
<%
name=Replace(Request.Form("name"),"'","''")
url=Replace(Request.Form("url"),"'","''")
picurl=Replace(Request.Form("picurl"),"'","''")
if name="" or url="" or picurl="" then
%>
<%=t1%>错 误 信 息<%=t2&d1%>·信息没有填写完整·<%=d2%>
<%else%>
<%myconn.execute("insert into lmbbs(url,picurl,name)values('"&url&"','"&picurl&"','"&name&"')")%>
<%=t1%>添 加 成 功<%=t2&d1%>·添加论坛联盟成功·<%=d2%><%end if%>
<%case"editlm"%>
<%name=Replace(Request.querystring("name"),"'","''")
url=Replace(Request.Form("url"),"'","''")
picurl=Replace(Request.Form("picurl"),"'","''")
if url="" or picurl="" then
%>
<%=t1%>错 误 信 息<%=t2&d1%>·信息没有填写完整·<%=d2%>
<%else%>
<%myconn.execute("update [lmbbs] set url='"&url&"',picurl='"&picurl&"' where name='"&name&"'")%>
<%=t1%>编 辑 成 功<%=t2&d1%>·修改论坛联盟成功·<%=d2%><%end if%>
<%case"dellm"
name=Replace(Request.querystring("name"),"'","''")
if name="" then
%><%=t1%>错 误 信 息<%=t2&d1%>·请选择要删除的联盟名称·<%=d2%><%else
myconn.execute("delete*from lmbbs where name='"&name&"'")%>
<%=t1%>删 除 成 功<%=t2&d1%>·删除联盟成功·<%=d2%><%end if%><%case"updateuser"%>
<%
chname=Replace(Request.form("chname"),"'","''")
chqian=Replace(Request.form("chqian"),"'","''")
chmeili=Replace(Request.form("chmeili"),"'","''")
chjingyan=Replace(Request.form("chjingyan"),"'","''")
set add=myconn.execute("SELECT name FROM user where name='"&chname&"'")
if add.eof and add.bof then%>
<%=t1%>错 误 信 息<%=t2&d1%>·没有这个用户名·<%=d2%>
<%else%>
<%
if not isnumeric(chqian) or not isnumeric(chmeili) or not isnumeric(chjingyan) then%>
<%=t1%>错 误 信 息<%=t2&d1%>·金钱、魅力、经验必须为大于0的数字·<%=d2%>
<%else
myconn.execute("update [user] set qian='"&chqian&"',meili='"&chmeili&"',jingyan='"&chjingyan&"' where name='"&chname&"'")
%>
<%=t1%>修 改 成 功<%=t2&d1%>·已经成功的修改了用户的信息·<%=d2%><%end if
end if
set add=nothing
%><%case"chpwd"%>
<%
chaname=Replace(Request.form("chaname"),"'","''")
chapwd=Replace(Request.form("chapwd"),"'","''")
chapwd1=md5(chapwd)
set add=myconn.execute("SELECT*FROM user where name='"&chaname&"'")
if add.eof or chapwd="" then%>
<%=t1%>错 误 信 息<%=t2&d1%>·没有这个用户名或者没有填写新密码·<%=d2%>
<%else
myconn.execute("update user set password='"&chapwd1&"' where name='"&chaname&"'")
myconn.execute("update admin set password='"&chapwd1&"' where name='"&chaname&"'")
%>
<%=t1%>修 改 成 功<%=t2&d1%><%=kbbs(chaname)%> 的密码已经改为: <%=chapwd%><%=d2%><%end if
set add=nothing%>
<%case"addtable"
tablen=request.form("tablen")
canadd="yes"
if not isnumeric(tablen) then canadd="no"
if tablen="0" then canadd="no"
for i=0 to tnum
if tablen=atb(i) then
canadd="no"
exit for
end if
next
if canadd="no" then%>
<%=t1%>添加失败<%=t2&d1%>你不能添加数据表,可能存在以下问题:<br>·你的表名不是数字或者为 <b>0</b> <br>·该表名已经被使用了<%=d2%>
<%else
alltable=alltb&"|"&tablen
tli(8)=alltable
for i= 0 to 10
str=str&tli(i)&"|?|"
next
str=left(str,len(str)-3)
myconn.execute("update bbsinfo set tlinfo='"&str&"'")
set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dburl)
conn.Open connstr
sql="CREATE TABLE bbs"&tablen&" (bbsid int IDENTITY (1, 1) NOT NULL CONSTRAINT PrimaryKey PRIMARY KEY,"&_
		"id int default 0,"&_
		"zhuti varchar(255),"&_
		"name varchar(50),"&_
		"body text,"&_
		"riqi datetime,"&_
		"hits int Default 0,"&_
		"bd int Default 0,"&_
		"bid int Default 0,"&_
		"face varchar(20) Default re,"&_
		"gonggao int Default 0,"&_
		"orders datetime,"&_
		"type int Default 0,"&_
		"isvote int Default 0,"&_
		"bnum int Default 0)"
conn.execute(sql)
conn.execute("create index id on bbs"&tablen&" (id)")
conn.execute("create index name on bbs"&tablen&" (name)")
conn.execute("create index bd on bbs"&tablen&" (bd)")
conn.execute("create index bid on bbs"&tablen&" (bid)")
conn.execute("create index gonggao on bbs"&tablen&" (gonggao)")
conn.execute("create index orders on bbs"&tablen&" (orders)")
conn.execute("create index type on bbs"&tablen&" (type)")
conn.close
set conn = Nothing
%>
<%=t1%>添加成功<%=t2&d1%>·添加表成功<%=d2%>
<%end if%>
<%case"setautotb"
tablen=request.form("tablen")
tli(7)=tablen
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"deltable"
ttb=request.querystring("ttb")
if int(autotable)=int(ttb) then%>
<%=t1%>删除失败<%=t2&d1%>·该表被设定为默认使用表,不能删除!<%=d2%>
<%response.end
end if
for i=0 to tnum
if int(ttb)<>int(atb(i)) then
str=str&atb(i)&"|"
end if
next
lenstr=len(str)
str=left(str,lenstr-1)
tli(8)=str
myconn.execute("drop table [bbs"&ttb&"]")
myconn.execute("delete*from bbstl where totable="&ttb&"")
for i= 0 to 10
str=str&tli(i)&"|?|"
next
str=left(str,len(str)-3)
myconn.execute("update bbsinfo set tlinfo='"&str&"'")
%><%=t1%>删除成功<%=t2&d1%>·删除数据表成功<%=d2%>
<%case"delanymail"
daynum=request.form("daynum")
if not isnumeric(daynum) then
%><%=t1%>错 误 信 息<%=t2&d1%>·天数必须填写并且为数字·<%=d2%><%else
myconn.execute("delete*from hand where riqi<now-"&daynum&"")
%><%=t1%>删 除 成 功<%=t2&d1%>·批量删除留言成功·<%=d2%><%end if%>
<%case"delwhosemail"
ddname=Replace(Request.form("ddname"),"'","''")
if ddname="" then
%>
<%=t1%>错 误 信 息<%=t2&d1%>·请输入用户名·<%=d2%><%else
myconn.execute("delete*from hand where tname='"&ddname&"'")
%><%=t1%>删 除 成 功<%=t2&d1%>·批量删除留言成功·<%=d2%><%end if%>
<%case"hbbbs"
frombd=request.form("frombd")
tobd=request.form("tobd")
myconn.execute("delete*from bdinfo where bn="&frombd&" and key<>'0'")
myconn.execute("update bbstl set bd="&tobd&" where bd="&frombd&"")
for i=0 to tnum
myconn.execute("update bbs"&atb(i)&" set bd="&tobd&" where bd="&frombd&"")
next
%>
<%=t1%>合 并 成 功<%=t2&d1%>·论坛合并成功·<%=d2%>

<%case"delany"
daynum=request.form("daynum")
bd=request.form("bd")
if not isnumeric(daynum) then
%><%=t1%>错 误 信 息<%=t2&d1%>·天数必须填写并且为数字·<%=d2%><%else
if bd="all" then
for i=0 to tnum
myconn.execute("delete*from bbs"&atb(i)&" where bid or id in (select id from bbstl where riqi<now-"&daynum&")")
next
myconn.execute("delete*from bbstl where riqi<now-"&daynum&"")
else
for i=0 to tnum
myconn.execute("delete*from bbs"&atb(i)&" where bd="&bd&" and id or bid in (select id from bbstl where riqi<now-"&daynum&")")
next
myconn.execute("delete*from bbstl where bd="&bd&" and riqi<now-"&daynum&"")
end if
%>
<%=t1%>删 除 成 功<%=t2&d1%>·批量删除帖子成功·<%=d2%><%end if%><%case"delnore"%>
<%daynum=request.form("daynum")
bd=request.form("bd")
if not isnumeric(daynum) then
%><%=t1%>错 误 信 息<%=t2&d1%>·天数必须填写并且为数字·<%=d2%><%else
if bd="all" then
for i=0 to tnum
myconn.execute("delete*from bbs"&atb(i)&" where bid or id in (select id from bbstl where orders<now-"&daynum&")")
next
myconn.execute("delete*from bbstl where orders<now-"&daynum&"")
else
for i=0 to tnum
myconn.execute("delete*from bbs"&atb(i)&" where bd="&bd&" and id or bid in (select id from bbstl where orders<now-"&daynum&")")
next
myconn.execute("delete*from bbstl where bd="&bd&" and orders<now-"&daynum&"")
end if
%>
<%=t1%>删 除 成 功<%=t2&d1%>·批量删除帖子成功·<%=d2%><%end if%><%case"delwhose"
ddname=Replace(Request.form("ddname"),"'","''")
bd=request.form("bd")
if ddname="" then
%>
<%=t1%>错 误 信 息<%=t2&d1%>·请输入用户名·<%=d2%><%else
if bd="all" then
myconn.execute("delete*from bbstl where name='"&ddname&"'")
for i=0 to tnum
myconn.execute("delete*from bbs"&atb(i)&" where name='"&ddname&"'")
next
else
myconn.execute("delete*from bbstl where bd="&bd&" and name='"&ddname&"'")
for i=0 to tnum
myconn.execute("delete*from bbs"&atb(i)&" where bd="&bd&" and name='"&ddname&"'")
next
end if
%><%=t1%>删 除 成 功<%=t2&d1%>·批量删除帖子成功·<%=d2%><%end if%>
<%case"moveday"
daynum=request.form("daynum")
frombd=request.form("frombd")
tobd=request.form("tobd")
if not isnumeric(daynum) then
%><%=t1%>错 误 信 息<%=t2&d1%>·天数必须填写并且为数字·<%=d2%><%else
for i=0 to tnum
myconn.execute("update bbs"&atb(i)&" set bd="&tobd&" where id or bid in (select id from bbstl where bd="&frombd&" and riqi<now-"&daynum&")")
next
myconn.execute("update bbstl set bd="&tobd&" where bd="&frombd&" and riqi<now-"&daynum&"")
%>
<%=t1%>移 动 成 功<%=t2&d1%>·批量移动帖子成功·<%=d2%><%end if%>
<%case"movename"
movename=Replace(Request.form("movename"),"'","''")
frombd=request.form("frombd")
tobd=request.form("tobd")
if movename="" then%>
<%=t1%>错 误 信 息<%=t2&d1%>·请输入用户名·<%=d2%><%else
for i=0 to tnum
myconn.execute("update bbs"&atb(i)&" set bd="&tobd&" where bd="&frombd&" and name='"&movename&"'")
next
myconn.execute("update bbstl set bd="&tobd&" where bd="&frombd&" and name='"&movename&"'")
%><%=t1%>移 动 成 功<%=t2&d1%>·批量移动帖子成功·<%=d2%><%end if%>
<%case"bbs"
upnum=Replace(Request.form("upnum"),"'","''")
upsize=Replace(Request.form("upsize"),"'","''")
style=Replace(Request.form("style"),"'","''")
select case style
case"a"
c1="#bcd0ed"
c2="#006699"
case"b"
c1="#BBD7C6"
c2="#009966"
case"c"
c1="#DBBFBB"
c2="#A22828"
case"d"
c1="#E7D8C5"
c2="#A27A28"
case"e"
c1="#D4D4D4"
c2="#666666"
case"f"
c1="#F7E1EB"
c2="#FF6295"
end select
lmyn=Request.form("lmyn")
lmtype=Request.form("lmtype")
if not isnumeric(upnum) or not isnumeric(upsize) then
uuu="<br>·上传个数以及上传大小必须为数字·"
end if
tl=Replace(Request.form("tl"),"'","''")
topinfo=Replace(Request.form("topinfo"),"'","''")
if tl="" or upsize="" or upnum="" or style="" or not isnumeric(upnum) or not isnumeric(upsize) then
%><%=t1%>错 误 信 息<%=t2&d1%>·请填写完整必填项目·<%=uuu%><%=d2%>
<%else
bbsupa=application(cn&"bbsup")
if bbsupa=1 then application(cn&"bbsup")=2
if bbsupa=2 then application(cn&"bbsup")=1
if lmyn="" then
lm=0
else
if lmtype="" then lmtype=1
lm=lmtype
end if
tli(0)=tl
tli(1)=c1
tli(2)=c2
tli(3)=topinfo
tli(4)=upnum
tli(5)=upsize
tli(6)=style
tli(10)=lm
for i= 0 to 10
str=str&tli(i)&"|?|"
next
str=left(str,len(str)-3)
myconn.execute("update bbsinfo set tlinfo='"&str&"'")%>
<%=t1%>修 改 成 功<%=t2&d1%>·论坛名称以及其他参数修改成功·<%=d2%><%end if%><%end select
%><br><table onclick=javascript:window.open('http://www.6kbbs.net/') width=* border=0 style='border-collapse: collapse;CURSOR: hand;' cellspacing=0 align=center><tr><td align=center><p style='margin:5px;line-height:150%'><font color=<%=c2%>>欢迎您使用 6Kbbs 论坛系统 ...<br>官方支持站点:http;//www.6kbbs.net/ </font> </p></td></tr></table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -