<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!--#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.form("t_name") <> "") then
Command1__mmname = request.form("t_name")
else
response.Write yns_err_null
response.End()
end if

if (request.form("t_dir") <> "") then
Command1__mmdir = request.form("t_dir")
else
response.Write yns_err_null
response.End()
end if

%>
<%
dim f_path
f_path= server.MapPath(request.Form("t_dir"))
'response.Write f_path
'response.End()
Set fso = CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists(f_path) then
Fso.Createfolder(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 = "INSERT INTO t_type (t_name, t_dir)  VALUES ('" + Replace(Command1__mmname, "'", "''") + "','" + Replace(Command1__mmdir, "'", "''") + "') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

%>

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

<body>
创建成功, 等待返回...
</body>
</html>