<%Server.ScriptTimeOut=5000%>
<style type="text/css">
<!--
body { margin-top:5px;font-size: 12px;background-color: #f3f9fb;}
-->
</style>
<BODY leftMargin=0 topMargin=0>
<!--#include file="QvodCms_Conn.asp"-->
<!--#include FILE="QvodCms_UpClass.asp"-->
<%
Call Chkhttp()
Dim request2,Up_dir,t_width,t_height,putname
If IsFolder("../"&AdminId(13))=False Then Call CreateFolder("../"&AdminId(13))
Up_dir=AdminId(13)&QvodCms_UpDir(Now()):If IsFolder("../"&Up_dir)=False Then Call CreateFolder("../"&Up_dir) '检测文件夹是否存在
Set request2=new UpLoadClass
	request2.FileType="jpg/bmp/gif/png"
	request2.MaxSize=10240*1024
	request2.SavePath="../"&Up_dir
	request2.Open()
	t_width=request2.Form("t_width")'图片宽度
    t_height=request2.Form("t_height")'图片高度
	putname=request2.Form("putname")
	If request2.Error =0 then
	    if t_width<>"" or putname="newspic" then
	    Response.write "上传成功!&nbsp;[<a href='QvodCms_Upfile.Html.asp?name="&putname&"'>重新上传</a>]&nbsp;[<a href='../"&Up_Dir&request2.Form("strPhoto")&"' target='_blank'>查看</a>]"
		else
		Response.write "上传成功!&nbsp;[<a href='../"&Up_Dir&request2.Form("strPhoto")&"' target='_blank'>查看</a>]"
		end if
		Response.Write "<script>parent.form1."&putname&".value='"&Up_Dir&request2.Form("strPhoto")&"';</script>"
		If putname="data_bigpic" or putname="data_smallpic" Then
		 If Cint(AdminId(5))=1 Then Call ImgAspJpeg("../"&Up_dir&request2.Form("strPhoto"),newpic,t_width,t_height)
		End If
	Else
	    Response.Write "<span style=""font-size:12px;color:red"">上传异常 <a href=# onclick=history.go(-1)>重新上传</a></span>"
	End if
Set request2=nothing
%>
</BODY>
</HTML>