<!--#include file="conn.asp"-->
<!--#include file="chk_logs.asp"-->
<!--#include file="zjy_md6.asp"-->

<script>
function ckurl(url)
	 {
	    window.location.href=url;
	 }
</script>
<%
dim flagid
flagid = trim(request.querystring("action"))



dim nam,pwd,tjflag

nam=trim(request.form("textfield"))
pwd=zjy_md6(trim(request.form("textfield2")))
tjflag=request.form("menu1")


set rs=server.CreateObject("adodb.recordset")


rs.open "select * from shop_admin where id = "& flagid,conn,1,3


if rs.recordcount <0 then
        response.write "<p><a href = 'renpassword11.asp'>未找到该条记录，请返回</a>" 
else
		rs("tname") = nam
		rs("tpwd") = Pwd
		if tjflag = "putong" then rs("flag") = "3"
		if tjflag = "admin" then rs("flag") = "1"
		if tjflag = "qiantai" then rs("flag") = "2"

		rs.update
		rs.close
		
		conn.begintrans
		if conn.errors.count > 0 then
			conn.rollbacktrans
			response.write"保存过程中发生错误，必须重新修改！"
			response.write"<p><a href = 'renpassword11.asp'>返回，重新修改</a>"
		end if
		
end if
%>
<script>
	alert("信息修改成功！");
	ckurl("user.asp");
</script>

