<!--#include file=conn.asp-->
<!--#include file="../config.asp"-->
<!--#include file="cookies.asp"-->
<%
dim flag
flag=request.cookies("foxwww")("fox")

if flag=10 then
response.Write "<script LANGUAGE='javascript'>alert('您只是后台测试员，请注意身份！');window.location='right.asp';</script>"
response.end
end if%>
<link href="images/fox.css" rel="stylesheet" type="text/css">
<style type=text/css>
BODY{
	margin:0px;
	FONT-SIZE: 12px;
	FONT-FAMILY: "宋体", "Verdana", "Arial", "Helvetica", "sans-serif";
	background-color: #CCCC99; 
	scrollbar-highlight-color: #CC9933; 
	scrollbar-arrow-color: #FFFFFF; 
	scrollbar-base-color: #CC9933
}
table { border:0px; }
td { font:normal 12px 宋体; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋体; color:#111111; text-decoration:none; }
a:hover { color:#384780;text-decoration:underline; }
.sec_menu { border-left:2px solid #CC3300; border-right:2px solid #CC3300; border-bottom:2px solid #CC3300; overflow:hidden; background:#ffffff; }
.menu_title {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title span { position:relative; top:2px; left:8px; color:#FFFF00; font-weight:bold; }
.menu_title2 {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title2 span { position:relative; top:2px; left:8px; color:#FEFEFE; font-weight:bold; }
input,select,Textarea{
font-family:宋体,Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
</style>
<%
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"))

set rs=server.createobject("adodb.recordset")
sql="select * from [FOX_zixun] where UserName='"&UserName&"' and xxid='"&xxid&"'"
rs.open sql,conn,1,3
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
rs("yz")=1
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
rs("yz")=1
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
closedb
    Response.Write "<script>alert('发布成功！');this.location.href='addzixun.asp';</SCRIPT>"
     response.end
Response.Redirect "addzixun.asp"
%></body></html>