<!--#include file ="../md5/md5.asp"-->
<!--#include file="error.ini"-->
<!--#include file="conn.asp"-->
<%if session("flag")>1 then
    response.write "<script>alert('您的操作权限不够！');history.back();</script>"
    response.end
end if
%>
<%
   newpin=LCase(Request("newpin"))
   flag=Request("flag")
   newpin=MD5(newpin)
   manager=LCase(Request("manager"))
   
   submit=Trim(Request("submit"))
   
'//进行修改操作
   set rs = server.createobject("adodb.recordset")
   if submit="修改" then

'//修改用户密码      
	sql="select * from admin where id="&request("id")
	 rs.open sql,conn,1,3
	 rs("name")=manager
	 rs("pwd")=newpin
	 rs("flag")=flag
	 rs.update
	 rs.close
	 set rs=nothing
   
         conn.Close
         set conn=Nothing        

         response.redirect "addadmin.asp"
   
    end if
    
'//进行删除操作

   if submit="删除" then
      
      sql="delete from admin where id="&request("id")
      
      conn.Execute sql
      
      conn.Close
      set conn=Nothing      
     
   response.redirect "addadmin.asp"
   
   end if
%>
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

</body>

</html>