• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >ASP > web文件管理器的后续开发

web文件管理器的后续开发

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了web文件管理器,web在线文件管理器,基于web的文件管理器,安卓文件管理器开发,文件管理器等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
web文件管理器的后续开发。。。     选择自 iuhxq 的 Blog  
关键字   web文件管理器的后续开发。。。 
出处    

 今天看了一下ccopus的DM45,做的很不错,在这之前我也想做一个了,做一个跟windows资源管理器非常类似的程序。看到dm45以后觉得自己还是放弃吧,WEB方式的文件管理无论如何都是在权限允许内操作,而且大家实现的也都差不多,无非是在外观上,易操作上做文章,文件管理本来作用也不是很大,如果是多用户的权限比较难控制,既然别人做了,我想还是不要重复劳动的好,况且也不见得能做的好。下面的代码贴出来留个纪念,实现了文件的本地排序。但目录之间的层次还没有搞好。有兴趣的可以拿去参考,理论上应该可以实现跟windows资源管理器极类似的界面和操作方式。整个界面都采取无刷新方式。用XMLHTTP来执行后台代码,用JS来修改前台显示。这里体现了一种思想,希望对初学者能有个帮助。
代码如下:
<title>WEB文件管理器2.0版 http://asp2004.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a {
 font-size: 9pt;
 color: #3300CC;
 text-decoration: none;
}
body {
 font-size: 9pt;
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 line-height: 20px;
 background-color: #EEEEEE;
}
td {
 font-size: 9pt;
 line-height: 20px;
}
.tx {
 border-color:#000000;
 border-left-width: 0px;
 border-top-width: 0px;
 border-right-width: 0px;
 border-bottom-width: 1px;
 font-size: 9pt;
 background-color: #EEEEEE;
}
.tx1 {
 font-size: 9pt;
 border: 1px solid;
 border-color:#000000;
 color: #000000;
}
-->
</style>
<%

'版权声明:本代码仅供学习研究之用,本人不对因使用本程序而造成的任何后果负责。未经作者书面许可不得用于商业用途。
'QQ:103895
'email:quxiaohui_0@163.com
'http://asp2004.net

Server.ScriptTimeout = 999
action = Request("action")
temp = Split(Request.ServerVariables("URL"), "/")
url = temp(UBound(temp))

Const pass = ""'登陆密码

'登陆验证

Set fso = CreateObject("Scripting.FileSystemObject")
        Path = Request("foldername")
        If Path = "" Then Path = server.MapPath("./")
        ShowFolderList(Path)
Set fso = Nothing

'列出文件和文件夹

Function ShowFolderList(folderspec)
    temp = Request.ServerVariables("HTTP_REFERER")
    temp = Left(temp, Instrrev(temp, "/"))
    temp1 = Len(folderspec) - Len(server.MapPath("./")) -1
    If temp1>0 Then
        temp1 = Right(folderspec, CInt(temp1)) + "\"
    ElseIf temp1 = -1 Then
        temp1 = ""
    End If
    tempurl = temp + Replace(temp1, "\", "/")
    uppath = "./" + Replace(temp1, "\", "/")
    upfolderspec = fso.GetParentFolderName(folderspec&"\")
    Set f = fso.GetFolder(folderspec)
%>
<script language="javascript">
function File(Name, Size, Type, DateCreated, DateLastAccessed, DateLastModified, Attributes)
{
 this.Name = Name;
 this.Size = Size;
 this.Type = Type;
 this.DateCreated = DateCreated;
 this.DateLastAccessed = DateLastAccessed;
 this.DateLastModified = DateLastModified;
 this.Attributes = Attributes;
}

function Tree(id, name)
{
 this.id = id;
 this.name = name;
 this.root = new Array();
 this.length = 0;

 this.Add = function(file)
 {
  this.root.push(file);
  this.length += 1;
 }
 this.max = function(f1, f2, field)
 {
  switch( field )
  {
   case "Name":
    return f1.Name.toLowerCase()>f2.Name.toLowerCase()? true:false;
   case "Size":
    return f1.Size>f2.Size? true:false;
   case "Type":
    //if (field == '???t?D') return false;
    return f1.Type>f2.Type? true:false;
   case "DateCreated":
    return f1.DateCreated>f2.DateCreated? true:false;
   case "DateLastAccessed":
    return f1.DateLastAccessed>f2.DateLastAccessed? true:false;
   case "DateLastModified":
    return f1.DateLastModified>f2.DateLastModified? true:false;
   case "Attributes":
    return f1.Attributes>f2.Attributes? true:false;
   default:
    return false;
  }
 }
 this.sort=function(field, order)
 {
 //order:desc asc
 //field:Name Size
  var len = this.root.length;
  if( len < 2 ) return;
  var tmp;
  for(var i=0; i<len-1; i++)
  {
   for(var j=i+1; j<len; j++)
   {
    if( order == "desc")
    {
     if( !this.max( this.root[i], this.root[j], field ) )
     {
      tmp = this.root[i];
      this.root[i] = this.root[j];
      this.root[j] = tmp;
     }
    }
    else if ( order == "asc")
    {
     if( this.max( this.root[i], this.root[j], field ) )
     {
      tmp = this.root[i];
      this.root[i] = this.root[j];
      this.root[j] = tmp;
     }
    }
   }
  }
 }
}
function fieldcode(field)
{
 if (order == 'desc')
 {
  order = 'asc';
 }
 else
 {
  order = 'desc';
 
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • web文件管理器的后续开发

相关文章

  • 2017-05-11javascript asp教程第五课--合二为一
  • 2017-05-11写入文本文件的过程函数(ASP)
  • 2017-05-11用xmlhttp编写web采集程序
  • 2017-05-11ASP如何获取真实IP地址
  • 2017-05-11[asp]怎么添加验证码的解决方法
  • 2017-05-11ASP开发中数据库文件调用的捷径
  • 2017-05-11替换数据库内容
  • 2017-05-11ASP使用MYSQL数据库全攻略
  • 2017-05-11asp短信接口源码 比较简单但也挺实用用的(两个写法)
  • 2017-05-11asp向数据库插入数据的方法rs

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • ASP对网页进行保护的简单代码 ip
    • js+asp总结
    • asp查询xml的代码 不刷新页面查询的方法
    • FSO遍历目录实现全站插马的代码
    • asp缓存类
    • ASP+Access数据库安全设置方法小结
    • 文件的读出 编辑 管理
    • 随机增加网站点击的一个不错的方法 原创
    • 对象标记具有无效的 'MSWC.MyInfo' ProgID
    • 动态CSS,换肤技术

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有