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

数据库编程

开发平台:

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