
<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%call ling()
Call Head
call saycardd("文章分类删除")
    dim rs,sql,id
    id=request.querystring("id")
    set rs=server.CreateObject ("ADODB.Recordset") 
sql="Select * from wzclass where classid="&id
rs.open sql,conn,2,3  
if not (rs.bof and rs.eof) then
rs.delete  
rs.close
set rs=nothing
   set rs=server.CreateObject ("ADODB.Recordset") 
rs.open "Select * from sms Where CLASSID="&ID,conn,2,3  
If Not rs.eof Then
Do until RS.Eof
if rs("pic")<>"" then
Set fso = server.CreateObject("Scripting.FileSystemObject")
	IF (fso.FileExists(Server.MapPath(replace(rs("pic"),"http://"&request.ServerVariables("Server_NAME")&"","")))) Then
	Set delfile = fso.GetFile(Server.MapPath(replace(rs("pic"),"http://"&request.ServerVariables("Server_NAME")&"","")))
	delfile.Delete
	set delfile=nothing
	end if
set fso=nothing
	end if

rs.delete
rs.update  
rs.movenext
loop
end if
rs.close
set rs=nothing

Response.Write "文章类别(包含类别中的文章)删除成功!"     
else
Response.Write "栏目类别删除失败!栏目不存在或者已删除!"  
%>
<%end if%>
<br/>----------<br/>
<a href='wzclass.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>[文章分类]</a><br/>
<a href="../index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[后台管理]</a>
<%response.write""
call head3()%>