树形目录加移动

 

树形目录加移动

<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<META HTTP-EQUIV="pragma" CONTENT="no-cache">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">

<title>目录</title>

<style type="text/css">

<!--

ul {

 list-style-type: none;

 padding:0px;

 margin-left:0px;

 

 

}

.ieUl { 

  margin-top:-3px;

  margin-bottom:-3px; 

}

li{

 border:0px;

 padding:0px;

 

}

body,td,th {

 font-size: 12px;

}

body {

 background-color: #F1F0ED;

}

-->

</style>

</head>

<body onselectstart="return false">

<%

       ' ------------------- 第一层目录读取 -----------------------'

               '---------------<start>-------------'

     

    set conn=server.CreateObject("adodb.connection")

    conn.connectionstring="Provider=SQLOLEDB;server=b69;uid=sa;pwd=123123;database=testpd;"

    conn.open

 set rs=server.CreateObject("adodb.recordset")

 

    rs.open "select top 100 a.*,(select moduleICO from [tmodule] where moduleID = a.moduleID) as folderICO,(select type from [tModule] where moduleID = a.ModuleID) as dirtype from [Tree] as a where a.rootID=0  order by a.id asc,a.hasChild desc",conn,1,1

 

                  '---------------<end>-------------'

       ' ------------------- 第一层目录读取 -----------------------'

              

%>

<div ></div>

<div ></div>

<ul  style="border:0px solid #FFFFCC; width:350px;background:#F1F0ED">

<li ><img src="icon/home.gif" /> 根目录</li>

<li ><img src="icon/recycle.gif" />回收站</li>

</ul>

<div style="display:none; border:#669933 solid 1px ; background:#FFFFCC" ></div>

<script type="text/javascript"></script>

<script>

/*

  ----------------------

 

      ##  目录树  ##

  author:teddy

  createDate:2007-02-27

  createMoveTreeDate:2007-03-06

  createDeleteTreeDate :2007-02-28

  ----------------------

*/

var currentElement;

var currentObject;

var hiddenElement;

var aimElement;  // 移动目标元素

var aimObject;   // 移动目标dom对象

var serialNumber ;

 

  serialNumber =0;

 

var upPointer;

 

  upPointer =-1;

var mo;

var up;

 mo=-1;

 up=-1;

 

 var isDrag;

 

  isDrag = -1;

 

/*

 树对象

*/

var iconPath = "icon/";                        //设置图标文件路径

var iconSuffix ="open.gif";                    //设置打开文件的后缀<区别>                            

function Tree(){

  this.id="";

  this.fatherID="";

  this.hasChild=-1;

  this.nameDir="";

  this.ico={

    folder:'',

    icon:''

   }

   this.fileType = 0;

  this.rootID = 0;

   this.layer="";

   this.isOpen=-1;

   this.isLoad=-1;

   this.isLastOne=-1;

   this.parentElement=-1;

   this.parentObject=-1;

   this.serialNumber=-1;

}

/*

 图标对象

*/

var icoCurl={

    L0        : 'L0.gif',  //┏

    L1        : 'L1.gif',  //┣

    L2        : 'L2.gif',  //┗

    L3        : 'L3.gif',  //━

    L4        : 'L4.gif',  //┃

    PM0       : 'P0.gif',  //+┏

    PM1       : 'P1.gif',  //+┣

    PM2       : 'P2.gif',  //+┗

    PM3       : 'P3.gif',  //+━

    empty     : 'L5.gif',     //空白图

    root      : 'root.gif',   //缺省的根节点图标

    folder    : 'folder.gif', //缺省的文件夹图标

    file      : 'file.gif',   //缺省的文件图标

    exit      : 'exit.gif'

}

var icoExpand={

   

 PM0       : 'M0.gif',     //-┏

    PM1       : 'M1.gif',     //-┣

    PM2       : 'M2.gif',     //-┗

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值