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

数据库编程

开发平台:

ASP/ASPX

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