UpFileForm.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:6k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <!--#include file="../../FS_Inc/Const.asp" -->
  2. <!--#include file="../../FS_Inc/Function.asp"-->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../lib/strlib.asp" -->
  5. <!--#include file="../lib/UserCheck.asp" -->
  6. <%
  7. Response.Buffer = True
  8. Response.Expires = -1
  9. Response.ExpiresAbsolute = Now() - 1
  10. Response.Expires = 0
  11. Response.CacheControl = "no-cache"
  12. Dim TypeSql,RsTypeObj,LableSql,RsLableObj
  13. if instr(Request("Path"),Fs_User.UserNumber)=0 then:response.Write("警告:不要浏览别人的文件目录!"):response.end:end if
  14. %>
  15. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  16. <html>
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  19. <title>上传文件</title>
  20. </head>
  21. <link href="../../<% = G_USER_DIR %>/images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  22. <body onselectstart="return false;" topmargin="0" leftmargin="0">
  23. <form name="FileForm" method="post" enctype="multipart/form-data" action="UpFileSave.asp">
  24.  <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
  25.     <tr> 
  26.       <td height="26" align="center" width="33%">请输入上传文件个数:</td>
  27.       
  28.     <td width="33%"> 
  29.       <input name="FilesNum" type="text" value="4" size="10"> 
  30.       <input type="button" name="Submit42" value="设定" onClick="ChooseOption();"></td>
  31.     <td width="33%"> 
  32.       <input name="chkAddWaterMark" type="checkbox" id="chkAddWaterMark" style="display:none;" value="1" checked>
  33.       添加水印</td>
  34.     </tr>
  35. </table>
  36. <div align="center">
  37.   <table width="98%" border="0" cellspacing="0" cellpadding="0">
  38.       <tr> 
  39.         <td> <div align="center"> 
  40.             <table width="90%" border="0" cellspacing="0" cellpadding="0">
  41.               <tr> 
  42.                 <td height="30" id="FilesList"> 
  43. </td>
  44.               </tr>
  45.             </table>
  46.             </div>
  47. </td>
  48.         <td width="30%" valign="top"><br> <fieldset style="width:100%;">
  49.           <table width="100%" border="0" cellspacing="0" cellpadding="0">
  50.             <tr> 
  51.               <td height="20" > 
  52.                 <div align="center">自动命名</div></td>
  53.             </tr>
  54.             <tr> 
  55.               <td height="20"> 
  56.                 <div align="left"> 
  57.                   <input name="AutoReName" type="radio" value="0" checked>
  58.                   不自动命名</div></td>
  59.             </tr>
  60. <tr> 
  61.               <td height="20"> 
  62.                 <div align="left"> 
  63.                   <input type="radio" name="AutoReName" value="1">
  64.                   &quot; 副件&quot;+文件名</div></td>
  65.             </tr>
  66.             <tr> 
  67.               <td height="20"> 
  68.                 <div align="left"> 
  69.                   <input type="radio" name="AutoReName" value="2">
  70.                   &quot; 1&quot;+文件名</div></td>
  71.             </tr>
  72.             <tr> 
  73.               <td height="20"> 
  74.                 <div align="left"> 
  75.                   <input name="AutoReName" type="radio" value="3">
  76.                   20041101122333</div></td>
  77.             </tr>
  78.           </table>
  79.           </fieldset></td>
  80.       </tr>
  81.       <tr> 
  82.         <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  83.             <tr> 
  84.               <td> <div align="center"> 
  85.                   <input type="submit" id="BtnSubmit" onClick="PromptInfo();" name="Submit" value=" 确 定 ">
  86.                   <input name="Path" value="<% = Request("Path") %>" type="hidden" id="Path">
  87.                 </div></td>
  88.               <td><div align="center"> 
  89.                   <input type="reset" id="ResetForm" name="Submit3" value=" 重 填 ">
  90.                 </div></td>
  91.               <td><div align="center"> 
  92.                   <input onClick="dialogArguments.location.reload();top.close();" type="button" name="Submit2" value=" 关 闭 ">
  93.                 </div></td>
  94.             </tr>
  95.           </table></td>
  96.       </tr>
  97.   </table>
  98. </div>
  99. </form>
  100. <div id="LayerPrompt" style="position:absolute; z-index:1; left: 112px; top: 28px; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000; width: 254px; height: 63px; visibility: hidden;"> 
  101.   <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  102.     <tr> 
  103.       <td><div align="right">请稍等,正在上传文件</div></td>
  104.   <td width="35%"><div align="left"><font id="ShowInfoArea" size="+1"></font></div></td>
  105.     </tr>
  106.   </table>
  107. </div>
  108. </body>
  109. </html>
  110. <%
  111. Set Conn = Nothing
  112. %>
  113. <script language="JavaScript">
  114. var ForwardShow=true;
  115. function ShowPromptInfo()
  116. {
  117. var TempStr=ShowInfoArea.innerText;
  118. if (ForwardShow==true)
  119. {
  120. if (TempStr.length>4) ForwardShow=false;
  121. ShowInfoArea.innerText=TempStr+'.';
  122. }
  123. else
  124. {
  125. if (TempStr.length==1) ForwardShow=true;
  126. ShowInfoArea.innerText=TempStr.substr(0,TempStr.length-1);
  127. }
  128. }
  129. function PromptInfo()
  130. {
  131. var FilesNum = document.all.FilesNum.value;
  132. var obj;
  133. if(FilesNum=='')
  134. FilesNum=4;
  135. for(var i=1;i<=FilesNum;i++){
  136.    obj = eval("document.FileForm.File" + i);
  137.    obj.readOnly = true;
  138. }
  139. //document.FileForm.BtnSubmit.readOnly=true;
  140. document.FileForm.ResetForm.disabled=true;
  141. LayerPrompt.style.visibility='visible';
  142. window.setInterval('ShowPromptInfo()',600)
  143. return true;
  144. }
  145. function ChooseOption()
  146.  {
  147.   var FilesNum = document.all.FilesNum.value;
  148.   if (FilesNum=='')
  149.    FilesNum=4;
  150.   var i,Optionstr;
  151.   Optionstr = '<table width="100%" border="0" cellspacing="5" cellpadding="0">';
  152.   for (i=1;i<=FilesNum;i++)
  153.       {
  154.    Optionstr = Optionstr+'<tr><td>&nbsp;文&nbsp;件&nbsp;'+i+'</td><td>&nbsp;<input type="file" accept="html" size="20" name="File'+i+'">&nbsp;</td></tr>';
  155.    }
  156. Optionstr = Optionstr+'</table>';  
  157.     document.all.FilesList.innerHTML = Optionstr;
  158.   }
  159. ChooseOption();
  160. </script>