⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upload.asp

📁 我改写的一个asp上载文件的组件程序
💻 ASP
字号:
<html>
<head>
<meta name="Author" content="Sander Duivestein">
<LINK href="../style.css" rel=stylesheet>
</head>

<body>
<!-- #include file="conn.asp" -->
<%
  dim dtype
  dtype=request("dtype")
  if dtype ="" then
    dtype ="0"
  end if
  dim sqlstr,ftype, rs
  set rs =conn.Execute("select * from d_type where father_id =" & dtype)
  if not rs.EOF then
%>
  <p>你可选择的子目录是:
 <%
  do while not rs.EOF
  response.write "<BR><a href=upload.asp?dtype="& rs("dtype") &">"&rs("type_name")&"</a><BR>" 
  rs.movenext
  loop  
  rs.close
end if
'如果不是根目录,则显示上载表单
'if dtype <> "0" then
  sqlstr ="select * from d_type where dtype =" & dtype
  set rs =conn.Execute(sqlstr)
  'response.write sqlstr
%>


<form name="frmUpload" Method="POST" Enctype="multipart/form-data" Action="do_upload.asp">
  <p>&nbsp;</p>
<%
  if not rs.EOF then
%>

  当前上载目录为:<% response.write "》"& replace(rs("urls"), "download", "upload") &"》" & rs("type_name")%>
<%
  end if
  rs.close
%>
 <input type=hidden name=dtype value=<%=dtype%>> 
 </p>
  <table width="48%" border="1" height="234" background="images/bg_one.gif" align="center">
    <tr> 
      <td width="32%">请选择文件 </td>
      <td width="68%"> 
        <input type="file" name="file_name">
      </td>
    </tr>
    <tr> 
      <td width="32%"> 姓名 </td>
      <td width="68%"> 
        <input type="text" name="username">
      </td>
    </tr>
    <tr> 
      <td width="32%">版本号</td>
      <td width="68%"> 
        <input type="text" name="version" value="2001">       
      </td>
    </tr>
    <tr> 
      <td width="32%">文件状态: </td>
      <td width="68%"> 
        <select name="ifinsert" size="1">
          <option select=1 value=0>新增</option>
          <option value=1>修改</option>
        </select>
      </td>
    </tr>
    <tr> 
      <td width="32%">文件说明</td>
      <td width="68%"> 
        <textarea name="file_info"></textarea>
      </td>
    </tr>
    <tr> 
      <td colspan="2" align="center">
        <input type="Submit" value="上载" name="Submit">
      </td>
    </tr>
  </table>
  <p>&nbsp;</p>
<%
 'end if
 conn.close
%>
</form>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -