<%@LANGUAGE="VBSCRIPT"%>

<!--#include file="Connections/conn_news.asp" -->
<!--#include file="yns_config.asp" -->
<!--#include file="yns_chklogin.asp" -->
<% chk_user_login(3) %>
<!--#include file="yns_chkerror.asp" -->
<%

if (request.querystring("t_id") <> "") then
Command1__varid = request.querystring("t_id")
else
response.Write yns_err_null
response.End()
end if

%>
<%

if(request.querystring("t_id") <> "") then Command2__mmid = request.querystring("t_id")

%>
<%

if(request.querystring("t_id") <> "") then Command3__varid = request.querystring("t_id")

%>
<%

if(request.querystring("t_id") <> "") then Command4__mmid = request.querystring("t_id")

%>
<%
if request.QueryString("t_dir") ="" then
response.Write yns_err_null
response.End()
end if
%>
<%
   dim fso
   dim f_path
   f_path = server.MapPath(request.querystring("t_dir"))
   Set fso = CreateObject("Scripting.FileSystemObject")
   If fso.FolderExists(f_path) then
   fso.DeleteFolder(f_path)
   else
%>
<script language=javascript>
alert( "删除文件夹失败,文件夹不存在！"  );
location.href = "javascript:history.back()"
</script>
<%
response.End()
end if
Set fso = nothing
%>
<%

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_conn_news_STRING
Command1.CommandText = "DELETE FROM t_type  WHERE t_id = " + Replace(Command1__varid, "'", "''") + " "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

%>
<%

set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = MM_conn_news_STRING
Command2.CommandText = "DELETE FROM t_type_son  WHERE ts_pid = " + Replace(Command2__mmid, "'", "''") + ""
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()

%>
<%

set Command3 = Server.CreateObject("ADODB.Command")
Command3.ActiveConnection = MM_conn_news_STRING
Command3.CommandText = "DELETE FROM t_news  WHERE n_tid = " + Replace(Command3__varid, "'", "''") + " "
Command3.CommandType = 1
Command3.CommandTimeout = 0
Command3.Prepared = true
Command3.Execute()

%>
<%

set Command4 = Server.CreateObject("ADODB.Command")
Command4.ActiveConnection = MM_conn_news_STRING
Command4.CommandText = "DELETE FROM t_review  WHERE r_tid = " + Replace(Command4__mmid, "'", "''") + ""
Command4.CommandType = 1
Command4.CommandTimeout = 0
Command4.Prepared = true
Command4.Execute()

%>
<html>
<head>
<meta http-equiv="Refresh" content="1 url=yns_type.asp">
<title>湖南百润医药有限公司-------康曼德www.hnicp.com</title>
</head>

<body>
删除成功,等待返回...
</body>
</html>