📄 article_folder_del.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Article_Folder_Del
KSCls.Execute()
Set KSCls = Nothing
Class Article_Folder_Del
Private KSCMS
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Sub Execute()
Dim EL, K, ID, ParentID, ButtonSymbol, CurrPath
Dim RS
Dim FolderRS
Dim Page, FolderID, DisplayMode
Dim Sql, Folder, Fso
Set RS=Server.CreateObject("ADODB.Recordset")
Page = KSCMS.G("Page")
DisplayMode = KSCMS.G("DisplayMode")
ButtonSymbol = Trim(KSCMS.G("ButtonSymbol"))
ID = Split(KSCMS.G("FolderID"), ",") '获得要删除目录的ID集合
For K = LBound(ID) To UBound(ID)
Sql = "select * from KS_Class where id='" & ID(K) & "'"
RS.Open Sql, conn, 1, 1
If Not RS.EOF Then
ParentID = RS("TN")
If ParentID = "0" Then
If Not KSCMS.ReturnPowerResult(1, "KMA10003") Then '删除文章频道权限检查
RS.Close
Set RS = Nothing
Call KSCMS.ReturnErr(2, "Article_Main.asp?DisplayMode=" & DisplayMode & "&Page=" & Page & "&id=" & ParentID)
Exit Sub
End If
Else
If Not KSCMS.ReturnPowerResult(1, "KMA10006") Then '删除文章栏目权限检查
RS.Close
Set RS = Nothing
Call KSCMS.ReturnErr(2, "Article_Main.asp?DisplayMode=" & DisplayMode & "&Page=" & Page & "&id=" & ParentID)
Exit Sub
End If
End If
Folder = RS("folder")
Folder = Left(Folder, Len(Folder) - 1)
Set FolderRS=Server.CreateObject("ADODB.Recordset")
FolderRS.Open "SELECT * FROM [KS_Class] WHERE ts LIKE '" & RS("ts") & "%'", conn, 1, 1
Do While Not FolderRS.EOF
FolderID = FolderRS("ID")
conn.Execute ("DELETE from [KS_Article] where TID='" & FolderID & "'")
'删除评论
conn.Execute ("Delete From KS_Comment Where ChannelID=1 and ClassID='" & FolderID & "'")
conn.Execute ("DELETE from [KS_Class] where ID='" & FolderID & "'")
conn.Execute ("DELETE from KS_Special Where FolderID='" & FolderID & "'")
FolderRS.MoveNext
Loop
FolderRS.Close
Set FolderRS = Nothing
End If
If KSCMS.GetConfig("ArticleDir") = "/" Or KSCMS.GetConfig("ArticleDir") = "\" Then
CurrPath = KSCMS.GetConfig("InstallDir") & Folder
Else
CurrPath = KSCMS.GetConfig("InstallDir") & KSCMS.GetConfig("ArticleDir") & Folder
End If
If (KSCMS.DeleteFolder(CurrPath) = False) Then
Call KSCMS.Alert("Delete Folder Error!", "Article_Main.asp")
Exit Sub
End If
RS.Close
Next
Set RS = Nothing
Set Fso = Nothing
Dim TypeStr
If ParentID = "0" Then
TypeStr = "-1"
Else
TypeStr = "0"
End If
If KSCMS.GetConfig("ShowDetail") = 1 Then '判断是否左栏显示详细信息
Response.Write "<script>parent.frames['LeftFrame'].LeftInfoFrame.location.href='Article_Left.asp?Type=" & TypeStr & "&ID=" & ParentID & "';location.href='Article_Main.asp?DisplayMode=" & DisplayMode & "&Page=" & Page & "&id=" & ParentID & "'</script>"
Else
Response.Write "<script>location.href='Article_Main.asp?DisplayMode=" & DisplayMode & "&Page=" & Page & "&id=" & ParentID & "'</script>"
End If
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -