打开KS_Cls/Kesion.ClassCls.asp,修改以下两个地方
1、修改
If KS.G("Action")="Edit" Then
.Write "<input type='hidden' name='parentid' value='" & FolderID & "'>"
.Write "<select name='parentID1' Disabled>" & vbCrLf
Else
.Write "<select onchange='setchannel(this.value)' name='parentID'>" & vbCrLf
End If
改为
.Write "<select onchange='setchannel(this.value)' name='parentID'>" & vbCrLf
2、找到下面这行
RST.Open "select * from KS_Class Where ID='" &KS.G("FolderID") & "'", Conn, 1, 3
在下面添加
if ID<>RST("TN") then
if ID=RST("ID") then
Call KS.AlertHistory("频道或栏目的父栏目不能是自己", -1)
Exit Sub
end if
Dim ParentFolderRS:Set ParentFolderRS=Server.CreateObject("ADODB.Recordset")
ParentFolderRS.open "Select * from KS_Class where ID='"&ID&"'",Conn,1,3
if ID<>RST("ID") then
Dim SubRS:Set SubRS=Server.CreateObject("ADODB.Recordset")
SubRS.Open "Select * from KS_Class where TN='"&RST("ID")&"'",Conn,1,3
if Not SubRS.EOF then
Call KS.AlertHistory("当频道或栏目是其他栏目的父节点时不能移动", -1)
SubRS.Close:Set SubRS=Nothing
Exit Sub
end if
end if
if Not ParentFolderRS.EOF or ID="0" Or FolderID="" then
if ID="0" Or FolderID="" then
RST("TN")="0"
RST("TS")=RST("ID")&","
RST("TJ")=1
if RST("ClassType")=1 then
RST("Folder")=FolderEname&"/"
else
RST("Folder")=FolderEname
end if
else
RST("TN")=ParentFolderRS("ID")
RST("TS")=ParentFolderRS("TS")&RST("ID")&","
RST("TJ")=CInt(ParentFolderRS("TJ"))+1
if RST("ClassType")=1 then
RST("Folder")=ParentFolderRS("Folder")&FolderEname&"/"
elseif RST("ClassType")=2 then
RST("Folder")=FolderEname
else
RST("Folder")=ParentFolderRS("Folder")&FolderEname
end if
end if
else
Call KS.AlertHistory("不存在该栏目或频道", -1)
end if
ParentFolderRS.Close:Set ParentFolderRS = Nothing
end if