【茶树树型分类】无限级分类树型节点演示

更新时间:2017-09-20 来源:软件评测 点击:

【www.hzclsc.cn--软件评测】

body,td{font-size:13px;}
a:link { color: #442200; text-decoration: none}
a:visited { color: #444400; text-decoration: none}
a:hover { color: #442200; text-decoration: underline overline; background-color: #FFFF00}
a.link1:link { color: #FF0000; text-decoration:none}
a.link1:visited { color: #FF0000; text-decoration: none}
a.link1:hover { color: #FF0000; text-decoration: none; background-color: #eeeeee}



 









添加节点


标题:

链接:

目标:


Default
Right
_black
_Top
_parent
_self






 




<%
'连接数据库
set conn=server.createobject("ADODB.Connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("File.mdb")

'//----------操作分支
Action=Request("Action")
Select Case Action
Case "Add":If Request("ParentID")<>"" Then Add
Case "Del": Del
Case "Open":Open
Case Else:
End Select
'//----------显示列表
Public List
Set Rs=Conn.Execute("Select * From [List]")
If Not Rs.Eof Then
List =Rs.GetRows
Max=Conn.Execute("Select Count(ParentID) From List Where ParentID=0")(0)
Set Rs=Nothing
Set Conn=Nothing
CheckList 0,Max,""
Else
Set Rs=Nothing
Set Conn=Nothing
End If
Response.Write "添加根
"
'//------------显示列表函数
FuncTion CheckList(ParentID,Cs,Str1)
Dim j
j=0
For i=0 To Ubound(List,2)
If List(1,i)=ParentID Then
Response.write(Str1)
If j0 Then Str2=""&Str2&""
If List(5,i)>0 And List(4,i)=False Then Str2=""&Str2&""
Response.Write(Str2)

Response.Write ""&List(2,i)&" "&VBcrlf
'添加节点链接
Response.Write "添加"&Vbcrlf
Response.Write "删除
"
If List(4,i)=True Then
If j返回"
Response.End
Exit Function
End If
Sql="Insert Into List (ParentID,Title,Url,Target) Values ("&Parent&",'"&Title&"','"&Url&"',' "&Target&"')"
Conn.Execute(Sql)
If Parent<>0 Then
Sql="Update List Set ChildNum=ChildNum+1 Where ID="&Parent
Conn.Execute(Sql)
End IF
End Function

'//-----切换节点状态
Function Open
Sql="Update List Set Flag=Not Flag Where ID="&Clng(Request("Id"))
Conn.Execute(Sql)
End Function
'//-----------删除节点
Function Del
On Error Resume Next
Id=Clng(Request("ID"))
ParentID=Conn.Execute("Select ParentID From List Where ID="&ID)(0)
Num=Conn.Execute("Select Count(ID) From List Where parentID="&ID)(0)
Conn.Execute("Update List Set ChildNum=ChildNum-1+"&Num&" Where ID="&ParentID)
Conn.Execute("Update List Set ParentID="&ParentID&" Where ID in (Select ID From List Where ParentID="&ID&")")
Conn.Execute("Delete From List Where ID="&ID)
If Err.Number<>0 Then
Response.Write "您做的操作无效,可能是该项已经删除!! 返回"
Response.End
End If
End Function
%>


没有做美化,没有加其它功能,需要者可以自己改好了!

Create Table List(ID AUTOINCREMENT,ParentID long,Title Text(50),Url Text(50),Flag bit,ChildNum Long,Target Text(10))

直接在查询里执行就可以得到List表!!

下面是对表的说明

Id 自动编号
ParentID 长整形
Title 文本
Url 文本
Flag 布尔
ChildNum 长整形
Target 文本,允许空符串

" _ue_custom_node_="true">

本文来源:http://www.hzclsc.cn/ruanjianzixun/2081.html

为您推荐

[rainway什么意思]Rainway软件下载地址 rainway串流switch软件在哪下载

您的位置:首页 → 单机游戏 → 游戏资讯 → Rainway软件下载地址 rainway串流switch软件在哪下载 Rainway软件下载地址 rainway串流switch软件在哪下载时间:20游戏资讯

2020-12-16 11:04:57  

苹果电脑安全性偏好设置_苹果电脑安全漏洞是什么 苹果电脑安全漏洞无需密码解锁解决办法

就在近日,有用户发现苹果电脑出现了一个重大的安全漏洞,不需要输入密码即可进入系统,但是很多用户都还不知道苹果电脑安全漏洞是什么,好奇的用户马上点击查看苹果电脑安全漏洞无需密码解锁解决办法来防范于未然教你一招

2020-12-10 23:05:05   电脑安全软件   电脑安全证书过期怎么办   顺丰寄电脑安全吗  

【nero】Nelo游戏配置要求高吗 Nelo推荐配置一览

Nelo游戏配置要求高吗?Nelo是一款由虚幻4打造的超快节奏的动作游戏,玩家可以使用四种武器形成各式各样的攻击方式,本文为大家带来Nelo售价和配置要求介绍,下面就一起来看看Nelo推荐配置一览吧。游戏资讯

2020-12-10 11:04:41   nero8中文破解版   nero刻录软件   nero10序列号  

抢红包神器抢最大的_抢红包怎么抢最大的 抢红包助手下载哪个好

时近年末,相信大家的“节目单”上除了与好友聚会叙旧、与客户更加频繁地应酬之外,还有一项必不可少的活动,那就是抢红包。记得木心有首现代诗中是这样写的,“从前的日色变得慢,车马、信件都很慢 ”的软件评测

2020-12-09 17:04:22   抢红包怎么能抢最大的   抢红包最大金额软件  

[wegame修复游戏在哪里]腾讯wegame怎么修复游戏 wegame平台修复游戏教程

您的位置:首页 → 资讯 → 游戏软件 → 腾讯wegame怎么修复游戏 wegame平台修复游戏教程 腾讯wegame怎么修复游戏 wegame平台修复游戏教程时间:2017 10 20 16:00游戏软件

2020-12-04 07:04:50   wegame游戏修复在哪里   wegame如何修复游戏