
<!--#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">
<link rel="stylesheet" href="css/css.css">
<title>保存文件</title>


<link rel="stylesheet" href="../css/style.css">
</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="fid" then fid=BinaryToString(Field.value)

if Field.name="file1" then
filename=field.FileName

fileContentType=field.ContentType
filevalue=field.value
flength=field.Length/1024/1024
end if
next

'系统提示文件大小超出范围
if flength>CINT(request.cookies("filelength"))  then
 %>  
<div align="center" class="STYLE1 STYLE3" title="提示信息框">
                <span style="BACKGROUND:#EEEEFF;COLOR:#FF6633;margin: 10px;border:1px dotted #FF6633;
				 font-weight:bold;padding:18px;width=540">
                附件 <%=FormatNumber(flength,2)%>M 太大，系统设定不能上传大于<%=request.cookies("filelength")%>M的文件。</span>                 </div>
<%   
else




sql="select * from zuoyeshangjiaoFile where (id is null)"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
rs.addnew 

rs("fid")=fid
rs("统一编号")=request.cookies("tongyibianhao")
rs("filename")=filename
rs("fileContentType")=fileContentType
rs("filevalue").appendchunk filevalue
rs("FileLength")= flength
rs.update 
rs.close 

 
  if btn="admin" then
       response.redirect   "viewyingjiao.asp?years="&years&"&ftype="&ftype&"&btn=admin" 
   else
      response.redirect   "yingjiao.asp?years="&years 
   end if
%>

 
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div align="center">
  <table border="1" cellspacing="0" width="283" bordercolorlight="#11B1FF" bordercolordark="#F0F8FF">
    <tr>
      <td width="100%" height="20" class="STYLE1">
      <p align="center" class="STYLE1 STYLE2">添加成功</td>
    </tr>
    <tr>
      <td width="100%" class="STYLE1">
        <p align="left"><br>
          <br>
        附件为：
        <%response.write filename%></p>
    <center>
    <form name="form1" method="post" action="">
      <label>
        <div align="center">
          <input name="button" type="button" class="topanniu" onClick="location='addfile.asp?years=<%=Years%>&Ftype=<%=Ftype%>'"  value="继续" />
          &nbsp;&nbsp;&nbsp;&nbsp;
		  
		   <input name="button" type="button" class="topanniu" onClick="location='filelist.asp?years=<%=Years%>&Ftype=<%=Ftype%>'"  value="返回" />
        </div>
      </label>
      <div align="center"></div>
    </form>
    <p align="center"><br>
    <br>
    </p>
      </td>
    </tr>
  </table>
</div>
 <%end if
   end if 
 %>

</body>  
  
</html>  


