<!--#include file="SqlIn.Asp"-->
<!--#include file="inc/index_conn.asp"-->
<%

  Sub DeleNews(NewID)
   Dim Rs,FileName
    Set Rs= Conn.Execute("select * from admin_jp Where jp_id="&NewID)
	If Rs("jp_img")<>"" then
	   FileName = Split(Rs("jp_img"),"|")
	   Dim l
	   For l = 0 to Ubound(FileName)
	     Call DoDelFile(FileName(l))
	   Next
	 end if
	 
	 Conn.Execute("delete from admin_jp Where jp_id="&NewID)
	 rs.close
	 set rs=nothing
End Sub

Sub DoDelFile(sPathFile)
	On Error Resume Next
	Dim oFSO
	Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
	oFSO.DeleteFile(Server.MapPath(sPathFile))
	Set oFSO = Nothing
End Sub
%>