saveusermod.asp

来自「711_6.0完全免费版本企业网站管理程序」· ASP 代码 · 共 36 行

ASP
36
字号
<!-- #include file="conn.asp "-->
<!--#include file="checkUser.asp"-->
<%
if Request("modifyPassword")=1 then
	if Request("password1")<>Request("password2") then
		response.write "<script>alert('注意:确认密码与密码不相同!');location.href='useradd.asp';</script>"
		response.End
	end if
	modifyPassword=1
end if
'	response.write modifyPassword
'	response.End
       Set cmdTemp = Server.CreateObject("ADODB.Command")
       Set InsertCursor = Server.CreateObject("ADODB.Recordset")
       cmdTemp.CommandText = "SELECT * FROM admin WHERE id="&Request("id")
       cmdTemp.CommandType = 1
       Set cmdTemp.ActiveConnection = conn
       InsertCursor.Open cmdTemp, , 1, 3
 
       InsertCursor("admin") =Request("admin")
if modifyPassword=1 then
       InsertCursor("pwd") =Request("password1")
end if
       InsertCursor.Update
       InsertCursor.close
	   conn.close
       set InsertCursor=nothing
       set conn=nothing
%>
<script language=Javascript>
<!--
alert("修改成功!");
this.document.location="main.asp";
-->
</script>

⌨️ 快捷键说明

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