|
<!--#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="#FFFFF6" leftmargin="0" topmargin="0">
<%
UserTrue=True
IF CBlogObj.IsFolder(Session("UserID")) 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/BMP"
request2.MaxSize=UserUpFileSize*1024
path=CblogObj.GetDir(Session("UserID"))&"/UpLoadFile/"
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.pic.innerHTML='<br><img src="&files&" border=0>'+parent.pic.innerHTML</SCRIPT>")
Response.Write("<SCRIPT>parent.input.message.value+='\n'</SCRIPT>")
Response.Write("<SCRIPT>parent.input.photo.value='"&files&"'</SCRIPT>")
Response.Write("<SCRIPT>parent.input.message.focus()</SCRIPT><a href='Photo_UpFile.asp'>图片上传成功,请返回继续上传</a><meta http-equiv='refresh' content='2;url=Photo_UpFile.asp'>")
Else
Response.Write("错误:请选择您需要上传的文件!")
Response.Write("<meta http-equiv='refresh' content='2;url=Photo_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">
<input name="strFile1" type="FILE" size="18">
<input type="submit" name="Submit" value="上传(JPG/JPGE/GIF/PNG/BMP)">
</form>
<%
Else
Response.write("对不起,您的上传空间已满!!")
End if
%>
</body>
</html>
<%set cblogobj=nothing%> |
|