📄 jsdel.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 JSDel
KSCls.Execute()
Set KSCls = Nothing
Class JSDel
Private KSCMS
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Public Sub Execute()
Dim K, JSID, Page
Dim RS
Dim ArticleRS
Dim JSType, CurrPath, JSFileName, JSDir, FolderID
Set RS=Server.CreateObject("ADODB.Recordset")
Set ArticleRS=Server.CreateObject("ADODB.Recordset")
Page = Trim(KSCMS.G("Page"))
JSID = Split(KSCMS.G("JSID"), ",") '获得要删除标签的ID集合
For K = LBound(JSID) To UBound(JSID)
RS.Open "SELECT * FROM [KS_JSFile] WHERE JSID='" & JSID(K) & "'", Conn, 1, 3
If Not RS.EOF Then
JSType = RS("JSType")
FolderID = RS("FolderID")
'删除物理JS文件
JSFileName = Trim(RS("JSFileName"))
JSDir = Trim(KSCMS.GetConfig("JSDir"))
If Left(JSDir, 1) = "/" Or Left(JSDir, 1) = "\" Then JSDir = Right(JSDir, Len(JSDir) - 1)
CurrPath = KSCMS.GetConfig("InstallDir") & JSDir
Call KSCMS.DeleteFile(CurrPath & JSFileName)
'从文章中删除此JSID
ArticleRS.Open "Select JSID From KS_Article Where JSID like '%" & JSID(K) & "%'", Conn, 1, 3
If Not ArticleRS.EOF Then
While Not ArticleRS.EOF
ArticleRS(0) = Replace(ArticleRS(0), JSID(K) & ",", "")
ArticleRS.Update
ArticleRS.MoveNext
Wend
End If
End If
RS.Delete
RS.Close
ArticleRS.Close
Next
Set RS = Nothing
Set ArticleRS = Nothing
Response.Redirect "JS_Main.asp?Page=" & Page & "&JSType=" & JSType & "&FolderID=" & FolderID
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -