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

📄 upload.asp

📁 BS在线文件管理系统的源码和说明
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="function.asp"-->
<!--#include file="driver.asp"-->
<%
'--------------------------------------------
    if session("adminlogin") = "" then
	response.redirect("login.asp")
    end if
'--------------------------------------------
'----------------过滤字符
 questDir=lcase(trim(request("dir")))
 questDir=Replace(replace(replace(questDir,"\\","\"),"\\","\"),"\\","\")
'------------------检查权限是否正确--------------------------------
 if not session("admin") then
    '-------此处检查权限
    myPath = Split(session("dir"), "|")
    For each subDir in myPath
	If InStr(1, lcase(questDir), lcase(subDir), vbTextCompare) = 1 then
	    flag = true
	end if
    Next
    If flag = false then
	response.write("<script language=javascript>")
	response.write("alert(""你没有权限访问该目录!"");")
	response.write("</script>")
	response.write("<body bgcolor=#CCCCCC onLoad='setTimeout(window.close, 0)'>")
	response.end
    end if
 end if
'----------------检测是否是有效路径
 if not CheckCorrectPath(questDir) then
	response.write("<script language=javascript>")
	response.write("alert(""请求为非有效目录或包含非法字符!"");")
	response.write("</script>")
	response.write("<body bgcolor=#CCCCCC onLoad='setTimeout(window.close, 0)'>")
	response.end
 end if
%>
<html>
<head>
<title>文件上传--<%=name%>--[by BrightStar]</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Meta Name="description" Content="BS在线文件管理系统">
<Meta Name="Keywords" Content="BS在线文件管理系统">
<meta http-equiv="pragma" content="no-cache">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="758" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td style="border: 1 solid #000000" width="57" align="center"><a href="logout.asp?logout=1">退出管理</a></td>
    <td width="28" align="center">&nbsp;</td>
    <td width="57" align="center" style="border: 1 solid #000000"><a href="index.asp">文件管理</a></td>
    <td align="center"><b><font size="4">[<%=name%>]</font></b><font color="#ccaacc">-version:<%=version%></font>&nbsp;&nbsp;&nbsp;&nbsp;</td>
  </tr>
</table>
<br>
  <table width="758" cellspacing="0" cellpadding="5" align="center" style="border: 1 solid #000000">
    <form name="form1" method="post" action="upfile.asp" enctype="multipart/form-data" >
    <tr bgcolor="#CCCCCC"> 
      <td height="22" align="left" valign="middle" bgcolor="#CCCCCC" style="border-bottom: 1 solid #000000">&nbsp;文件上传</td>
    </tr>
    <tr align="left" valign="middle" bgcolor="#eeeeee"> 
      <td bgcolor="#eeeeee" height="92" style="border-bottom: 1 solid #000000">
	<input type="hidden" name="act" value="upload">
        <script language="javascript">
	  function setid()
	  {
	  str='<br>';
	  if(!window.form1.upcount.value)
	   window.form1.upcount.value=1;
 	  for(i=1;i<=window.form1.upcount.value;i++)
	     str+='文件'+i+':<input type="file" name="file'+i+'" style="width:400"><br><br>';
	  window.upid.innerHTML=str;
	  }
	  </script>
        <li> 需要上传的个数 
          <input type="text" name="upcount" value="1">
          <input type="button" name="Button" onclick="setid();" class="button" value="· 设定 ·">
        </li>
        <br><br>
        <li>上传到: 
          <input type="text" name="filepath" style="width:350" value="<%=questDir%>">
        </li>
      </td>
    </tr>
    <tr align="center"> 
      <td align="left" valign="middle" id="upid" height="60"> 文件1: 
        <input type="file" name="file1" style="width:400" value=""><br>
      </td>
    </tr>
    <tr align="center" valign="middle" bgcolor="#eeeeee"> 
      <td bgcolor="#eeeeee" height="24" style="border-top: 1 solid #000000"> 
        <input type="submit" name="Submit" class="button" value="· 提交 ·">
        <input type="reset" name="Submit2" class="button" value="· 重置 ·">
      </td>
    </tr></form>
  </table>
<br>
<center><%=copyright%></center>
</body>
</html>
<script language="javascript">
setid();
</script>
</body>
</html>

⌨️ 快捷键说明

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