📄 listfile.asp
字号:
<!-- #include file="inc/conn.asp" -->
<!-- #include file="inc/config.asp" -->
<!-- #include file="inc/function.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- #include file="inc/head.html" -->
<style type="text/css" media="screen"><!--
.upload-frame { text-align: center; width: 140px; height: 120px; float: left; margin-top: 10px; margin-right: 10px; padding-top: 4px; }
.upload-text { color: #666; font-size: 11px; }
.upload-text a:link { color: #666; }
.upload-text a:hover { color: #ccc; }
--></style>
<title>Simpl2涂乌板2文件上传管理</title>
<%
If Session("manager")=Empty Then
Response.Redirect "message.asp?action=rewrite&message=非法登陆,禁止访问"
End If
Dim objFSO,objFolder,objFile,FolderName,action
FolderName=SafeRequest("FolderName")
action=SafeRequest("action")
FileName=SafeRequest("FileName")
Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
If action="deletefile" Then
objFSO.DeleteFile Server.MapPath("./"&FileName),True
Response.Redirect "ListFile.asp?FolderName="&FolderName
End If
Set objFolder=objFSO.GetFolder(Server.MapPath("./"&FolderName))
%>
<body>
<div id="body" align="center">
<div id="block-body">
<div id="block">
<div class="title">
</div>
<div class="frame-top"></div>
<div class="frame-body">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="frame-left"></td>
<td class="name">
<div class="name-image">
</div>
<span class="name-text">
</span>
</td>
<td class="frame-main">
<div class="note">
<div class="note-text">
文件夹位置:<% =FolderName %>
<br>
<% For Each objFile in objFolder.Files %>
<div class="upload-frame">
<a href="<% =FolderName %>/<% =objFile.Name %>" target="_blank">
<img src="<% =FolderName %>/<% =objFile.Name %>" alt="" border="0" width="70">
</a>
<br>
<span class="upload-text">
<% =objFile.Name %>
</span>
<br>
<span class="upload-text">
<% =Int(objFile.Size/1024) %>KB <a href="ListFile.asp?action=deletefile&FileName=<% =FolderName %>/<% =objFile.Name %>&FolderName=<% =FolderName %>" onClick="return confirm('您确定进行删除操作吗?')">删除</a>
</span>
</div>
<% Next %>
</div>
</div>
</td>
<td class="frame-right"></td>
</tr>
</table>
</div>
<div class="frame-bottom"></div>
</div>
</div>
</div>
</body>
</html>
<%
Set objFolder=Nothing
Set objFSO=Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -