<!--#include file="Conn.ASP"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<!--#include file="ChkURL.asp"-->
<%
if not(request.cookies(echsys)("KEY")="super" or request.cookies(echsys)("KEY")="bigmaster" or request.cookies(echsys)("KEY")="typemaster") THEN
	Show_Err("对不起，您的后台管理权限不够！")
	response.end
else
	delsmallclass=request.form("delsmallclass")
	if delsmallclass="1" then	
		dim E_smallclassname
		E_SmallClassID=ChkRequest(request("E_SmallClassID"),1)	'防注入
		set rs=server.createobject("adodb.recordset")
		sql="select * from "& db_wygkcn_SmallClass_Table &" where E_SmallClassID="&E_SmallClassID
		rs.open sql,conn,1,1
		E_smallclassname=rs("E_smallclassname")
		E_BigClassID=rs("E_BigClassID")
		rs.close
		set rs=nothing
	
		button_value=trim(Request.Form("alert_button"))
		if button_value="是" then
			conn.execute("delete from "& db_wygkcn_Article_Table &" where E_SmallClassID=" &E_SmallClassID)
			conn.execute("delete from "& db_wygkcn_SmallClass_Table &" where E_SmallClassID=" &E_SmallClassID)
			conn.close
			set conn=nothing
			response.write "<meta http-equiv=""refresh"" content="""&freetime&";url=wygkcn_SmallClassManage.asp?E_BigClassID="&E_BigClassID&""">"
			Show_Message("<p align=center><font color=red>恭喜您!您删除小类“"&E_smallclassname&"”成功!!<br><br>"&freetime&"秒钟后返回上页!</font>")
			response.end
		else
			response.redirect "wygkcn_SmallClassManage.asp?E_BigClassID="&E_BigClassID
		end if
	else
		Show_Err("您无权删除此项目！<br><br><a href='javascript:history.back()'>返回</a>")
		response.end
	end if
end if%>