📄 sysuser.asp
字号:
<!--made by 中华软件联盟 http://www.downbest.net/-->
<!--#Include file="../Check_SI.asp"-->
<!--#include file="../dbconnect/guestbook.admin.inc.asp" -->
<%
Function checkPermission()
If Session("admin")<>"" then
checkPermission=TRUE
Else
checkPermission=FALSE
End if
End Function
tmp=checkPermission()
If tmp=TRUE then
%>
<%
operate=trim(Request("operate"))
'添加超级用户
if operate="add" then
operate_sta = "添加用户失败-您输入用户信息不全或者用户名中含有不合法字符"
addsysuser = trim(Request.form("addsysuser"))
addusername = trim(Request.form("addusername"))
addpassword = trim(Request.form("addpassword"))
conaddpassword = trim(Request.form("conaddpassword"))
if addsysuser = "ok" and addusername<>"" and addpassword<>"" and conaddpassword<>"" and addpassword=conaddpassword and Instr(addusername,"'")<1 and Instr(addusername," ")<1 and Instr(addusername,"""")<1 and Instr(addusername,"&")<1 then
conn.Execute("INSERT INTO admin (user,pwd) VALUES ('"&addusername&"','"&addpassword&"')")
operate_sta = "添加用户成功"
end if
end if
'修改用户密码
if operate="mod" then
operate_sta = "修改用户密码失败-您输入用户信息不全或者用户名含有不合法字符"
modsysuser = trim(Request.form("modsysuser"))
modusername = trim(Request.form("modusername"))
modpassword = trim(Request.form("modpassword"))
newpassword = trim(Request.form("newpassword"))
connewpassword = trim(Request.form("connewpassword"))
if modsysuser = "ok" and modusername<>"" and modpassword<>"" and newpassword<>"" and connewpassword<>"" and newpassword=connewpassword and Instr(modusername,"'")<1 and Instr(modusername," ")<1 and Instr(modusername,"""")<1 and Instr(modusername,"&")<1 then
operate_sta = "修改用户密码失败-不存在这个用户"
Set rs=Server.CreateObject("adodb.recordset")
sql="Select * From admin Where user='"&modusername&"'"
rs.Open sql,conn,1,1
if rs.RecordCount =1 then
operate_sta = "修改用户密码失败-您输入的原密码不符"
password=trim(rs("pwd"))
if modpassword = password then
operate_sta = "修改用户密码成功"
conn.Execute("UPDATE admin SET pwd='"&newpassword&"' WHERE user='"&modusername&"'")
end if
end if
set rs=nothing
end if
end if
'删除超级用户
if operate="del" then
delusername = trim(Request.QueryString("username"))
conn.Execute("DELETE FROM admin WHERE user='"&delusername&"'")
end if
%>
<html>
<head>
<title>中华软件联盟-管理中心-回复留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style.css" type="text/css">
<SCRIPT language=javascript>
<!--
function checkdel(username){
if (confirm("您确定要删除 "+username+" 这个超级用户吗?")){
window.open("sysuser.asp?operate=del&username="+username,"_self");
}
else{
//Do Nothing;
}
}
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.bgColor = clrIn;
}
}
// -->
</SCRIPT>
</head>
<body bgcolor="#003366" leftmargin="0" marginwidth="0" topmargin="0">
<table width="777" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF" height="5"><!--webbot bot="HTMLMarkup" startspan --><script language=javascript src="../head.js"></script><!--webbot
bot="HTMLMarkup" endspan -->
</td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 width=777 align=center border=0 bgcolor="#FFFFFF">
<tbody>
<tr>
<td valign=top width=200 bgcolor=#f5f5f5>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr>
<td align=middle background="../images/bg_2.gif" height=25>
<div align="center"><b><font color="#cc0000">信息反馈</font></b></div></td>
</tr>
<tr>
<td background="../images/line_3.gif" height=1></td>
</tr>
<tr>
<td bgcolor=#f5f5f5 height=30> </td>
</tr>
<tr>
<td height=1>
<table cellspacing=0 cellpadding=0 width="80%" align=center border=0>
<tbody>
<tr>
<td width="100%" background="../images/line_3.gif" height=1></td>
</tr>
</tbody>
</table></td>
</tr>
<tr valign=center align=middle bgcolor=#ffffff>
<td bgcolor=#f5f5f5 height=25><div align="center"></div></td>
</tr>
<tr>
<td height=1>
<table cellspacing=0 cellpadding=0 width="80%" align=center border=0>
<tbody>
<tr>
<td width="100%" background="../images/line_3.gif" height=1></td>
</tr>
</tbody>
</table></td>
</tr>
<tr valign=center align=middle bgcolor=#ffffff>
<td onMouseOver="mOvr(this,'#ffffff');" onMouseOut="mOut(this,'#f5f5f5');" bgcolor=#f5f5f5 height=25>
<div align="center"><font color="#0000FF"><b><font color="#FF6600"><img src="../images/gbook.gif" width="18" height="18" border="0" align="absmiddle"></font></b></font> <a href="../default.asp">查看留言</a></div></td>
</tr>
<tr>
<td height=1>
<table cellspacing=0 cellpadding=0 width="80%" align=center border=0>
<tbody>
<tr>
<td width="100%" background="../images/line_3.gif" height=1></td>
</tr>
</tbody>
</table></td>
</tr>
<tr valign=center align=middle bgcolor=#ffffff>
<td onMouseOver="mOvr(this,'#ffffff');" onMouseOut="mOut(this,'#f5f5f5');" bgcolor=#f5f5f5 height=25>
<div align="center"><font color="#CCCCCC"><img src="../images/write.gif" border="0" width="18" height="14"> <a href="../guestbook.asp"> 签写留言</a></font></div></td>
</tr>
<tr>
<td height=1>
<table cellspacing=0 cellpadding=0 width="80%" align=center border=0>
<tbody>
<tr>
<td width="100%" background="../images/line_3.gif" height=1></td>
</tr>
</tbody>
</table></td>
</tr>
<tr valign=center align=middle bgcolor=#ffffff>
<td onMouseOver="mOvr(this,'#ffffff');" onMouseOut="mOut(this,'#f5f5f5');" bgcolor=#f5f5f5 height=25><div align="center"><img src="../images/admin.gif" width="18" height="18" border="0" align="absmiddle"> <a href="manage.asp">留言管理</a></div></td>
</tr>
<tr>
<td bgcolor=#f5f5f5>
<table cellspacing=0 cellpadding=0 width="80%" align=center border=0>
<tbody>
<tr>
<td width="100%" background="../images/line_3.gif" height=1></td>
</tr>
</tbody>
</table></td>
</tr>
<tr valign=center align=middle bgcolor=#ffffff>
<td onMouseOver="mOvr(this,'#ffffff');" onMouseOut="mOut(this,'#f5f5f5');" bgcolor=#f5f5f5 height=25><div align="center"><img src="../images/keywords.gif" width="18" height="14" border="0" align="absmiddle"> <a href="sysuser.asp">系统管理</a></div></td>
</tr>
<tr>
<td bgcolor=#f5f5f5>
<table cellspacing=0 cellpadding=0 width="80%" align=center border=0>
<tbody>
<tr>
<td width="100%" background="../images/line_3.gif" height=1></td>
</tr>
</tbody>
</table></td>
</tr>
<tr valign=center align=middle bgcolor=#ffffff>
<td onMouseOver="mOvr(this,'#ffffff');" onMouseOut="mOut(this,'#f5f5f5');" bgcolor=#f5f5f5 height=25><div align="center"><img src="images/exit.gif" width="16" height="16" align="absmiddle"> <a href="logout.asp">退出管理</a></div></td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -