📄 uploaddocok.asp
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"--><!--#include file="../HXINCLUDE/HX_UPANNEX.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet type=text/css href="../HXinclude/HX_Style.css">
<body topmargin="8" leftmargin="0" bottommargin="0">
<%
dim uploadsuc,Forumupload,uploadfiletype,pos,file_name,file_ext,file_size
set upload=new upload_5xSoft ''建立上传对象
filepath=upload.form("filepath") '上传文件目录
FolderId=upload.form("FolderId")
set file=upload.file("doc")
fileExt=lcase(right(file.filename,4))
uploadsuc=false
Forumupload=split("html,htm,asp,aspx,asa,asax,ascx,ashx,asmx,axd,cdx,cer,config,cs,csproj,licx,rem,resx,shtml,shtm,soap,stm,vb,vbproj,webinfo,cgi,pl,php,phtml,php3",",")
for i=0 to ubound(Forumupload)
if fileEXT="."&trim(Forumupload(i)) then
uploadsuc=false
exit for
else
uploadsuc=true
end if
next
if uploadsuc=false then
response.write "文件格式不正确 [ <a href='javascript:history.go(-1)'>重新上传</a> ]"
response.end
end if
if file.filesize>0 then
pos=instrRev(file.FileName,".")
if pos=0 then
file_name=file.FileName
file_ext=""
else
file_name=mid(file.FileName,1,pos-1)
file_ext =mid(file.FileName,pos+1,len(file.FileName)-1)
end if
file_size=file.filesize
ColumnName="":Tablename="HX_NetDiskFolderOrFile":Orderby=""
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
rs.addnew:rs("WS_NetDiskFolderName")=file_name:rs("WS_NetDiskFolderDate")=now:rs("WS_NetDiskFolderEXT")=file_ext:rs("WS_FileID")=FolderId:rs("WS_NetDiskEmpId")=loginuid:rs.update
FileId=rs("WS_FDID"):WS_S.HX_RSClose rs
if FileId<>"" then file.SaveAs Server.mappath(filepath&FileId&"."&file_ext)
conn.execute("update HX_NetDiskFolderOrFile set WS_NetDiskFileNum=WS_NetDiskFileNum+1 where WS_FDID="&FolderId)
response.write("<script>alert('文件上传成功!');window.parent.location='netdisk.asp?action=ViewFolder&FolderId="&FolderId&"';</script>")
end if
set file=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -