<!--#include file="conn.asp"-->
<!--#include file="../md5.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
dim userid,action
action=request.QueryString("action")
userid=request.QueryString("id")
if userid="" then userid=request("userid")
select case action
case "save"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [user] where userid="&userid,conn,1,3
if trim(request("userpassword"))<>"" then rs("userpassword")=md5(trim(request("userpassword")))
rs("userzhenshiname")=trim(request("userzhenshiname"))
rs("useremail")=trim(request("useremail"))
rs("quesion")=trim(request("quesion"))
if trim(request("answer"))<>"" then rs("answer")=md5(trim(request("answer")))
'rs("shousex")=request("usersex")
'rs("shengshi")=trim(request("shengshi"))
rs("babyname")=trim(request("babyname"))
rs("babybirth")=trim(request("babybirth"))
rs("dadyname")=trim(request("dadyname"))
rs("szsheng")=trim(request("szsheng"))
rs("szshi")=trim(request("szshi"))

rs("shouhuodizhi")=trim(request("shouhuodizhi"))
rs("youbian")=trim(request("youbian"))
rs("usertel")=trim(request("usertel"))

rs("momname")=trim(request("momname"))
rs("momno")=trim(request("momno"))
rs("yuchan")=trim(request("yuchan"))
rs("babysex")=trim(request("babysex"))

rs("xbjq")=trim(request("xbjq"))
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('操作成功!');</script>"
response.Redirect "listuser1.asp?id="&userid
case "del"
conn.execute "delete from [user] where userid in ("&userid&") "
conn.execute "delete from shop_action where userid in ("&userid&")"
response.Redirect "manageuser1.asp"
end select
%>
