
<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()
call saycarda("文件分类修改")%>

<%
    dim rs,sql,lid
    lid=request.querystring("lid")
if lid="" or IsNumeric(lid)=False then
  Call Error("ID无效！")
  end if

    set rs=server.CreateObject ("ADODB.Recordset") 
rs.open"Select * from xzlist Where id="&lid,conn,1,1

if not rs.eof then
rs.close
set rs=nothing
  Call Error("请先删除下级子分类！")
  end if
rs.close
set rs=nothing

    set rs=server.CreateObject ("ADODB.Recordset") 
sql="Select * from xzclass where id="&lid
rs.open sql,conn,2,3  
if not (rs.bof and rs.eof) then
rs.delete  
rs.close
set rs=nothing
Response.Write "文件类别(包含类别中的文件)删除成功!"     
else
Response.Write "文件类别删除失败!类别不存在或者已删除!"  
%>
<%end if%>
<br/>----------<br/>
<a href='wjclass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件分类]</a><br/>

<a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%call headsay()%>