<!--#include file="byshop_conn.asp"-->
<%
ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
ServerName2=Cstr(Request.ServerVariables("SERVER_NAME"))
If Mid(ServerName1,8,len(ServerName2))<>ServerName2 Then
    Response.Write "路径有误，禁止从网站外部提交表单！"
     response.end

End if
%>
<!--#include file="cookie.asp" -->
<%
Public Function FilterHtml(Str)
    If Trim(Str) = "" Or IsNull(Str) Then
        FilterHtml=""
    Else
    Str = Replace(Str, ">", "&gt;")
    Str = Replace(Str, "<", "&lt;")
    Str = Replace(Str, Chr(32), "&nbsp;")
    Str = Replace(Str ,Chr(9), "&nbsp;")
    Str = Replace(Str, Chr(34), "&quot;")
    Str = Replace(Str, Chr(39), "&#39;")
    Str = Replace(Str, Chr(13), "")
    Str = Replace(Str, Chr(10) & Chr(10), "</p><p>")
    Str = Replace(Str, Chr(10), "<br> ")
    FilterHtml = Str
    End If
End Function
				set rs=server.CreateObject ("adodb.recordset")
sql="select * from byshop_user where user ='"&replace(request.cookies("byshop")("user"),"'","")&"'"
rs.open sql,conn,1,3
if  rs.eof then
response.write"<SCRIPT language=JavaScript>alert('修改加盟商家资料失改！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs("email")=FilterHtml(trim(request.form("email")))'电子邮箱
rs("name")=FilterHtml(trim(request.form("name")))'真实姓名
rs("sex")=int(request.form("sex"))'性别
rs("address")=FilterHtml(trim(request.form("address")))'公司地址
rs("tel")=FilterHtml(trim(request.form("tel")))'电话号码
rs("mobile")=FilterHtml(trim(request.form("mobile")))'手机号码
rs("fax")=FilterHtml(trim(request.form("fax")))'传真号码
rs("web")=FilterHtml(trim(request.form("web")))'公司网址
rs("usersort")=FilterHtml(trim(request.form("usersort")))'会员类型
rs("contract")=FilterHtml(trim(request.form("contract")))'联系方式
rs("contract2")=FilterHtml(trim(request.form("contract2")))'联系方式2
rs("address")=FilterHtml(trim(request.form("address")))'地址
rs("jyfw")=FilterHtml(trim(request.form("operation")))'主要业务
rs("message")=FilterHtml(trim(request.form("message")))'公司简介
rs.update
rs.close
set rs=noting 
  response.write"<SCRIPT language=JavaScript>alert('恭喜您，您的资料修改成功！');"
   response.write"this.location.href='modify.asp';</SCRIPT>" 
   response.end 
   end if
%>
 
 