<%@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

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

%>

<%
   dim fso
   dim f_path
   dim f_path1
   f_path = server.MapPath(request.Form("t_dir"))
Set fso = CreateObject("Scripting.FileSystemObject")
if request.Form("t_dir1") <> "" then
f_path1 = server.MapPath(request.Form("t_dir1"))
if  f_path1 <> f_path then
   If not fso.FolderExists(f_path) then
       if not fso.FolderExists(f_path1) then
	   fso.CreateFolder (f_path1)
	   end if
   fso.MoveFolder f_path1, f_path
   else
%>
<script language=javascript>
alert( "操作失败,文件夹已经存 !"  );
location.href = "javascript:history.back()"
</script>
<%
   response.End()
   end if
else
   If not fso.FolderExists(f_path) then
   fso.CreateFolder(f_path)
   end if
end if
else
   If not fso.FolderExists(f_path) then
   fso.CreateFolder(f_path)
   end if
end if
Set fso = nothing
%>
<%

set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_conn_news_STRING
Command1.CommandText = "UPDATE t_type  SET t_name = '" + Replace(Command1__mmname, "'", "''") + "',t_dir = '" + Replace(Command1__mmdir, "'", "''") + "' WHERE t_id = " + Replace(Command1__mmid, "'", "''") + " "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

%>


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

<body>
更新成功, 等待返回...
</body>
</html>