⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picon2.asp

📁 驴友格子(access)版v1.50 (中国驴友网开发http://www.hikers.cn) 后台管理:admin 管理员用户名:admin 管理员密码:admin (md5加密后
💻 ASP
字号:
<html>
<head>
<link href="../css/css.css" rel="stylesheet" type="text/css">
<title>添加文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEE9E1;
}
-->
</style></head>
<body>
<!--#include file="INC/UPLOAD.INC"-->
<%
set upload=new upload_F ''建立上传对象
 	'--------将日期转化成文件名--------
	function MakedownName()
		dim fname
	  	fname = now()
		fname = replace(fname,"-","")
	 	fname = replace(fname," ","") 
		fname = replace(fname,":","")
	  	fname = replace(fname,"PM","")
	  	fname = replace(fname,"AM","")
		fname = replace(fname,"上午","")
	  	fname = replace(fname,"下午","")
	  	fname = int(fname) + int((10-1+1)*Rnd + 1)
		MakedownName=fname
	end function 
formPath=upload.form("filepath")
iCount=0
for each formName in upload.file ''列出所有上传了的文件
 set file=upload.file(formName)  ''生成一个文件对象
 s="." & mid(file.FileName,InStrRev(file.FileName, ".")+1)
			if inStr(":.jpg:.gif:.jpeg:.jpe:.png:.bmp:.psd:.tif:.JPG:.GIF:.pbm:",":" & s & ":") = 0 then
	 			response.write "文件格式不正确 [ <a href=#3333 onclick=history.go(-1)>重新上传</a> ]"
				response.end
			end if

 if file.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
newname=MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)

  file.SaveAs Server.mappath(formPath&newname)   ''保存文件
  iCount=iCount+1
 else 
  response.write "未找到文件 &nbsp;&nbsp;<A HREF=javascript:history.back(1)>返回</A>"
  response.end
 end if
next
%>
<%
response.write "<script language='JavaScript'>parent.document.forms[0].G_photoshop.value='webshow/"& newname &"'</script>"
%><div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <TR> 
         <TD width="80" height="26"><font color="#FF0000">上传完毕:</font></TD>          
         <TD height="26"><%response.write "webshow/"&newname&" ("&cint(file.FileSize/1024)&"K)"%></TD>          
      </TR>
  </table>
</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -