<!-- #include file="conn.asp" -->
<!-- #include file="inc.asp" -->
<%
 Call Check_Session("Agent")
 company=trim(request.form("company"))
 address=trim(request.form("address"))
 iname=trim(request.form("iname"))
 tel=trim(request.form("tel"))
 fax=trim(request.form("fax"))
 email=trim(request.form("email"))
 qq=trim(request.form("qq"))
 content=trim(request.form("content"))
 ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
 If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR") 
 if qq="" then qq=0 end if
 if content="" then content="无" end if
 if email="" then email="-" end if
 if fax="" then fax="-" end if
 if Cint(Request.Form("agent_id"))<>Cint(Session("Agent_ID")) then
 set rs=server.createobject("adodb.recordset")
 sql="select * from agent where id="&Session("Agent_ID")
 rs.open sql,conn,1,3
 rs("company")=company
 rs("address")=address
 rs("iname")=iname
 rs("tel")=tel
 rs("fax")=fax
 rs("email")=email
 rs("qq")=qq
 rs("content")=content
 rs("ip")=ip
 rs("pas")=1
 rs("idate")=now()
 rs.update
 rs.close
 set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('信息登记/修改成功！');"
response.write"this.location.href='index.asp';</SCRIPT>" 
response.end
else
response.write"<SCRIPT language=JavaScript>alert('非法修改！');"
response.write"this.location.href='index.asp';</SCRIPT>" 
response.end
end if
conn.close
set conn=nothing
%>