<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Server.ScriptTimeOut=5000
dbs="../"
%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<!--#include FILE="../inc/UpLoadClass.asp"-->
<!--#include file="../inc/Code2Info.en.asp"-->
<%
dim request2 
'建立上传对象
set request2=New UpLoadClass
'设置为手动保存模式
request2.AutoSave=2
'打开对象，默认为 gb2312 字符集，故没有显示设置
request2.Open()
'对象打开结束
H_name=Replace(Replace(Left(request2.Form("H_name"),100),"<","["),">","]")
H_thread=Replace(Replace(Left(request2.Form("H_thread"),100),"<","["),">","]")
H_UI=Replace(Replace(Left(request2.Form("H_UI"),3),"<","["),">","]")
if H_name="" then
response.Write "<script >alert('提示：\n\n对不起，请填写模板名称！...');history.back(-1);</script>"
response.End()
end if
if H_thread="" then
response.Write "<script >alert('提示：\n\n对不起，请填写模板所在文件夹！...');history.back(-1);</script>"
response.End()
end if
if H_UI="" then
response.Write "<script >alert('提示：\n\n对不起，请选择模板性质！...');history.back(-1);</script>"
response.End()
end if
'图片上传写入
request2.FileType="gif/jpg"
request2.MaxSize=153600000
request2.SavePath="../thread/temp/"
if request2.Save("H_pic",0) then
	H_pic=request2.Form("H_pic")
end if
if H_pic="" then
response.Write "<script >alert('提示：\n\n对不起，上传模板缩略图！...');history.back(-1);</script>"
response.End()
end if
''开始写入数据
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_templet"
	rs.open sql,conn,1,3
	rs.addnew
	rs("H_name")=H_name
	rs("H_thread")=H_thread
	rs("H_PIC")=H_PIC
	rs("H_UI")=H_UI
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n登记成功,立即返回...');location.href='templet_master.asp';</script>"
	response.End()
	'释放上传对象
	set request2=nothing
%>