<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="css/css.css">
<title>保存文件</title>

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
</head>
<body  topmargin="5" leftmargin="5">

<p>
<%
Set Upload=Server.createobject("Persits.Upload.1") 
uploadlimitsize=request.cookies("filelength")                             '改变这个设置可以改变上传文件的大小限制，单位兆。
Upload.SetMaxSize uploadlimitsize*1024*1024, True 
Upload.Save  
if err.number <> 0 then 
response.write  "出现错误: " & err.number & "、" & err.description &"" 
end if 
if err.number = 8 then 
response.write " 你上传的文件超过限制（"& uploadlimitsize &"兆）<a href=""javascript:history.go(-1)"">重新上传</a>" 
response.end 
end if 




 
	id=Upload.Form("id").value
	curpage=Upload.Form("curpage").value
	title=Upload.Form("title").value
	author=Upload.Form("author").value
	dateandtime=Upload.Form("dateandtime").value
	content=Upload.Form("content").value
	shangjiaoziliao=Upload.Form("radiobutton").value
	jiezhidate=Upload.Form("jiezhidate").value
			
			 
			
			
			
	dim rsgonggaosql
	dim rsgonggao
	
	dim filename
	
	'dim strtype 
	dim strdateandtime
	if  dateandtime<>"" then
	   strdate=cdate(dateandtime)
	else  
	   strNow=now()
	 end if
	 
	
	
	set rsgonggao=server.createobject("adodb.recordset")
	rsgonggaosql="select * from gonggao where  id='"&id& "'" 
	
	rsgonggao.open rsgonggaosql,conn,1,3
	
	strftype=rsgonggao("ftype")
	
	
	rsgonggao("title")=title
	rsgonggao("author")=author
	rsgonggao("fdate")=dateandtime
	rsgonggao("content")=content
	rsgonggao("updateandtime")=strdate
	rsgonggao("hits")="0"
	rsgonggao("updatetime")=now()
	rsgonggao("上交资料")=shangjiaoziliao
	rsgonggao("截止日期")=jiezhidate
	rsgonggao("upname")=request.cookies("tname")
	strip=Request.ServerVariables("REMOTE_ADDR")
	rsgonggao("upip")=strip
	rsgonggao.update
	
	
	rsgonggao.close
	
   '重新标记为未读通知
	set rssended=server.createobject("adodb.recordset")
	rssendedsql="update  gonggaosee set  Havesee='未查阅'  where   fid='"&id& "'" 
	rssended.open rssendedsql,conn,1,3
	
	 Upload.Dispose ' 释放内存 
	 Set Upload = Nothing 

	%>
	
	 
	</p>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<div align="center">
	  <table border="1" cellspacing="0" width="50%" bordercolorlight="#11B1FF" bordercolordark="#F0F8FF">
		<tr>
		  <td width="100%" height="20">
		  <p align="center" class="STYLE1">保存修改成功</td>
		</tr>
		<tr>
		  <td width="100%">
			<p align="left"><br>
			  <span class="STYLE1">标题为：
			  <%response.write title%>
			  </span><br>
			  <center>
		 </p>
	   
		<p align="center"><br>
		<br>
		</p>
		  </td>
		</tr>
	  </table>
	</div>
	 <p>
	   </p>
	 <p align="center">
	 
	<input name="button" type="button" class="topanniu" onClick="location='manage.asp?ftype=<%=strftype%>&curpage=<%=curpage%>';"  value="返回" />
	 </p>
	</body>  
	  
	</html>  
	
