<%@ codepage ="936" %>
<%charset="gb2312"%>
<%Session.CodePage=936%>
<!--#include file="Admin.asp"-->
<!--#include file="Conn.asp"-->
<%
dim BigClassID,sql
BigClassID=trim(Request("BigClassID"))
if BigClassID<>"" And IsNumeric(BigClassID) Then
	sql="select * from NewsSmallClass where BigClassID=" & BigClassID & ""
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open sql,conn,1,1
	total=rs.recordcount
	If total>0 Then
		response.write "<script>alert('请先把该分类下的二级小分类类删除后才能删除本分类！');history.go(-1);</script>"
		response.End
	End If
	rs.close
	Set rs=nothing
	sql="delete from NewsBigClass where BigClassID=" & BigClassID & ""
	conn.Execute sql
	sql="delete from NewsSmallClass where BigClassID=" & BigClassID & ""
	conn.Execute sql
end if
call CloseConn()      
response.redirect "News_ClassManage.asp"
%>



