📄 picup_do.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.CodePage=65001%>
<%Response.Charset="UTF-8"%>
<!--#include file="getHeader.asp"-->
<!--#include file="adminCheck.asp"-->
<!--#include file="upload.asp"-->
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> 上传结果 </title>
<meta http-equiv="Content-Type" content="<%=header%>; charset=utf-8" />
<meta name="Author" content="微普科技http://www.wiipu.com"/>
<link rel="stylesheet" href="admin.css" type="text/css"/>
</head>
<%
dim FoundErr
FoundErr=true
Dim upfile
set upfile=new upfile_class
upfile.GetData(204800)
if upfile.err > 0 then
select case upfile.err
case 1
response.redirect "error.asp?err=1701"
response.end
case 2
response.redirect "error.asp?err=1702"
response.end
end select
response.end
end if
Dim i,formName,ofile,fileExt,fileSize,UpfileTypes,UpFileType,ranNum,savePath,filename,filenames,msg
for each formName in upfile.file
set ofile=upfile.file(formName)
if ofile.filesize<100 then
response.redirect "error.asp?err=1701"
response.end
end if
if ofile.filesize>20480 then
response.redirect "error.asp?err=1702"
response.end
end if
fileExt=lcase(ofile.FileExt)
fileSize=ofile.filesize
UpFileTypes="gif|jpg|png|bmp"
UpFileType=split(UpFileTypes,"|")
for i=0 to ubound(UpFileType)
if fileEXT=trim(UpFileType(i)) then
FoundErr=false
exit for
else
FoundErr=true
end if
next
if FoundErr<>true then
'randomize
'ranNum=int(900*rnd)+100
savePath="../images/"
filename="logo."&fileExt
filenames=savePath&filename
ofile.SaveToFile Server.mappath(filenames)
msg="上传成功!请点击下面的链接返回。<br/>"
else
response.redirect "error.asp?err=1703"
response.end
end if
next
%>
<body>
<p class="red"><%=msg%></p>
<br/>
<%
response.write "【<a href='configue.asp?up=1'>返回留言板设置</a>】"
session("logo")=Replace(filenames,"../","")
%>
<hr/>
<br/>
Copyright(c)WiiPu微普科技
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -