<!--#include file="include/conn.asp"-->
<% 
'website:http://www.angelasp.com
' Angel工作室技术开发团队:QQ:815657032、QQ：709047174
' Copyright (C) Angel工作室 (http://www.angelasp.com).  All rights reserved
user_name=Request.Form("username")
user_password=Request.Form("password") 
user_ip=getIP()
action=request.QueryString("action")
Select case action
Case "reg"
  user_addtime=Now()
  if user_name<>"" and user_password<>"" then
    set rs=server.CreateObject("adodb.recordset")
        sql="insert into bookuser (user_name,user_password,user_addtime,user_ip) values ('"&user_name&"','"&user_password&"','"&user_addtime&"','"&user_ip&"')" 
        conn.Execute(sql)
		conn.close
		Response.Write "<script language='javascript'>alert('会员注册成功！');location='index.asp';</script>"
 else 
   Response.Write "<script language='javascript'>alert('注册失败,内容或者用户名不能有空');location='index.asp';</script>"
 End If 
Case "modify"
userid=Request.Cookies("Auser")("id")
set rs = server.createobject("adodb.recordset")
sql="select * from bookuser where id="&userid
rs.open sql,conn,1,3
rs("user_password")=user_password
rs("user_ip")=user_ip
rs.update
rs.close
set rs=nothing
Response.Write "<script language='javascript'>alert('密码修改成功！');location='index.asp';</script>"
Case Else 
End select


%>