<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/System_Language.asp" -->
<!--#include file="../Include/Version.Asp" -->
<!--#include file="CheckAdmin.Asp"-->
<%
'*********************************************
'软件名称：电家企业网站内容管理系统
'软件开发：电脑家园工作室
'网    址：http://www.537600.cn
'服务  QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：diannaojiayuan
'*********************************************
%>
<%
Call SiteInfo()
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<%=DianJiaCMS_Lang_Copyright(13)%>">
<meta name="author" content="<%=DianJiaCMS_Lang_Copyright(3)%>">
<title><%=DianJiaCMS_Lang_Copyright(1)%> <%=Soft_Version%></title>
<!--#Include file="DianJiaCMS_Css.Asp"-->
<link rel="stylesheet" href="../KindEditor/themes/default/default.css" />
<script charset="utf-8" src="../KindEditor/kindeditor.js"></script>
<script charset="utf-8" src="../KindEditor/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
	var editor = K.editor({
		uploadJson : '../KindEditor/asp/upload_json.asp',
		fileManagerJson : '../KindEditor/asp/file_manager_json.asp',
		allowFileManager : true
	});
	K('#imagePic').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				imageUrl : K('#SmallPic').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#SmallPic').val(url);
					editor.hideDialog();
				}
			});
		});
	});
});
</script>
</head>

<body>
<!--#Include file="DianJiaCMS_Top.Asp"-->
<!--#Include file="DianJiaCMS_Meun.Asp"-->
<div id="wrap">
	<%
	If InStr(CompanyAdminPurview, "|4,") = 0 Then
		response.Write ("<br /><br /><div style='height:100%; text-align:center' class='main'><font style=""color:red; font-size:14px;"")>"&DianJiaCMS_Lang_System(26)&"</font></div>")
		response.End
	End If
	%>
    <div class="main">
        <div class="row">
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i> 当前位置</li>
                <li class="active">功能模块</li>
                <%
				If SortPath<>"" Then
					Response.Write "<li>案例模块</li>"
					TextPath(SortID)
				Else
					Response.Write "<li class='active'>案例模块</li>"
				End If
				%>
            </ol>	
        </div>
        <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-edit"></i><span class="break"></span><strong>案例管理</strong></h2> 
                    </div>
                    <div class="panel-body">
                        <a class="ShortCut1" href="DianJiaCMS_Funct_CaseEdit.Asp?Result=Add">  
                            <i class="fa fa-picture-o"></i>
                            <div class="title">添加案例</div>
                        </a>					
                        <a class="ShortCut2" href="DianJiaCMS_Funct_Case.Asp">  
                            <i class="fa fa-th-large"></i>
                            <div class="title">案例列表</div>
                        </a>	
                        <a class="ShortCut3" href="DianJiaCMS_Funct_CaseSort.Asp">  
                            <i class="fa fa-sitemap"></i>
                            <div class="title">案例分类</div>
                        </a>													
                    </div>
                </div>
            </div>
        </div>
		<%
        Dim Action, FolderName
        Action = request.QueryString("Action")
        Select Case Action
			Case "Add"
				addFolder
				CallFolderView()
			Case "Del"
				Dim rs,sql,SortPath
				SortPath = Conn.execute("Select * From DianJiaCMS_CaseSort where ID="&request.QueryString("id"))("SortPath")				
				'删除分类对应信息的静态页面
				set rs = server.CreateObject("adodb.recordset")
				rs.open "Select * from DianJiaCMS_Case where Instr(SortPath,'"&SortPath&"')>0", conn, 1, 2
				do until rs.eof
					FileName = "/" & CaseDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
					Call DoDelHtml("/wap"&FileName)
					Call DoDelHtml(FileName)
					rs.movenext
				loop
				rs.close : set rs = nothing
				'删除分类文件夹
				Set rs = server.CreateObject("adodb.recordset")
				rs.open "Select * from DianJiaCMS_CaseSort where Instr(SortPath,'"&SortPath&"')>0", conn, 1, 2
				do until rs.eof
					FolderName = "/" & CaseDir & "/" & rs("FolderName")
					If mStatus Then Call DelFileFolder("/wap"&FolderName)
					Call DelFileFolder(FolderName)
					rs.movenext
				loop
				rs.close : set rs = nothing
				'删除分类和信息在数据库里面的数据
				conn.execute("delete from DianJiaCMS_CaseSort where Instr(SortPath,'"&SortPath&"')>0")
				conn.execute("delete from DianJiaCMS_Case where Instr(SortPath,'"&SortPath&"')>0")
				Call SweetAlert("success", "操作成功", "成功删除本类、子类及所有下属信息条目！", "false", "location.replace('DianJiaCMS_Funct_CaseSort.Asp')")
			Case "Save"
				saveFolder ()
			Case "Edit"
				editFolder ()
				CallFolderView()
			Case "Move"
				moveFolderForm ()
				CallFolderView()
			Case "MoveSave"
				saveMoveFolder ()
			Case Else
				CallFolderView()
        End Select
        %>
    </div>
	<!--#Include file="DianJiaCMS_End.Asp"-->
</div>

<%Function CallFolderView()%>
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div data-original-title="" class="panel-heading">
				<h2><i class="fa fa-user"></i><span class="break"></span>管理案例类别 &nbsp;&nbsp;&nbsp;&nbsp; <a href="DianJiaCMS_Funct_CaseSort.Asp?Action=Add&ParentID=0" class="btn btn-danger btn-sm">添加一级分类</a></h2>
			</div>
			
			<div class="panel-body">
                <table class="table table-striped table-bordered bootstrap-datatable" cellspacing="0" width="100%">
                <thead>
                <tr role="row">
                    <th>ID</th>
                    <th>类别名称</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                    <%Folder(0)%>
                </tbody>
                </table>
			</div>
		</div>
	</div>
</div>
<%
End Function
%>       	
<%
Function addFolder()
	Dim ParentID
	ParentID = request.QueryString("ParentID")
	addFolderForm ParentID
end Function

Function addFolderForm(ParentID)
	Dim ParentPath, SortTextPath, rs, sql
	If ParentID = 0 Then
		ParentPath = "0,"
		SortTextPath = ""
	Else
		Set rs = server.CreateObject("adodb.recordset")
		sql = "Select * From DianJiaCMS_CaseSort where ID="&ParentID
		rs.Open sql, conn, 1, 1
		ParentPath = rs("SortPath")
	End If
%>
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h2><i class="fa fa-gears"></i><span class="break"></span><strong>【添加案例类别】| 根类 → <% if ParentID<>0 then TextPath(ParentID)%></strong></h2>
            </div>
            <div class="panel-body">
            <form name="FolderForm" method="post" action="DianJiaCMS_Funct_CaseSort.Asp?Action=Save&From=Add" class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-2 control-label">类别名称：</label>
                    <div class="col-md-4">
                        <input name="SortName" type="text" id="SortName" class="form-control" maxlength="100">
                        <label class="checkbox-inline" for="ViewFlag">
                            <input type="checkbox" id="ViewFlag" name="ViewFlag" value="1"> 是否生效
                        </label>                           
                    </div>
                </div> 
                <%If EnableSeo = True Then%>
                <div class="form-group">
                    <label class="col-md-2 control-label">类别关键词：</label>
                    <div class="col-md-5">
                    	<input name="SeoKeywords" type="text" id="SeoKeywords" class="form-control" maxlength="250">
                        <span class="help-block">SEO：多个关键词请用“,”半角逗号分开</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">类别描述：</label>
                    <div class="col-md-5">
                    	<input name="SeoDescription" type="text" id="SeoDescription" class="form-control" maxlength="250">
                        <span class="help-block">SEO：请填写描述</span>
                    </div>
                </div>
                <%End If%>
                <div class="form-group">
                    <label class="col-md-2 control-label"></label>
                    <div class="col-md-4">
                        <label class="checkbox-inline" for="Show">
                            <input type="checkbox" id="Show" name="Show" value="1"> 添加类别图标和简介
                        </label>                           
                    </div>
                </div> 
                <div class="form-group" name="ShowFlag" style="display:none;">
                    <label class="col-md-2 control-label">类别图标：</label>
                    <div class="col-md-5">
                        <div class="input-group">
                            <input name="SmallPic" type="text" id="SmallPic" class="form-control" />
                            <span class="input-group-btn">
                            <button type="button" id="imagePic" class="btn btn-default">选择图片</button>
                            </span>
                        </div>
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group" name="ShowFlag" style="display:none;">
                    <label class="col-md-2 control-label">类别简介：</label>
                    <div class="col-md-5">
                        <textarea name="Content" class="form-control"></textarea>
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label">类别文件夹名：</label>
                    <div class="col-md-5">
                        <div class="input-group">
                            <input name="FolderName" type="text" id="FolderName" class="form-control" />
                            <span class="input-group-btn">
                            <button type="button" id="Pinyin" class="btn btn-default" onClick="GetPinyin()">类别名称转换为拼音</button>
                            </span>
                        </div>
                        <span class="help-block">输入的文件夹名不能重复（如果“名称转换为拼音”无效或出错，请手动填写）</span>
                    </div>
                </div>
                <input name="ParentID" type="hidden" id="ParentID" value="<%=ParentID%>">
                <input name="ParentPath" type="hidden" id="ParentPath" value="<%=ParentPath%>" >
                <div class="form-group">
                    <div class="col-md-2 control-label"></div>
                    <div class="col-md-10">
                        <input name="submitSaveEdit" type="submit" id="submitSaveEdit" class="btn btn-danger btn-lg" value="保存类别">
                    </div>	
                </div>
            </form>
            </div>  
        </div>
    </div>
</div>
<%
End Function

Function editFolder()
	Dim ID
	
	ID = request.QueryString("ID")
	editFolderForm (ID)
end function

Function editFolderForm(ID)
	Dim SortName, ViewFlag, ParentID, SortPath, SeoKeywords, SeoDescription, SmallPic, Content, FolderName, rs, sql
	Set rs = server.CreateObject("adodb.recordset")
	sql = "Select * From DianJiaCMS_CaseSort where ID="&ID
	rs.Open sql, conn, 1, 1
	SortName = rs("SortName")
	ViewFlag = rs("ViewFlag")
	ParentID = rs("ParentID")
	SortPath = rs("SortPath")
	SeoKeywords = rs("SeoKeywords")
	SeoDescription = rs("SeoDescription")
	SmallPic = rs("SmallPic")
	Content = rs("Content")
	FolderName = rs("FolderName")
	If SmallPic<>"" or Content<>"" Then
		ShowFlag = True
	Else
		ShowFlag = False
	End If
%>
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h2><i class="fa fa-gears"></i><span class="break"></span><strong>【修改案例类别】| 根类 → <% if ParentID<>0 then TextPath(ParentID)%></strong></h2>
            </div>
            <div class="panel-body">
            <form name="FolderForm" method="post" action="DianJiaCMS_Funct_CaseSort.Asp?Action=Save&From=Edit&ID=<%=ID%>" class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-2 control-label" for="text-input">类别名称：</label>
                    <div class="col-md-4">
                        <input name="SortName" type="text" id="SortName" class="form-control" value="<%=SortName%>" maxlength="100">
                        <label class="checkbox-inline" for="ViewFlag">
                            <input type="checkbox" id="ViewFlag" name="ViewFlag" value="1" <%if ViewFlag then response.write ("checked")%>> 是否生效
                        </label>                           
                    </div>
                </div> 
                <%If EnableSeo = True Then%>
                <div class="form-group">
                    <label class="col-md-2 control-label" for="text-input">类别关键词：</label>
                    <div class="col-md-5">
                    	<input name="SeoKeywords" type="text" id="SeoKeywords" class="form-control" value="<%=SeoKeywords%>" maxlength="250">
                        <span class="help-block">SEO：多个关键词请用“,”半角逗号分开</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label" for="text-input">类别描述：</label>
                    <div class="col-md-5">
                    	<input name="SeoDescription" type="text" id="SeoDescription" class="form-control" value="<%=SeoDescription%>" maxlength="250">
                        <span class="help-block">SEO：请填写描述</span>
                    </div>
                </div>
                <%End If%>
                <div class="form-group">
                    <label class="col-md-2 control-label"></label>
                    <div class="col-md-4">
                        <label class="checkbox-inline" for="Show">
                            <input type="checkbox" id="Show" name="Show" value="1" <%If ShowFlag Then response.Write "checked"%>> 添加类别图标和简介
                        </label>                           
                    </div>
                </div>
                <div class="form-group" name="ShowFlag" <%If not ShowFlag Then response.Write "style='display:none'"%>>
                    <label class="col-md-2 control-label" for="text-input">类别图片：</label>
                    <div class="col-md-5">
                    <div class="input-group">
                        <input name="SmallPic" type="text" id="SmallPic" value="<%=SmallPic%>" class="form-control" /> 
                        <span class="input-group-btn">
                        <button type="button" id="imagePic" class="btn btn-default">选择图片</button>
                        </span>
                        </div>
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group" name="ShowFlag" <%If not ShowFlag Then response.Write "style='display:none'"%>>
                    <label class="col-md-2 control-label" for="text-input">类别简介：</label>
                    <div class="col-md-5">
                        <textarea name="Content" class="form-control"><%=Content%></textarea>
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label" for="text-input">类别文件夹名：</label>
                    <div class="col-md-5">
                        <div class="input-group">
                            <input name="FolderName" type="text" id="FolderName" value="<%=FolderName%>" class="form-control" />
                            <span class="input-group-btn">
                            <button type="button" id="Pinyin" class="btn btn-default" onClick="GetPinyin()">类别名称转换为拼音</button>
                            </span>
                        </div>
                        <span class="help-block">输入的文件夹名不能重复（如果“名称转换为拼音”无效或出错，请手动填写）</span>
                    </div>
                </div>
                <input name="ParentID" type="hidden" id="ParentID" value="<%=ParentID%>">
                <input name="SortPath" type="hidden" id="SortPath" value="<%=SortPath%>" >
                <div class="form-group">
                    <div class="col-md-2 control-label"></div>
                    <div class="col-md-10">
                        <input name="submitSaveEdit" type="submit" id="submitSaveEdit" class="btn btn-danger btn-lg" value="保存类别">
                    </div>	
                </div>
            </form>   
            </div>
        </div>
    </div>
</div>
<%
End Function

Function TextPath(ID)
	Dim rs, sql, SortTextPath
	Set rs = server.CreateObject("adodb.recordset")
	sql = "Select * From DianJiaCMS_CaseSort where ID="&ID
	rs.open sql,conn,1,1
	SortTextPath = rs("SortName")&"&nbsp;→&nbsp;"
	if rs("ParentID") <> 0 then TextPath rs("ParentID")
	response.write SortTextPath
End Function

