<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="CheckAdmin.Asp"-->
<%
'*********************************************
'软件名称：博科企业网站内容管理系统（BOKECMS）
'软件开发：博科网络科技工作室
'网   址：http://www.bokew.net
'服务QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：bokewlkj
'*********************************************
%>
<%
Dim Result, ID, SelectID
Result = request("Result")
SelectID = request("SelectID")

Call SiteInfo()
Select Case Result
    Case "About"
        If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_About where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & AboutDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_About where ID in ("&SelectID&")"
		End If
        response.redirect request.servervariables("http_referer")

	Case "News"
		If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_News where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & NewsDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_News where ID in ("&SelectID&")"
		End If
		response.redirect request.servervariables("http_referer")

	Case "Product"
		If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_Product where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & ProDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_Product where ID in ("&SelectID&")"
		End If
		response.redirect request.servervariables("http_referer")
		
	Case "Case"
		If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_Case where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & CaseDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_Case where ID in ("&SelectID&")"
		End If
		response.redirect request.servervariables("http_referer")
		
	Case "Download"
		If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_Download where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & DownDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_Download where ID in ("&SelectID&")"
		End If
		response.redirect request.servervariables("http_referer")
		
	Case "Recruitment"
		If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_Recruitment where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & RecruitmentDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_Recruitment where ID in ("&SelectID&")"
		End If
		response.redirect request.servervariables("http_referer")

	Case "Video"
		If SelectID <> "" Then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select * from BokeCMS_Video where ID in ("&SelectID&")", conn, 1, 2
			do until rs.eof
				FilePath = "/" & VideoDir & "/" & rs("ClassSeo") & Separated & rs("ID") & "." & HTMLName
				Call DoDelHtml("/wap" & FilePath)
				Call DoDelHtml(FilePath)
				rs.movenext
			loop
			rs.close : set rs = nothing
			Conn.Execute "delete from BokeCMS_Recruitment where ID in ("&SelectID&")"
		End If
		response.redirect request.servervariables("http_referer")

    Case "Navigation"
		If SelectID <> "" Then
			NavPath = Conn.Execute("select * from BokeCMS_Navigation where ID="&SelectID)("NavPath")
			Conn.Execute "delete from BokeCMS_Navigation where instr(NavPath, '"&NavPath&"')>0"
		End If
		response.redirect request.servervariables("http_referer")
	
	Case "App"
		If SelectID <> "" Then Conn.Execute "delete from BokeCMS_plugin where ID = "&SelectID
		response.redirect request.servervariables("http_referer")

	Case "Contact"
		if SelectID <> "" Then Conn.execute "delete from BokeCMS_Contact where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")
	
    Case "FriendLink"
		If SelectID <> "" Then Conn.Execute "delete from BokeCMS_Link where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")
		
	Case "Ads"
		If SelectID <> "" Then Conn.Execute "delete from BokeCMS_Ads where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")
		
	Case "Slide"
		if SelectID <> "" Then Conn.execute "delete from BokeCMS_Slide where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")

	Case "Message"
		If SelectID <> "" Then Conn.Execute "delete from BokeCMS_Message where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")

	Case "Video"
		If SelectID <> "" Then Conn.Execute "delete from BokeCMS_Video where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")

	Case "Template"
		If SelectID <> "" Then
			TemplatePath = Conn.execute("Select * from BokeCMS_Template where ID = "&SelectID)("TemplatePath")
			Call DelFileFolder(TemplatePath)
			Conn.Execute "delete from BokeCMS_Template where ID = "&SelectID
		End If
		response.redirect request.servervariables("http_referer")

    Case "AdminLog"
		If SelectID <> "" Then Conn.Execute "delete from BokeCMS_AdminLog where ID in ("&SelectID&")"
		response.redirect request.servervariables("http_referer")

    Case "Admin"
        If SelectID <> "" Then Conn.Execute "delete from BokeCMS_Admin where ID in ("&SelectID&")"
        response.redirect request.servervariables("http_referer")

    Case "User"
        If SelectID <> "" Then Conn.Execute "delete from BokeCMS_Members where ID in ("&SelectID&")"
        response.redirect request.servervariables("http_referer")

    Case "MemGroup"
        If SelectID <> "" Then Conn.Execute "delete from BokeCMS_MemGroup where ID in ("&SelectID&") and sys="&BK_False&""
        response.redirect request.servervariables("http_referer")

    Case "Financiallog"
        If SelectID <> "" Then Conn.Execute "delete from BokeCMS_financiallog where ID in ("&SelectID&")"
        response.redirect request.servervariables("http_referer")

End Select
%>