📄 admin_nupfile.asp
字号:
<!--#include file = include.asp -->
<!--#include FILE="Inc/upload.inc"-->
<!--#include FILE="Inc/config.asp"-->
<!--#include file = admin_CheckMana.asp-->
<html>
<head>
<title>文件上传</title>
</head>
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯站点管理系统
'当前版本:2004.I.0225
'最新更新:2004.2.10
'=========================================================
'Copyright (C) 2002-2004 cooin.com. All rights reserved.
'网站: http://www.cooin.com Foosun.net
'程序制作:轻风云(QQ:655071)
'Email:skeen@cooin.com,skeen@Foosun.net
'论坛支持:风讯在线论坛(http://bbs.cooin.com http://bbs.foosun.net)
'=========================================================
dim upload,file,formName,formPath,iCount,fileext,filename
Domain=Request.ServerVariables("SERVER_NAME")
soFilePath=Request.ServerVariables("PATH_INFO")
soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
totoln=len(soFilePath)
soFilePath=lcase(left(soFilePath,totoln-1))
soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
sowinpath="http://"&Domain&soFilePath
set upload=new upload_5xSoft
formPath="../Files/upfile/"
iCount=0
iCount=0
for each formName in upload.file ''列出所有上传了的文件
month1=month(now)
if Month1<10 then Month1="0"&Month1
day1=day(now)
if day1<10 then day1="0"&day1
hour1=hour(now)
if hour1<10 then hour1="0"&hour1
minute1=minute(now)
if minute1<10 then minute1="0"&minute1
second1=second(now)
if second1<10 then second1="0"&second1
FileName=Year(now)&Month1&Day1&Hour1&Minute1&Second1&"-"&iCount
set file=upload.file(formName) ''生成一个文件对象
set file=upload.file(formName)
FileExt = lcase(right(file.FileName,3))
set rs = server.createobject("adodb.recordset")
sql = "select ConfineFile,FileSize from Config"
rs.open sql,conn,1,1
if file.FileSize > rs("FileSize")*1000 then
response.write("<center><font size=2>上传文件太大。请<a href=""javascript:history.back();"">返回</a></font></center>")
response.end
end if
FileNum=split(rs("ConfineFile"),",")
FindFile=false
for i=1 to UBound(FileNUM)
if FileExt=lcase(trim(FileNum(i))) then
FindFile=true
exit for
end if
next
if FileExt="asp" or FileExt="exe" then FindFile=false
if FindFile=false then
response.write("<center><font size=2>上传文件类型错误。请<a href=""javascript:history.back();"">返回</a></font></center>")
response.end
end if
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath(formPath&FileName&"."&fileext) ''保存文件
response.write("文件名:<a href="&sowinpath&"Files/upfile/"&FileName&"."&fileext&" target=_blank>"&sowinpath&"Files/upfile/"&FileName&"."&fileext&"</a><br>[ <a href=# onclick=""Addpic('"&sowinpath&"Files/upfile/"&FileName&"."&fileext&"')""><font color=#ff0000>点击添加到编辑器中</font></a> ]<br>")
iCount=iCount+1
end if
set file=nothing
next
response.write("<br><br><center><a href=""javascript:history.back();""><font color=#0000ff>[ 继续上传文件 ]</font></a></center>")
set upload=nothing
rs.close
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -