📄 admin_fileinfo2.asp
字号:
<!--#include file="inc/chkAdmin.asp"-->
<!--#include file="inc/include.asp"-->
<%
'************** ASPSecurity 文件信息提取*************
' Copyright 2006
' Create:2006-1-19
' Update:2006-7-22
'****************************************************
server.ScriptTimeout = 600
Dim Report
if request.Form("filepath")="\" then
TmpPath = Server.MapPath("\")
elseif request.Form("filepath")="." then
TmpPath = Server.MapPath(".")
else
TmpPath = Server.MapPath("\")&"\"&request.Form("filepath")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" rev="stylesheet" href="inc/control.css" type="text/css" media="all" />
</head>
<body class="ContentBody">
<div class="MainDiv">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle">雷客图ASP站长安全助手 提取文件信息
</tr>
<tr>
<td class="CPanel">
<div id="updateInfo" style="background:ffffe1;border:1px solid #89441f;padding:4px;display:none"></div>
<form name="form1" method="post" action="admin_fileinfo2.asp">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="padding:5px;width:140px"><img src="images/Icon/ControlPanel.png" width="128" height="128"/></td>
<td valign="top">
<div align="left" style="padding:5px;line-height:170%;clear:both;font-size:12px">
<%
If request.Form("filepath") = "" or request.Form("FileExt") = "" Then
response.Write("条件不完全,恕难从命<br><br><a href='javascript:history.go(-1);'>请返回重新输入</a>")
response.End()
End If
DimFileExt = request.Form("fileExt")
Report = "@本文件由“雷客图ASP站长安全助手”生成;请妥善保存,以备后用"&vbcrlf&"@"&Now&vbcrlf&"@FileType:"&DimFileExt&vbcrlf
Report = Report&"<" & TmpPath & ">"
Call ShowAllFile(TmpPath)
DownFile(Report)
%>
<p>
</p>
</div></td>
</tr>
</table>
</form>
</td></tr>
</table>
</div>
</body>
</html>
<%
Sub ShowAllFile(Path)
Set FSO = CreateObject("Scripting.FileSystemObject")
if not fso.FolderExists(path) then exit sub
Set f = FSO.GetFolder(Path)
Set fc2 = f.files
For Each myfile in fc2
If CheckExt(FSO.GetExtensionName(path&"\"&myfile.name)) Then
Report = Report&myfile.name&"*"&myfile.Size&"*"&myfile.DateLastModified&"|"
End If
Next
Set fc = f.SubFolders
For Each f1 in fc
Report = Report&vbcrlf&"<"&path&"\"&f1.name&">"
ShowAllFile path&"\"&f1.name
Next
Set FSO = Nothing
End Sub
Sub DownFile(Str)
Response.Clear()
Response.AddHeader "Content-Disposition", "attachment; filename="& Replace(Replace(Replace(Replace(now,"/",""),":",""),"-","")," ","") &".txt"
Response.ContentType="application/ms-download"
Response.Write(Str)
Response.End()
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -