<!--#include FILE="../inc/config.asp"-->
<!--#include file="Admin_Check.asp" -->
<!--#include file="../Inc/UpLoad_Class.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="edit.CSS" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%
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/swf/wma/rar/zip/mp3/wmv/rmvb/ra/rm/mov/midi"
	request2.MaxSize=256000
	path=CityBlogDir&"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 in upload, please check the format and size!</a>")
			response.end
		case 2:
			Response.Write("<a href='javascript:history.go(-1);'>Error in upload, please check the format and size!</a>")
			response.end
		case 3:
			Response.Write("<a href='javascript:history.go(-1);'>Error in upload, please check the format and size!</a>")
			response.end
	end select
	if F_FileType="gif" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[img]"&files&"[/img]'</SCRIPT>")
	elseif F_FileType="jpg" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[img]"&files&"[/img]'</SCRIPT>")
	elseif F_FileType="jpeg" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[img]"&files&"[/img]'</SCRIPT>")
	elseif F_FileType="png" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[img]"&files&"[/img]'</SCRIPT>")
	elseif  F_FileType="swf" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[swf]"&files&"[/swf]'</SCRIPT>")
	elseif F_FileType="wma" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[wma]"&files&"[/wma]'</SCRIPT>")
	elseif F_FileType="mp3" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[wma]"&files&"[/wma]'</SCRIPT>")
	elseif F_FileType="midi" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[mid]"&files&"[/mid]'</SCRIPT>")
	elseif F_FileType="avi" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[wmv]"&files&"[/wmv]'</SCRIPT>")
	elseif F_FileType="wmv" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[wmv]"&files&"[/wmv]'</SCRIPT>")
	elseif F_FileType="ra" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[ra]"&files&"[/ra]'</SCRIPT>")
	elseif F_FileType="rm" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[rm]"&files&"[/rm]'</SCRIPT>")
	elseif F_FileType="rmvb" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[rm]"&files&"[/rm]'</SCRIPT>")
	elseif F_FileType="mov" then
		Response.Write("<SCRIPT>parent.input.message.value+='\n[qt]"&files&"[/qt]'</SCRIPT>")
	else
		Response.Write("<SCRIPT>parent.input.message.value+='\n[down="&files&"]点击下载此文件[/down]'</SCRIPT>")
	End if
	Response.Write("<SCRIPT>parent.input.message.focus()</SCRIPT><a href='User_UpFile_Add.asp'>文件上传成功，请返回继续上传</a><meta http-equiv='refresh' content='4;url=User_UpFile_Add.asp'>")
	set request2=nothing
	response.end
End If
%>
<form action="User_UpFile_Add.asp?Action=ok" method="post" enctype="multipart/form-data" name="form1">
  <input name="strFile1" type="FILE" class="tx1" size="30">
  <input type="submit" name="Submit" value="UpLoad">
</form>
</body>
</html>
