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

<%
chk=trim(request.QueryString("act"))

company=trim(request.form("company"))
lxname=trim(request.form("lxname"))
sex=trim(request.form("sex"))
work=trim(request.form("work"))
tel=trim(request.form("tel"))
fax=trim(request.form("fax"))
mob=trim(request.form("mob"))
email=trim(request.form("email"))
address=trim(request.form("address"))
qq=trim(request.form("qq"))
bz=outHtml(trim(request.form("bz")))
indate=now()

sql="select * from kefu"
if chk="edt" then
  sql=sql&" where id="&trim(request("id"))
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,3,3

if chk<>"" then

  if chk="add" then '**********增加
     rs.addnew
     rs("company")=company
     rs("lxname")=lxname
	 rs("sex")=sex
	 rs("work")=work
     rs("tel")=tel
     rs("mob")=mob
     rs("fax")=fax
     rs("email")=email
     rs("address")=address
     rs("qq")=qq
     rs("bz")=bz
	 rs("indate")=indate
     rs.update
     response.write "<script language='javascript'>alert('添加成功！ ');document.location='member_list.asp';</script>"
  else
     rs("company")=company
     rs("lxname")=lxname
	 rs("sex")=sex
	 rs("work")=work
     rs("tel")=tel
     rs("mob")=mob
     rs("fax")=fax
     rs("email")=email
     rs("address")=address
     rs("qq")=qq
     rs("bz")=bz
     rs.update
     response.write "<script language='javascript'>alert('修改成功！ ');this.location.href='javascript:history.back(1)';</script>"
  end if

end if
rs.close
set rs=nothing

%>
