<%@ codepage ="936" %>
    <% 
	data_path="../../"
	numid="51"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
  <!--#include file="../../inc/filesystem.asp"-->
 <!--#include file="../../inc/safe.asp"-->  
   <!--#include file="../rolecheck.asp"-->

<%
if request.form("newsid")="" then
Response.write("<script >alert('对不起！参数传递错误！');history.back(-1);</script>")
response.End()
end if

 newsid=Replace_Text(request.form("newsid"))
 
%>

<link rel="stylesheet" type="text/css" href="../css/style.css">
<%
if Not ChkPost then 
response.redirect ("/login/chklogin.asp?login=4")
response.end
end if
checkbox=Replace_Text(request.form("checkbox"))
 title=Replace_Text(request.form("title"))
  typeid=Replace_Text(request.form("typeid"))
tjnews=Replace_Text(request.form("tjnews"))
topnews=Replace_Text(request.form("topnews"))
if checkbox ="" then
checkbox=0
else
checkbox=1
end if
if tjnews="" then
tjnews=0
else
tjnews=1
end if
if topnews="" then
topnews=0
else
topnews=1
end if
tjhome=Replace_Text(request.form("tjhome"))
if tjhome="" then
tjhome=0
else
tjhome=1
end if
homepic=Replace_Text(request.form("homepic"))
if homepic="" then
homepic=0
else
homepic=1
end if
homehot=Replace_Text(request.form("homehot"))
if homehot="" then
homehot=0
else
homehot=1
end if
nfrom=Replace_Text(request.form("nfrom"))
text=Replace_Text(request.form("text"))
picture=Replace_Text(request.form("picture"))
oldpic=Replace_Text(request.form("oldpic"))
 content=request.form("content")
pictext=request.form("pictext")
//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 Websen_news where newsid="&newsid&""
rs.open sql,conn,1,3
rs("pictext")=pictext
rs("title")=title
rs("typeid")=typeid
rs("tjnews")=tjnews
rs("homehot")=homehot
rs("topnews")=topnews
rs("nfrom")=nfrom
rs("checkbox")=checkbox
rs("http")=text
 if Replace_Text(Request("cimg"))=1 then
   '删除新上传的而又不使用的图片^^^^^^^^^^^^^^^^^^ 
    if picture<>oldpic then
	if picture<>"nopicture.gif" then
 	 call FileDel(HOPE_InstallDir&"UploadFile/"&picture)
	 end if
 	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   end if
  if Replace_Text(Request("cimg"))=2 then
     rs("picture")=picture
   '删除原有图片^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    if picture<>oldpic then
	 if olpic<>"nopicture.gif" then
  	 call FileDel(HOPE_InstallDir&"UploadFile/"&oldpic)
	 end if
 	end if
   '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  end if
  
 rs("content")=content
rs("dateandtime")=now()
rs.update
id1=rs("NewsID")
id2=rs("NewsID")
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
</head>
<iframe src="../../manage/makehtml/info/makedetail.asp?all=update&id1=<%=id1%>&id2=<%=id2%>&schtml=开始生成>>" frameborder="0" scrolling="yes" height="0" widht="0"></iframe>

<iframe src="../../manage/makehtml/index/index.asp?act=info" frameborder="0" scrolling="yes" height="0" widht="0"></iframe>


<table cellpadding=2 cellspacing=1 border=0 width=400 class=tableBorder align=center><TR>
  <TH class=tableHeaderText colSpan=2 height=25>修改咨讯信息</TH>
<TR><tr><td height=85 valign=top class=forumRow><div align=center><br><br>
修改咨讯信息成功！</div></td></tr><tr align=center><td height=30 class=forumRowHighlight><a href='index.asp'>&lt;&lt; 返回上一页</a></td></tr></table>
</body>
</html>
<br>
<!--#include file="../copy.asp" -->