<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="../inc/Config.asp"-->
<%
Call ChkLogin(session("WebAdminsUserName"))
Call ConnectionDataBase(2)
Action = Request("Action")
Select Case Action
	Case "LogicDelFiles"
		Call LogicDelFiles
	Case "DelFiles"
		Call DelFiles	
End Select
'逻辑删除文件
Sub LogicDelFiles()
	Dim ID,StrSql,Cate
	ChkBox = Checkstr(Trim(Request("ChkBox")))
	Call ChkIsNull(ChkBox,"参数错误!请选择要删除的记录!")	
	StrSql = "UPDATE T_JcClass SET Recycle=1 Where ID in (" & ChkBox & ")"
	SetRs Rs,StrSql,conn,1,3
	Call CloseDatabase
	Call Success("记录已经成功删除!",request.ServerVariables("HTTP_REFERER"))	
End Sub
'物理删除/还原文件
Sub DelFiles()
	Dim ID,StrSql,Cate
	ChkBox = Checkstr(Trim(Request("ChkBox")))
	Call ChkIsNull(ChkBox,"参数错误!请选择要删除的记录!")
	btnSubmit = Trim(Request("btnSubmit"))
	IF btnSubmit="还原" Then
		StrSql = "UPDATE T_JcClass SET Recycle=0 Where ID in (" & ChkBox & ")"
		Msg = "记录已经成功还原!"
	Else
		StrSql = "DELETE FROM T_JcClass Where ID in (" & ChkBox & ")"
		Msg = "记录已经成功删除!"
	End IF
	SetRs Rs,StrSql,conn,1,3
	Call CloseDatabase
	Call Success(Msg,request.ServerVariables("HTTP_REFERER"))	
End Sub

%>
