<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../head.asp"-->
<%
if issession=0 then
 	username=Replace_Text(request.Cookies("Yxmember"))
 	else
 	username=session("user")
end if 
title=Replace_Text(request("title"))
typeid=Replace_Text(request("typeid"))
tj=Replace_Text(request("tj"))
content=request("content")
if content="" then
response.write"<SCRIPT language=JavaScript>alert('您没有填写新闻内容，请返回重新填写！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
set rs=server.CreateObject ("adodb.recordset")
sql="select * from yixiang_news where title='"&title&"'"
rs.open sql,conn,1,3
if not rs.eof then
response.write"<SCRIPT language=JavaScript>alert('对不起，您已经提交过此信息！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs.addnew
rs("title")=title
rs("typeid")=typeid
if tjnews="" then
tjnews=0
else
tjnews=1
end if
rs("content")=content
rs("nfrom")="会员发布"
rs("promulgator")=username '发布者
rs("ismember")=1
rs("dateandtime")=now()
rs("Auditing")=0

rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
end if

response.write "<br><center><span style='color:red; font-size:14px'>恭喜您，新闻发布成功！<br><br><a onclick='javascript:history.go(-1)'> [返回上一页]<a></span></center>"
%>