<!--#include file="UserManageClass.asp" -->
<!--#include file="../Inc/UpLoad_Class.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<%
UserTrue=True
IF CBlogObj.IsFolder(Session("UserID"),Session("UpFileSize")) Then
	if request("Action")="ok" then
		Server.ScriptTimeOut=5000
		DIM request2,path,files,intCount,F_FileType,formName
		set request2=new UpLoadClass
		request2.FileType="gif/jpg/png/jpeg"
		request2.MaxSize=UserUpFileSize*1024
		path=CblogObj.GetUpLoadDir(Session("UserID"))&"/"
		request2.SavePath=path
		request2.open()
		intCount=0
		files=request2.form("strFile1")
		F_FileType=LCase(mid(files,instr(files,".")+1))
		files=path&files
		formName=request2.FileItem(1)
		select case request2.form(formName&"_Err")
			case -1:
			case 0:
			case 1:
				Response.Write("<a href='javascript:history.go(-1);'>Error:可能您上传的文件格式不正确或文件大小超出限制!</a>")
				response.end
			case 2:
				Response.Write("<a href='javascript:history.go(-1);'>Error:可能您上传的文件格式不正确或文件大小超出限制!</a>")
				response.end
			case 3:
				Response.Write("<a href='javascript:history.go(-1);'>Error:可能您上传的文件格式不正确或文件大小超出限制!</a>")
				response.end
		end select
		if F_FileType<>"" Then
			Response.Write("<SCRIPT>parent.input.photo.value='"&files&"'</SCRIPT>")
			Response.Write("<a href='Template_UpFile.asp'>图像上传成功</a><meta http-equiv='refresh' content='2;url=Template_UpFile.asp'>")
		Else
			Response.Write("错误：请选择您需要上传的文件!")
			Response.Write("<meta http-equiv='refresh' content='2;url=Template_UpFile.asp'>")
			Response.end
		End IF
		set request2=nothing
		response.end
	End If
	%>
<form action="?Action=ok" method="post" enctype="multipart/form-data" name="form1">
  <div align="left">
    <input name="strFile1" type="FILE" size="50">
    <input name="Submit" type="submit" value="上传">
  </div>
</form>
	<%
Else
	Response.write("对不起,您的上传空间已满!!")
End if
%>
</body>
</html>
<%set cblogobj=nothing%>