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

📄 admin_upfilemanage.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<!--#include file="ChkManage.asp" -->
<%
if request.cookies(Forcast_SN)("ManageKEY")<>"super" or request.cookies(Forcast_SN)("ManagePurview")<>"99999" then
	Show_Err("对不起,您的后台管理权限不够!")
	response.end
else
	if system="1" or request.cookies(Forcast_SN)("ManagePurview")="99999" then

	Response.Buffer=False
		If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
			MyPage=1
		Else
			MyPage=Int(Abs(Request("page")))
		End if
		
		if Request.form("Check_Save")="ok" then
			response.cookies(Forcast_SN)("C_Attach")=Request.form("Check_Attach")
			response.cookies(Forcast_SN)("C_News")=Request.form("Check_News")
			response.cookies(Forcast_SN)("C_UserFace")=Request.form("Check_UserFace")
		end if

		Check_Attach=Request.cookies(Forcast_SN)("C_Attach")
		Check_News=Request.cookies(Forcast_SN)("C_News")
		Check_UserFace=Request.cookies(Forcast_SN)("C_UserFace")

		Function Get_Attribute(int_AttribCode,str_ListSeparator)
		  '--- 传入参数 ---
		  'int_AttribCode:属性代码参数-整型
		  'str_ListSeparator:分隔符号-字符型
		  'Get_Attribute=""
		  'int_AttribCode1=int_AttribCode
		  '"0 普通文件|128 压缩文件|64 链接或快捷方式|32 存档文件|16 目录|8 磁盘驱动器卷标|4 系统文件|2 隐藏文件|1 只读文件", "|", -1, 1)

		  str_AttribType = Split("普通文件|压缩文件|链接或快捷方式|存档文件|目录|磁盘驱动器卷标|系统文件|隐藏文件|只读文件", "|", -1, 1)
		  int_AttribCode=CInt(int_AttribCode)

		  if int_AttribCode=0 or int_AttribCode>256 then
				Get_Attribute=str_AttribType(0)
			Else
			  int_Gene=128
			  ii=1
			  do until int_Gene<1
			  	if int_AttribCode-int_Gene>=0 then
						if int_Gene/2<1 or int_AttribCode-int_Gene=0 then
							str_ListSeparator=""
						end if
						Get_Attribute=Get_Attribute & str_AttribType(ii) & str_ListSeparator
			  		int_AttribCode=int_AttribCode-int_Gene
			  	end if
		  		int_Gene=int_Gene/2
		  		ii=ii+1
				loop			  
			end if
			'Get_Attribute=int_AttribCode & Get_Attribute
		End function

		'FileUploadPath	'实际图片目录
		ThisNameFile="Admin_UpFileManage.asp"   '定义本文件的文件名
		urlpath="http://"&Request.ServerVariables("SERVER_NAME")
		
		dim cpath,lpath,r_path,l_path
		r_path=Request("path")
		l_path=left(Request.ServerVariables("PATH_INFO"),instrrev(Request.ServerVariables("PATH_INFO"),"/"))&FileUploadPath

		set fsoBrowse=CreateObject("Scripting.FileSystemObject")
	
		if InStr(1,r_path, l_path,1)<>1 then
			r_path=""
		end if

		'检查路径中是否含有“.”,防止以“..”方式返回上级目录信息。 
		if InStr(1,r_path, ".",1)>0 or InStr(1,r_path, "%2e",1)>0 or InStr(1,r_path, "%2E",1)>0 then
			r_path=""
			response.write "<script language=javascript>alert('警告!路径中含有非法字符。');</script>"
		end if
		
		if r_path="" then
			lpath=l_path
		else
			if right(r_path,1)<>"/" then  '在目录后加(/)
				lpath=r_path&"/"
			else
				lpath=r_path
			end if
		end if
		if Request("attrib")="true" then
			cpath=lpath
			attrib="true"
		else
			cpath=Server.MapPath(lpath)
			attrib=""
 			if request.form("pathfile")<>"" then
				for i = 1 to request.form("pathfile").count
					pathfile=request.form("pathfile")(i)
					whichfile=Server.MapPath(pathfile)
				  Set fs = CreateObject("Scripting.FileSystemObject")
				  Set thisfile = fs.GetFile(whichfile)
				  thisfile.delete true
				next
				Response.redirect ThisNameFile &"?path="& r_path &"&page="& MyPage
		  end if
		end if
		%>
<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="site.css">
<title><%=copyright%><%=version%>&nbsp;<%=ver%> - 文件管理&#23436;&#32654;&#35774;&#35745;&#32593;&#32476;&#31185;&#25216;&#26377;&#38480;&#20844;&#21496;&#32;&#23436;&#32654;&#25919;&#24220;&#32593;&#31449;&#31649;&#29702;&#31995;&#32479;&#32;&#104;&#116;&#116;&#112;&#58;&#47;&#47;&#119;&#119;&#119;&#46;&#119;&#109;&#103;&#111;&#118;&#46;&#99;&#110;</title>
<script>
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<script language="JavaScript">
<!--
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
//-->
</script>
</head>
<style type=text/css>
body  { background:#555555; margin:0px; font-family: Verdana, Arial, sans-serif, 宋体; font-size: 9pt; text-decoration: none; color:#555555;
SCROLLBAR-FACE-COLOR: #55919A;
SCROLLBAR-HIGHLIGHT-COLOR: #cccccc;
SCROLLBAR-SHADOW-COLOR: #cccccc;
SCROLLBAR-3DLIGHT-COLOR: #cccccc;
SCROLLBAR-ARROW-COLOR: #555555;
SCROLLBAR-TRACK-COLOR: #555555;
SCROLLBAR-DARKSHADOW-COLOR: #cccccc;}
table  { border:0px; }
td  { font:normal 12px; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px; color:#555555; text-decoration:none; }
a:hover  { color:#ff6600;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#eeeeee; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#555555; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#ff6600; font-weight:bold; }
</style>
<body topmargin="0" oncontextmenu="self.event.returnValue=false">
<!--#include file=Admin_Top.asp-->
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<form action='Admin_UpFileManage.asp' method=post name=check>
<tr class="TDtop">
	<td height="25" colspan="5" align="center" valign="middle" >┊ <B>所 有 文 件 列 表 <font color=red >/ 慎 重 操 作 /</font></B> ┊ </td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<tr>
	<td width='30%' align='center' height=20 bgcolor='#eeeeee'>文件名</td>
	<td width='30%' align='center' bgcolor='#eeeeee'>引用验证</td>
	<td width='15%' align='center' bgcolor='#eeeeee'>文件大小</td>
	<td width='15%' align='center' bgcolor='#eeeeee'>文件属性</td>
	<td width='10%' align='center' bgcolor='#eeeeee'>功能</td>
</tr>
</table>
		<%
		dim theFolder
		dim theFiles
		dim theSubFolders
		dim contain
		dim cont_search
		dim rs
		contain=""
		cont_search=0
		
		if fsoBrowse.FolderExists(cpath) then
			Set theFolder=fsoBrowse.GetFolder(cpath)
			Set theFiles=theFolder.files
			Set theSubFolders=theFolder.SubFolders

			PageShowSize		= 10		'每页显示多少个页链接
			MyPageSize			= 15		'每页显示多少个文件
			total						= theFiles.count
			MaxPages				= int((total-1)/MyPageSize)+1

			i = 1

⌨️ 快捷键说明

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