<%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
request2.Open()
'判断 用户是否开通功能
H_class=Replace(Replace(Left(request2.Form("H_class"),10),"<","["),">","]")
H_name=Replace(Replace(Left(request2.Form("H_name"),20),"<","["),">","]")
H_txt=Replace(Replace(Left(request2.Form("H_txt"),1000),"<","["),">","]")
H_key=Replace(Replace(Left(request2.Form("H_key"),1000),"<","["),">","]")
if H_key="" then
response.Write "<script >alert('提示：\n\n对不起，请选择是否推荐！...');history.back(-1);</script>"
response.End()
end if
if H_class="" then
H_class=0
end if
request2.FileType="jpg/gif/bmp/png"
request2.MaxSize=1536000
request2.SavePath="../UpLoadUC/"
if request2.Save("H_pic",0) then
	H_pic=request2.Form("H_pic")
end if
if H_pic="" then
response.Write "<script >alert('上传图片不能为空！...');history.back(-1);</script>"
response.End()
end if
''开始写入数据
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_PIC"
	rs.open sql,conn,1,3
	rs.addnew
	rs("UID")=UID
	rs("H_class")=H_class
	rs("H_name")=H_name
	rs("H_pic")=H_pic
	rs("H_txt")=H_txt
	rs("H_key")=H_key
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n添加成功,立即返回...');location.href='pic_master.asp';</script>"
	response.End()
%>