% if session("admin")="" then conn.close set conn = nothing response.Write "" response.End end if if request.form("action") = "save" then if session("rank")>2 then conn.close set conn = nothing response.Write "" response.End end if set rs=server.CreateObject("adodb.recordset") rs.Open "select * from admin where admin='"&session("admin")&"'",conn,1,3 if md5(trim(request.form("UserPassword")))<>rs("UserPassword") then response.Write "" response.End else rs("UserPassword")=md5(trim(request.form("UserPassword2"))) rs.Update response.write "" response.End end if end if if request("action")="add" then set rs=server.CreateObject("adodb.recordset") rs.open "select * from admin",conn,1,3 rs.addnew rs("admin")=trim(request("username")) rs("userpassword")=md5(trim(request.form("password"))) rs("flag")=request("flag") rs.update rs.close set rs=nothing response.Redirect("manage.asp") response.End elseif request("action")="del" then conn.execute("delete from admin where id="&request("id")) response.Redirect("manage.asp") elseif request("action")="modify" then if request("password")="" then conn.execute("update admin set admin='"&request("username")&"',flag='"&request("flag")&"' where id="&request("id")) else conn.execute("update admin set admin='"&request("username")&"',flag='"&request("flag")&"',UserPassword='"&md5(request("password"))&"' where id="&request("id")) end if response.redirect("manage.asp") end if call flagstr("常规管理","../error.htm") %>