<%@ codepage ="936" %>
<%charset="gb2312"%>
<%Session.CodePage=936%>
<!--#include file="Admin.asp"-->
<!--#include file="Conn.asp"-->
<%
dim SmallClassID,sql
SmallClassID=trim(Request("SmallClassID"))
if SmallClassID<>"" Then
	sql="select Articleid from conews where SmallClassID=" & SmallClassID & ""
	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
	BigClassID=conn.execute("select BigClassID from NewsSmallClass where SmallClassID="&Cint(SmallClassID)&"")(0)
	sql="delete from NewsSmallClass where SmallClassID="&Cint(SmallClassID)&""
	conn.Execute sql
end if
call CloseConn()      
response.redirect "News_ClassManage.asp?BigclassID="&BigClassID
%>



