 <!--#include file="../head.asp"-->
 <!--#include file="../checkrole.asp"-->
  <!--#include file="../../inc/safe.asp"-->
<%
'*****************************************
'FileName: AuditSave.asp
'Action: 会员中心会员投搞
'Copyright(c)2004-2008 网胜科技公司技术开发部
'Writer: XYF
'Create Date: 2009-?-?
'*****************************************

 
set rs=server.CreateObject ("adodb.recordset")
sql="select * from websen_corporation where [User]='"&request.Cookies("Yxmember")&"'"
rs.open sql,conn,1,3 
userid=rs("id")
gradeid=rs("gradeid")
mark=rs("mark")
rs.close
title=request("title")'标题
content=FilterJS(request("content"))'发布内容
typeid=request("typeid")'行业属性
nfrom=request("nfrom")'信息来源
text=request("text")'转向
picture=request.Form("picture")'图片
checkbox=request("checkbox")'转向属性默认是空
if checkbox="" then
 checkbox=0
 end if
response.Write checkbox
sq1="select * from websen_MembersNews where title='"&title&"'"
rs.open sq1,conn,1,3 
if not rs.eof then
response.write"<SCRIPT language=JavaScript>alert('对不起，已经有此信息！');javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs.addnew
rs("Title")=title
rs("Typeid")=typeid
if checkbox=0 then
rs("Content")=content
else
rs("http")=text
end if
rs("MembersName")=request.Cookies("Yxmember")
rs("Membersid")=userid
'if picture="" then picture="nopicture.gif" end if
rs("Picture")=picture
rs("Nfrom")=nfrom
rs("checkbox")=checkbox
rs("Dateandtime")=now()
rs("flag")=0
rs("Membertype")=gradeid
rs("mark")=mark
rs.update
conn.close
response.write"<SCRIPT language=JavaScript>alert('提交数据成功！');window.location.href='AuditShow.asp'</SCRIPT>"
end if
%>