Function saveFolder
    If Len(Trim(request.Form("SortName"))) = 0 Then
		Call SweetAlert("warning", "友情提示", "请填写类别名称！", "false", "history.back(-1)")
        response.end
    End If
    If Trim(request.Form("FolderName")) = "" Then
		Call SweetAlert("warning", "友情提示", "请填写类别文件夹名！", "false", "history.back(-1)")
        response.end
    End If

	Dim From, Action, rs, sql, SortTextPath
    From = request.QueryString("From")
	ID = request.QueryString("ID")

	Set rs = server.CreateObject("adodb.recordset")
	rs.Open "Select * From DianJiaCMS_CaseSort where FolderName='"&trim(Request.form("FolderName"))&"'", conn, 1, 3
	If not rs.eof Then
		If CInt(ID) <> CInt(rs("ID")) Then
			Call SweetAlert("warning", "友情提示", "填写的类别文件夹已存在，请重新填写！", "false", "history.back(-1)")
			response.end
		End If
	End If

	If From = "Add" Then
		FolderName = "/" & CaseDir & "/" & trim(Request.form("FolderName"))
		If mStatus Then Call CreateFolder("/wap" & FolderName)
		Call CreateFolder(FolderName)
	Else
		NowPath = "/" & CaseDir & "/" & Conn.execute("Select * From DianJiaCMS_CaseSort where ID="&ID)("FolderName")
		NewPath = "/" & CaseDir & "/" & trim(Request.form("FolderName"))
		If mStatus Then Call fldrename("/wap" & NowPath, "/wap" & NewPath)
		Call fldrename(NowPath, NewPath)
	End If

    Set rs = server.CreateObject("adodb.recordset")
    If From = "Add" Then
        sql = "Select * From DianJiaCMS_CaseSort"
        rs.Open sql, conn, 1, 3
        rs.addnew
        Action = "添加案例类别"
        rs("SortPath") = request.Form("ParentPath") & rs("ID") & ","
    Else
        sql = "Select * From DianJiaCMS_CaseSort where ID="&request.QueryString("ID")
        rs.Open sql, conn, 1, 3
        Action = "修改案例类别"
        rs("SortPath") = request.Form("SortPath")
    End If

	rs("FolderName") = trim(Request.form("FolderName"))
    rs("SortName") = request.Form("SortName")
	If request.Form("ViewFlag") = "" Then
		rs("ViewFlag") = 0
	Else
		rs("ViewFlag") = request.Form("ViewFlag")
	End If
    rs("ParentID") = request.Form("ParentID")
	rs("SeoKeywords") = request.Form("SeoKeywords")
	rs("SeoDescription") = request.Form("SeoDescription")
	If request.Form("Show") = "1" Then
		rs("SmallPic") = request.Form("SmallPic")
		rs("Content") = request.Form("Content")
	Else
		rs("SmallPic") = ""
		rs("Content") = ""
	End If
    rs.update
	rs.close : set rs = nothing

	Call SweetAlert("success", "操作成功", Action&"成功！", "false", "location.replace('DianJiaCMS_Funct_CaseSort.Asp')")
End Function
%>
<!--#Include file="DianJiaCMS_Js.Asp"-->
</body>
</html>
<%
Function Folder(id)
Dim rs, sql, i, ChildCount, FolderType, FolderName, onMouseUp, ListType
Set rs = server.CreateObject("adodb.recordset")
sql = "Select * From DianJiaCMS_CaseSort where ParentID="&id&" order by id"
rs.open sql,conn,1,1
if id = 0 and rs.recordcount=0 then
	response.write "<center>暂无案例分类</center>"
end if
i = 1
while not rs.eof
	ChildCount = conn.execute("select count(*) from DianJiaCMS_CaseSort where ParentID="&rs("id"))(0)
	if ChildCount = 0 then
		FolderType = "SortFile"
		FolderName = rs("SortName")
		onMouseUp = ""
	else
		FolderType = "SortFolderOpen"
		onMouseUp = "EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
		FolderName = rs("SortName")
	end If
	datafrom = "DianJiaCMS_CaseSort"
	Response.Write "<tr role='row'>" & vbCrLf
	response.write "<td>"&rs("ID")&"</td>"
	response.write "<td>"&FolderName&"</td>"
	If rs("ViewFlag") Then
		Response.Write "<td><a href=""DianJiaCMS_Funct_Conversion.Asp?id="&rs("ID")&"&LX="&datafrom&"&Conver=ViewFlag&Operation=down""><span class='label label-success'>生效</span></a></td>" & vbCrLf
	Else
		Response.Write "<td><a href=""DianJiaCMS_Funct_Conversion.Asp?id="&rs("ID")&"&LX="&datafrom&"&Conver=ViewFlag&Operation=up""><span class='label label-default'>未生效</span</a></td>" & vbCrLf
	End If
	Response.Write "<td>"
	Response.Write "<a href='DianJiaCMS_Funct_CaseSort.Asp?Action=Add&ParentID="&rs("id")&"' class='btn btn-primary' title='添加子级'><i class='fa fa-plus'></i> 添加子级</a>"
	Response.Write "<a href='DianJiaCMS_Funct_Case.Asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"' class='btn btn-success'><i class='fa fa-search-plus'></i></a>"
	Response.Write "<a href='DianJiaCMS_Funct_CaseSort.Asp?Action=Edit&ID="&rs("id")&"' class='btn btn-info' title='修改'><i class='fa fa-edit'></i></a>"
	Response.Write "<a href='javascript:ConfirmDelSort(""DianJiaCMS_Funct_CaseSort"","&rs("id")&")' class='btn btn-danger' title='删除'><i class='fa fa-trash-o '></i></a>"
	Response.Write "</td>" & vbCrLf
	Response.Write "</tr>" & vbCrLf
	If ChildCount>0 Then
		Call Folderr(rs("id"))
	End If
	rs.movenext
	i = i + 1
