
<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%call ling()
Call Head()
call saycardd("文章删除结果")

dim rs,sql,id
   id=request.QueryString("id")
  if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if
   classid=int(request.QueryString("classid"))
   set rs=server.CreateObject ("ADODB.Recordset") 
rs.open "Select * from sms where id="&id ,conn,2,3  
If Not rs.eof	Then

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  
Response.Write "文章删除成功!" 
else
Response.Write "文章删除失败!可能已删除或者文章不存在" 
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<br/>----------<br/>
<a href="adminsmscl.asp?sid=<%=sid%>&amp;id=<%=classid%>&amp;saytk=<%=saytk%>">[文章列表]</a><br/>
<a href="wzclass.asp?sid=<%=sid%>&amp;id=<%=id%>&amp;saytk=<%=saytk%>">[文章分类]</a><br/>

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