📄 update_adm.asp
字号:
<!--#include file="function/m_conn.asp"-->
<!--#include file="function.asp"-->
<%
'set bs=server.CreateObject("MSWC.browsertype")
'if trim(bs.cookies)="True" then
'admin_Remark=request.Cookies("Adm_Remark")
' else
admin_Remark=session("Adm_Remark")
'end if
'response.write admin_remark
if trim(admin_Remark)<>"super" then
msg_error("权限不够,您没有超级身份!")
else
set rs=server.CreateObject("adodb.recordset")
adm_id=trim(request("adm_id"))
search_word=trim(request("search_word"))
ipage=trim(request("page"))
adm_loginname=testdb(request("adm_loginname"))
adm_loginpasd=testdb(request("adm_loginpasd"))
Adm_Remark=testdb(request("Adm_Remark"))
Adm_Status=testdb(request("Adm_Status"))
Adm_Gread=testdb(request("Adm_Gread"))
Adm_type=testdb(request("Adm_type"))
Adm_StartCity=testdb(Trim(request("Adm_StartCity")))
city_IfInclude=testdb(Trim(request("city_IfInclude")))
if adm_id<>"" then
sql="select * from tadmin where adm_id = "&adm_id
rs.open sql,conn,3,2
if rs.recordcount>0 then
rs("adm_loginpasd")=adm_loginpasd
rs("Adm_Remark")=Adm_Remark
rs("Adm_Status")=Adm_Status
rs("Adm_Gread")=Adm_Gread
rs("Adm_type")=Adm_type
rs("Adm_StartCity")=Adm_StartCity
rs("city_IfInclude")=city_IfInclude
rs.update
'session("Adm_StartCity")=Adm_StartCity
'session("city_IfInclude")=city_IfInclude
rs.close
msg="修改成功!"
else
msg="没有修改成功!ID出错了!ID号是"&adm_id&sql
end if
else
sql="select * from tadmin where adm_loginname = '"&adm_loginname&"'"
rs.open sql,conn,3,1
if rs.recordcount>0 then
msg_error("管理员重名不能添加!")
else
rs.close
sql="select * from tadmin"
rs.open sql,conn,3,2
rs.addnew
rs("adm_loginname")=adm_loginname
rs("adm_loginpasd")=adm_loginpasd
rs("Adm_Remark")=Adm_Remark
rs("Adm_Status")=Adm_Status
rs("Adm_Gread")=Adm_Gread
rs("Adm_type")=Adm_type
rs.update
rs.close
msg="管理员增加成功!"
end if
end if
end if
%>
<!--#include file="../../config.asp"--><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form method="post" name="form1" action="wzgl_01.asp">
<input type="hidden" name="page" value="<%=ipage%>">
<input type="hidden" name="search_word" value="<%=search_word%>">
</form>
<script language="javascript">
window.alert('<%=msg%>');
form1.submit();
</script>
</body>
</html>
<%
'set bs=nothing
set rs=nothing
call conn_close()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -