<!--#include file=CONN.ASP-->
<!--#include file=foxx.asp-->
<!--#include file="config.asp"-->
<!--#include file="usercookies.asp"-->
<link href="fox.css" rel="stylesheet" type="text/css">
<%
dim xxid,username,addname,company,memo,huitype,yz,class1,class2,comname,rs,sql,userip
xxid=trim(request("xxid"))
username=trim(request("username"))
comname=trim(request("comname"))
addname=trim(request("addname"))
company=trim(request("company"))
memo=trim(request.form("memo"))
huitype=trim(request("huitype"))
yz=trim(request("yz"))
class1=trim(request("class1"))
class2=trim(request("class2"))

if huitype<"0" then
    Response.Write "<script>alert('您的级别不能操作此功能！');history.go(-1);</SCRIPT>"
    Response.end
end if

set rs=server.createobject("adodb.recordset")
sql="select * from [FOX_zixun] where UserName='"&UserName&"' and xxid='"&xxid&"'"
rs.open sql,conn,1,3
if session("addzixun")<>"" then
  if DateDiff("s",session("addzixun"),Now())<300 then
  response.write "<script>alert('系统保护：你提交数据太快，系统中止运行，请等待300秒钟！！');this.location.href='userhome.asp';</SCRIPT>"
  response.end
  end if
  end if
if not rs.eof or not rs.bof then
rs("addname")=addname
rs("company")=company
rs("memo")=memo
rs("class1")=class1
rs("class2")=class2
rs("comname")=comname
if huitype>"0" and yz="1" then
rs("yz")=1
else
rs("yz")=0
end if
rs("fbsj")=now()
userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip="" Then 
userip=Request.ServerVariables("REMOTE_ADDR")
end if
rs("ip")=userip
rs.update
rs.close
set rs=nothing
else
rs.addnew
rs("xxid")=xxid
rs("username")=username
rs("addname")=addname
rs("company")=company
rs("memo")=memo
rs("class1")=class1
rs("class2")=class2
rs("comname")=comname
if huitype>"0" and yz="1" then
rs("yz")=1
else
rs("yz")=0
end if
rs("fbsj")=now()
userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip="" Then 
userip=Request.ServerVariables("REMOTE_ADDR")
end if
rs("ip")=userip
rs.update
rs.close
set rs=nothing
end if
set rs=server.createobject("adodb.recordset")
sql="select jf from [FOX_user] where UserName='"&UserName&"'"
rs.open sql,conn,1,3
rs("jf")=rs("jf")+jjf
rs.update
rs.close
set rs=nothing
closedb
session("addzixun")=now()
    Response.Write "<script>alert('发布成功！');this.location.href='userhome.asp';</SCRIPT>"
     response.end
Response.Redirect "userhome.asp"
%></body></html>