📄 saveupload.asp
字号:
<%
if session("admin")<>"on" then
Response.Redirect"login.asp"
end if
%>
<!--#include file="upload_5xsoft.inc" -->
<!--#include file="config.asp" -->
<style type="text/css">
<!--
body,td,th {
font-size: 9pt;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
a:active {
color: #000000;
}
-->
</style><body bgcolor="<%=bgcolor%>" leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<script language="Javascript">
function minipic(smileface)
{
window.opener.document.form.minipic.value=smileface;
}
function pic(smileface)
{
window.opener.document.form.pic.value=smileface;
}
function pic2(smileface)
{
window.opener.document.form.logo.value=smileface;
}
</script>
<%
set upload=new upload_5xSoft
set file=upload.file("file1")
formPath="upload/"
alowfile="jpgjpeggifbmp"
fileExt=mid(file.filename,InStrRev(file.filename,".")+1)
if (file.filesize=0 or (InStrRev(alowfile,fileExt))=0 ) then
'fileExt=lcase(right(file.filename,3))
'if fileExt="asp" then
Response.Write"文件类型非法 或 没有选择文件"
Response.Write"<a href='upload.asp' Onclick=""history.go(-1)"">返回</a>"
'end if
else
randomize
ranNum=int(9000000*rnd)+10000
filename=formPath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&fileExt
if file.FileSize>0 then
file.SaveAs Server.mappath(FileName)
end if
response.write "图片上传成功,[<a href='upload.asp'>返回继续上传</a>]<br>图片是:<a href=Javascript:minipic('"&filename&"');>缩略图</a> <a href=Javascript:pic('"&filename&"');>放大图</a> <a href=Javascript:pic2('"&filename&"');><font color='#666633'>网站Logo</font></a>"
Response.write "<br><br><input type='button' value='关闭' OnClick=""window.close(this)"">"
end if%>
</td>
</tr>
</table>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -