<%@language="vbscript" codepage="936" %>
<%path="../basedata"%>
<!--#include file="../inc/function.asp"-->
<%call Loginpower%>
<%call legalpower%>
<!--#include file="../conn/conn_data.asp"-->
<%
id=int(request.querystring("ID"))
if idboolean(id) then

conn_data.begintrans
conn_data.execute("delete from class where class_id="&id)
if conn_data.errors.count > 0 then
conn_data.rollbacktrans
err.clear
conn_data.close
set conn_data=nothing
response.write errorback("有错，请刷新网页再提交，如果问题不能解决。请联系管理员。")
else
conn_data.committrans

	conn_data.begintrans
	conn_data.execute("delete from songs where songs_class_id="&int(id))
	if conn_data.number<>0 then
	conn_data.rollbacktrans
	err.clear
	conn_data.close
	set conn_data=nothing
	response.write errorback("有错，请刷新网页再提交，如果问题不能解决。请联系管理员。")
	else
	conn_data.committrans
	end if
    conn_data.close
    set conn_data=nothing
response.redirect "categories_Manager.asp"
end if
else
response.write errorback("有错，请刷新网页再提交，如果问题不能解决。请联系管理员。")
end if
%>