📄 admin-gl.asp
字号:
if name="" or url="" then
%>
<%=t1%>错 误 信 息<%=t2&d1%>·信息没有填写完整·<%=d2%>
<%else%>
<%myconn.execute("update [lmbbs] set url='"&url&"',picurl='"&picurl&"',name='"&name&"' where url='"&oldurl&"'")%>
<%=t1%>修 改 成 功<%=t2&d1%>·修改论坛联盟成功·<%=d2%><%end if%>
<%case"updateuser"%>
<%
chname=Replace(Request.form("chname"),"'","''")
set add=myconn.execute("SELECT name FROM user where name='"&chname&"'")
if add.eof and add.bof then%>
<%=t1%>错 误 信 息<%=t2&d1%>·没有这个用户名·<%=d2%>
<%else%>
<%set ziliao=myconn.execute("SELECT * FROM user where name='"&chname&"'")%>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form3_Validator(theForm)
{
if (theForm.chgxqm.value.length > 255)
{
alert("在 chgxqm 域中,请最多输入 255 个字符。");
theForm.chgxqm.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form action="?menu=updateuser2" method="POST" onsubmit="return FrontPage_Form3_Validator(this)" name="FrontPage_Form3">
<%=t1%>更改用户资料<%=t2&d1%>
<P style="MARGIN: 5px">用户名:<input type="text" name="chname" size="20" value="<%=ziliao("name")%>" readonly><font color="#FF0000">·</font>无法修改
<P style="MARGIN: 5px">
帖 数:<input type="text" name="chbbsnum" size="20" value="<%=ziliao("bbsnum")%>" ><br>
金 钱:<input type="text" name="chqian" size="20" value="<%=ziliao("qian")%>" ><br>
魅 力:<input type="text" name="chmeili" size="20" value="<%=ziliao("meili")%>" ><br>
经 验:<input type="text" name="chjingyan" size="20" value="<%=ziliao("jingyan")%>" ><br>
QQ号码:<input type="text" name="chqq" size="18" value="<%=ziliao("qq")%>"><br>
Email:<input type="text" name="chemail" size="20" value="<%=ziliao("email")%>"><font color="#FF0000">·</font>您可以清空Email项了<br>
主 页:<input type="text" name="chhome" size="20" value="<%=ziliao("home")%>"><br>
生 日:<input type="text" name="chburn" size="20" value="<%=ziliao("burn")%>"><br>
性 别:<select size=1 name=chsex style="font-size: 9pt"><option <%if ziliao("sex")=1 then%>selected<%end if%> value=1>男</option><option <%if ziliao("sex")=2 then%>selected<%end if%> value=2>女</option></select><br>
头 像:<input type="text" name="chtoupic" size="30" value="<%=ziliao("toupic")%>"> 高度:<input type="text" name="chch" size="5" value="<%=ziliao("ch")%>"> 宽度:<input type="text" name="chku" size="5" value="<%=ziliao("ku")%>"><br>
签 名:<!--webbot bot="Validation" i-maximum-length="255" --><TEXTAREA name="chgxqm" rows=4 wrap=PHYSICAL cols=50><%=ziliao("gxqm")%></TEXTAREA>
</p>
<P style="MARGIN: 5px"><input type="submit" value=" 提 交 " name="B1">
<input type="reset" value=" 重 置 " name="B2"><%=d2%></form>
<%end if%>
<%case"updateuser2"%>
<%
chname=Replace(Request.form("chname"),"'","''")
chbbsnum=Replace(Request.form("chbbsnum"),"'","''")
chqian=Replace(Request.form("chqian"),"'","''")
chmeili=Replace(Request.form("chmeili"),"'","''")
chjingyan=Replace(Request.form("chjingyan"),"'","''")
chqq=Replace(Request.form("chqq"),"'","''")
chemail=Replace(Request.form("chemail"),"'","''")
chhome=Replace(Request.form("chhome"),"'","''")
chburn=Replace(Request.form("chburn"),"'","''")
chsex=Replace(Request.form("chsex"),"'","''")
chtoupic=Replace(Request.form("chtoupic"),"'","''")
chch=Replace(Request.form("chch"),"'","''")
chku=Replace(Request.form("chku"),"'","''")
chgxqm=Replace(Request.form("chgxqm"),"'","''")
%>
<%
if not isnumeric(chqian) or not isnumeric(chmeili) or not isnumeric(chjingyan) then%>
<%=t1%>错 误 信 息<%=t2&d1%>·金钱、魅力、经验必须为大于0的数字·<%=d2%>
<%else
myconn.execute("update [user] set bbsnum='"&chbbsnum&"', qian='"&chqian&"',meili='"&chmeili&"',jingyan='"&chjingyan&"',qq='"&chqq&"',email='"&chemail&"',home='"&chhome&"',burn='"&chburn&"',sex='"&chsex&"',toupic='"&chtoupic&"',ch='"&chch&"',ku='"&chku&"',gxqm='"&chgxqm&"' where name='"&chname&"'")
%>
<%=t1%>修 改 成 功<%=t2&d1%>·已经成功的修改了用户的信息·<%=d2%>
<%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,"&_
"ips varchar(20))"
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="#00659C"
c2="#EFEFEF"
case"b"
c1="#87BE3D"
c2="#F7FFF7"
case"c"
c1="#E6462F"
c2="#FFF9F7"
case"d"
c1="#DE9527"
c2="#FFFDF4"
case"e"
c1="#918E91"
c2="#FAFAFA"
case"f"
c1="#E66FB0"
c2="#FFF0F5"
case"g"
c1="#1059DE"
c2="#E1EDF7"
case"h"
c1="#8C8AB3"
c2="#FFFBFF"
case"i"
c1="#8D593D"
c2="#DFC4B5"
case"j"
c1="#4283D2"
c2="#E1EDF7"
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
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -