
<!--#INCLUDE FILE="fupload.inc"-->
<!--#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">

<title>保存文件</title>

<link rel="stylesheet" href="../css/style.css">

<style type="text/css">
<!--
.STYLE2 {color: #000000}
-->
</style>
</head>
<body topmargin="5" leftmargin="5">
<p>
<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
'---------------------------
'response.write "开始发送<br>"
'---------------------------
Dim Fields
UploadSizeLimit=21212121
Set Fields = GetUpload()
dim Field
For Each Field In Fields.Items
if Field.name="sendto" then sendto=BinaryToString(Field.value)
if Field.name="ftype" then ftype=BinaryToString(Field.value)
if Field.name="title" then title=BinaryToString(Field.value)
if Field.name="author" then author=BinaryToString(Field.value)
if Field.name="dateandtime" then dateandtime=BinaryToString(Field.value)
if Field.name="content" then content=BinaryToString(Field.value)

 


next

 
			dim rsgonggaosql
			dim rsgonggao
			
			dim filename
			
			
			dim strdateandtime
			if  dateandtime<>"" then
			   strdate=cdate(dateandtime)
			else  
			   strNow=now()
			 end if

			
			'从存储过程取得gonggaoid
			dim fid 
			Set cmd = server.CreateObject("ADODB.Command")
			set Cmd.ActiveConnection = conn
			with Cmd
			   .CommandText = "incid"
			   .CommandType = 4
			   .parameters.Refresh
			   .parameters("@name") ="gonggaoid"
			   .execute
			   fid = .parameters("@id")
			end with

              ''分开部门字段
              dim mysendto
		      mysendto=split(sendto,"|")


			
			set rsgonggao=server.createobject("adodb.recordset")
			rsgonggaosql="select * from gonggao where (id is null)" 
			
			rsgonggao.open rsgonggaosql,conn,1,3
			rsgonggao.addnew
			
			rsgonggao("id")=fid
			rsgonggao("ftype")=ftype
			rsgonggao("sendto")=mysendto(1)
			rsgonggao("title")=title
			rsgonggao("author")=author
			rsgonggao("fdate")=dateandtime
			rsgonggao("content")=content
			rsgonggao("updateandtime")=strdate
			rsgonggao("hits")="0"
			rsgonggao("updatetime")=now()
			rsgonggao("upname")=request.cookies("tname")
			strip=Request.ServerVariables("REMOTE_ADDR")
			rsgonggao("upip")=strip
			rsgonggao.update
			
	
			
		 
			rsgonggao.close
			





rssended.close
 






			%>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div align="center">



  <table border="1" cellspacing="0" width="700" bordercolorlight="#11B1FF" bordercolordark="#F0F8FF">
    <tr>
      <td width="100%" height="32">
      <p align="center" class="STYLE1 STYLE2">发布成功</td>
    </tr>
    <tr>
      <td width="100%">
        <p align="center"><br>
          <span class="STYLE1 STYLE2">
          <%response.write title%>
          </span> <span class="STYLE3">已经成功发布！请继续添加校园活动剪影的相片……</span></p>
        <p align="left"><span class="STYLE1 STYLE2"><br>
          <br>
        
          
    <center>
    <form name="form1" method="post" action="">
      <label>
	
        <div align="center" class="STYLE1">
		
		
		  
		   <input name="button" type="button" class="topanniu" onClick="location='picture.asp?id=<%=fid%>'"  value="添加剪影图片" />
        
		 
</div>
      </label>
      <div align="center"></div>
    </form>
    <p align="center"><br>
    <br>
    </p>      </td>
    </tr>
  </table>
</div>
 
 <%
 end if
 %>
</body>  
  
</html>  



