您没有管理本页面的权限。"
call dvbbs_error()
else
dim body,username2,password2,oldpassword,oldusername,oldadduser,username1
'''''''''''''''
'取出用户组管理员的组名 2002-12-13
dim groupsname,titlepic
set rs=conn.execute("select title from [UserGroups] where UserGroupID=1 ")
groupsname=rs(0)
set rs=conn.execute("select titlepic from usertitle where usergroupid=1 order by Minarticle desc")
titlepic=rs(0)
set rs=nothing
if request("action")="updat" then
call update()
response.write body
elseif request("action")="del" then
call del()
response.write body
elseif request("action")="pasword" then
call pasword()
elseif request("action")="newpass" then
call newpass()
response.write body
elseif request("action")="add" then
call addadmin()
elseif request("action")="edit" then
call userinfo()
elseif request("action")="savenew" then
call savenew()
response.write body
else
call userlist()
end if
conn.close
set conn=nothing
end if
sub userlist()
%>
管理员管理(点击用户名进行操作)
用户名
上次登陆时间
上次登陆IP
操作
<%
set rs=conn.execute("select * from admin order by LastLogin desc")
do while not rs.eof
%>
<%
end sub
sub del()
conn.execute("delete from admin where id="&request("id"))
conn.execute("update [user] set usergroupid=4 where username='"&replace(request("name"),"'","")&"'")
body="
管理员删除成功。"
end sub
sub pasword()
set rs=conn.execute("select * from admin where id="&request("id"))
oldpassword=rs("password")
oldadduser=rs("adduser")
%>
<% rs.close
set rs=nothing
end sub
sub newpass()
dim passnw,usernw,aduser
set rs=conn.execute("select * from admin where id="&request("id"))
oldpassword=rs("password")
if request("username2")="" then
body="
请输入管理员名字。[ 返回 ]"
exit sub
else
usernw=trim(request("username2"))
end if
if request("password2")="" then
body="
请输入您的密码。[ 返回 ]"
exit sub
elseif trim(request("password2"))=oldpassword then
passnw=request("password2")
else
passnw=md5(request("password2"))
end if
if request("adduser")="" then
body="
请输入管理员名字。[ 返回 ]"
exit sub
else
aduser=trim(request("adduser"))
end if
set rs=server.createobject("adodb.recordset")
sql="select * from admin where username='"&trim(request("oldusername"))&"'"
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then
rs("username")=usernw
rs("adduser")=aduser
rs("password")=passnw
''''''''''''''
'更新用户的的级别
conn.execute("update [user] set usergroupid=1,userclass='"&groupsname&"',titlepic='"&titlepic&"' where username='"&trim(request("oldusername"))&"'") '
body="
管理员资料更新成功,请记住更新信息。 管理员:"&request("username2")&" 密 码:"&request("password2")&" [ 返回 ]"
rs.update
end if
rs.close
set rs=nothing
end sub
sub addadmin()
%>
<%
end sub
sub savenew()
dim adminuserid
if request.form("username2")="" then
body="请输入后台登陆用户名!"
exit sub
end if
if request.form("username1")="" then
body="请输入前台登陆用户名!"
exit sub
end if
if request.form("password2")="" then
body="请输入后台登陆密码!"
exit sub
end if
set rs=conn.execute("select userid from [user] where username='"&replace(request.form("username1"),"'","")&"'")
if rs.eof and rs.bof then
body="您输入的用户名不是一个有效的注册用户!"
exit sub
else
adminuserid=rs(0)
end if
set rs=conn.execute("select username from admin where username='"&replace(request.form("username2"),"'","")&"'")
if not (rs.eof and rs.bof) then
body="您输入的用户名已经在管理用户中存在!"
exit sub
end if
conn.execute("update [user] set usergroupid=1 , userclass='"&groupsname&"',titlepic='"&titlepic&"' where userid="&adminuserid&" ")
conn.execute("insert into admin (username,[password],adduser) values ('"&replace(request.form("username2"),"'","")&"','"&md5(replace(request.form("password2"),"'",""))&"','"&replace(request.form("username1"),"'","")&"')")
body="用户ID:"&adminuserid&" 添加成功,请记住新管理员后台登陆信息,如需修改请返回管理员管理!"
end sub
sub userinfo()
dim menu(7,10)
menu(0,0)="常规设置"
menu(0,1)="常规设置信息"
menu(0,2)="论坛广告设置"
menu(0,3)="论坛日志管理"
menu(0,4)="初始信息设置"
menu(1,0)="论坛管理"
menu(1,1)="论坛版面添加 | 管理"
menu(1,2)="论坛权限管理"
menu(1,3)="合并论坛数据"
menu(1,4)="更新论坛数据"
menu(1,5)="联盟论坛添加 | 管理"
menu(1,6)="发布论坛公告 | 管理"
menu(1,7)="论坛门派管理"
menu(2,0)="用户管理"
menu(2,1)="用户信息管理"
menu(2,2)="论坛等级添加 | 管理"
menu(2,3)="用户积分设置"
menu(2,4)="论坛短信管理"
menu(2,5)="用户组添加 | 管理"
menu(2,6)="管理员添加 | 管理"
menu(2,7)="邮件列表 | 列表导出"
menu(2,8)="更新用户数据"
menu(3,0)="主题和帖子设置"
menu(3,1)="批量删除"
menu(3,2)="批量移动"
menu(3,3)="回收站管理"
menu(3,4)="当前帖子数据表管理"
menu(3,5)="数据表间帖子转换"
menu(4,0)="外观设置"
menu(4,1)="论坛风格CSS设置"
menu(4,2)="基本图片设置"
menu(4,3)="设置模板添加 | 管理"
menu(4,4)="CSS风格导出 | 导入"
menu(5,0)="替换/限制处理"
menu(5,1)="帖子过滤字符"
menu(5,2)="注册过滤字符"
menu(5,3)="IP来访限定添加 | 管理"
menu(5,4)="论坛IP库添加 | 管理"
menu(5,5)="导入IP库"
menu(6,0)="数据处理(Access)"
menu(6,1)="压缩数据库"
menu(6,2)="备份数据库"
menu(6,3)="恢复数据库"
menu(6,4)="系统空间占用"
menu(7,0)="文件管理"
menu(7,1)="上传头像管理"
menu(7,2)="上传文件管理"
menu(7,3)="注册头像管理"
menu(7,4)="发贴心情管理"
menu(7,5)="发贴表情管理"
dim j,tmpmenu,menuname,menurl
set rs=conn.execute("select * from admin where id="&request("id"))
%>
<%
rs.close
set rs=nothing
end sub
sub update()
'00,01,02,03,10,11,12,13,14,15,16,17,20,21,22,23,24,25,26,27,28,30,31,32,33,34,35,40,41,42,43,44,50,51,52,53,54,55,60,61,62,63,64,70,71,72,73,74,75
set rs=server.createobject("adodb.recordset")
sql="select * from admin where id="&request("id")
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then
rs("flag")=request("flag")
body="
管理员更新成功,请记住更新信息。"
rs.update
if rs("username")=membername then session("flag")=request("flag")
end if
rs.close
set rs=nothing
end sub
%>