wend
rs.close : set rs = nothing
End Function

Function Folderr(id)
Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From DianJiaCMS_CaseSort where ParentID="&id&" order by id"
rs.open sql,conn,1,1
if id=0 and rs.recordcount=0 then
	response.write ("<center>暂无案例分类</center>")
end if
i = 1
while not rs.eof
	ChildCount = conn.execute("select count(*) from DianJiaCMS_CaseSort where ParentID="&rs("id"))(0)
	if ChildCount = 0 then
		FolderType = "SortFile"
		FolderName = rs("SortName")
		onMouseUp = ""
	else
		FolderType = "SortFolderOpen"
		onMouseUp = "EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
		FolderName = rs("SortName")
	end If
	datafrom = "DianJiaCMS_CaseSort"
	Response.Write "<tr role='row'>" & vbCrLf
	response.write "<td>"&rs("ID")&"&nbsp;"
	temparr = split(rs("SortPath"),",")
	arrnum = ubound(temparr)
	response.Write "<td><div style=""width:"&(arrnum-1)*25&"px; height:20px; float:left;""></div><div style=""background:url(skin_a/img/File"&arrnum-2&".gif) 1px center no-repeat;padding-left:20px; float:left;"">"&FolderName&"&nbsp;"
	If rs("ViewFlag") Then
		Response.Write "<td><a href=""DianJiaCMS_Funct_Conversion.Asp?id="&rs("ID")&"&LX="&datafrom&"&Conver=ViewFlag&Operation=down""><span class='label label-success'>生效</span></a></td>" & vbCrLf
	Else
		Response.Write "<td><a href=""DianJiaCMS_Funct_Conversion.Asp?id="&rs("ID")&"&LX="&datafrom&"&Conver=ViewFlag&Operation=up""><span class='label label-default'>未生效</span</a></td>" & vbCrLf
	End If
	Response.Write "<td>"
	Response.Write "<a href='DianJiaCMS_Funct_CaseSort.Asp?Action=Add&ParentID="&rs("id")&"' class='btn btn-primary' title='添加子级'><i class='fa fa-plus'></i> 添加子级</a>"
	Response.Write "<a href='DianJiaCMS_Funct_Case.Asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"' class='btn btn-success'><i class='fa fa-search-plus'></i></a>"
	Response.Write "<a href='DianJiaCMS_Funct_CaseSort.Asp?Action=Edit&ID="&rs("id")&"' class='btn btn-info' title='修改'><i class='fa fa-edit'></i></a>"
	Response.Write "<a href='javascript:ConfirmDelSort(""DianJiaCMS_Funct_CaseSort"","&rs("id")&")' class='btn btn-danger' title='删除'><i class='fa fa-trash-o '></i></a>"
	Response.Write "</td>" & vbCrLf
	Response.Write "</tr>" & vbCrLf
	If ChildCount>0 Then
		Call Folderr(rs("id"))
	End If
	rs.movenext
	i = i + 1
wend
rs.close : set rs = nothing
End Function
%>