<!--#include file="admin_start.asp"-->
<%
dim fso
dim file_t
dim file_source
file_source=trim(request.form("object_content"))
File_source=replace(File_source,"{$=","<%")
File_source=replace(File_source,"{$","<%=")
File_source=replace(File_source,"$}","%\>")
File_source=replace(File_source,"&lt;","<")
File_source=replace(File_source,"&gt;",">")
template=trim(request("template"))

Set fso = CreateObject("Scripting.FileSystemObject")
file_t=Server.MapPath("../object/"&template&".asp")

If fso.FileExists(file_t) then fso.DeleteFile file_t
Set txt = fso.OpenTextFile(file_t, 8, True)
txt.write File_source
txt.Close
set txt=nothing
'fso.close
set fso=nothing
MySys.error.info="模版源码编辑成功！"
MySys.error.location="admin/admin_object_edit.asp?id="&request("id")&"&open=1"
MySys.error.suc
%>
<!--#include file="admin_end.asp"-->