当前位置: 网学 > 编程文档 > ASP > 正文

asp+fso在线管理图片功能 原创

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17

文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学的各位小编整理了ASP-asp+fso在线管理图片功能 原创的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!

复制代码 代码如下:
<%
''---------------------------------------------
''##############20060528新增加了对端口的支持
''作者:dxy QQ:461478385 Email:douxy001@gmail.com
''功能完善
%>
<!--#include file="global.asp"-->
<!--#include file="session.asp"-->
<%
Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
if request.form("action")="delall" then
Num=request.form("delFileName").count
for x=1 to Num
thedelall=Server.Mappath("../upload/"&request.form("delFileName")(x))
if myfile.fileexists(thedelall) then
myfile.deletefile(thedelall)
end if
next
end if
page=cint(request.querystring("page"))
if Page<=1 or Page="" then Page=1
PageSize=25
Domain=Request.ServerVariables("SERVER_NAME")
gFilePath=Request.ServerVariables("PATH_INFO")
serverport=request.ServerVariables("SERVER_PORT")
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
CountN=len(gFilePath)
gFilePath=lcase(left(gFilePath,CountN-1))
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
if serverport<>"80" then
AllPath="http://"&Domain&":"&serverport&gfilepath
else
AllPath="http://"&Domain&gfilepath
end if
filepath="../upload/"
dim fso
set fso=server.CreateObject("scripting.filesystemobject")
set thefolder=fso.getfolder(server.MapPath(filepath))
for each ffiles in thefolder.files
filecounts=filecounts+1
filesizes=filesizes+ffiles.size
if filesizes=0 then
response.write "此文件夹下没有内容"
response.end
end if
next

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>dxy文件管理器</title>
<link href="main.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function CheckAll()
{
for (var ic=0;ic<form1.delfilename.length;ic++)
{
var e = form1.delfilename[ic];
e.checked = !e.checked;
}
}
</script>
</head>

<body style="margin:0px;">
<table width="760" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#1F429E">
<form action="" method="post" name="form1"><tr>
<td width="40" height="25" bgcolor="#FFFFFF"><div align="center">序号</div></td>
<td width="493" height="25" bgcolor="#FFFFFF"><div align="center">文件名</div></td>
<td width="100" bgcolor="#FFFFFF"><div align="center">文件大小</div></td>
<td width="98" bgcolor="#FFFFFF"><div align="center">选择</div></td>
</tr>
<%
i=0
for each ffiles in thefolder.files
i=i+1
if ccount>=pagesize then
exit for
elseif i>pagesize*(page-1) then
ccount=ccount+1
%>
<tr>
<td height="25" nowrap="nowrap" bgcolor="#FFFFFF" align="center"><%=i%></td&
  • 下一篇资讯: ASPJPEG学习手记
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号