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

📄 upload2_pic.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<HTML>
<HEAD>
<TITLE>上传图片</TITLE>
<META content=zh-cn http-equiv=Content-Language>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<% response.buffer=true %>
<%
	const page_level=1
%>
<style type="text/css">
 td {font-size: 9pt}
 body {font-size: 9pt}
 button {width:5em}
</style>
</HEAD>
<BODY bgColor=#f6f6f6 leftMargin=0 topMargin=0>
<table border=0 cellpadding=0 cellspacing=0 height=120 
width=100% >
  <tr> 
    <td rowspan=4 width=100% align="center"> 
      <!--#include file="upload.asp"-->
      <%
	dim ID
	dim upload,path,file1,filename1,file2,filename2
	set upload=new upload_5xSoft ''建立上传对象
	'图片上传'
	formPath="/upfiles/"'上传新闻图片目录 
	'开始上传小图片
		set file1=upload.file("image")
		filename1=year(now())&"-"&month(now())&"-"&day(now())&"_"&hour(now())&"-"&Minute(now())&"-"&Second(now()) & right(file1.FileName,4)
		if file1.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
			file1.SaveAs Server.mappath(formPath&filename1)   ''保存文件
		'上传小图片成功
		path1= "/upfiles/"& filename1
		else
			response.write "请选择要插入的图片文件"
		end if

	'开始上传大图片
		set file2=upload.file("bigimage")
		filename2="big-" & year(now())&"-"&month(now())&"-"&day(now())&"_"&hour(now())&"-"&Minute(now())&"-"&Second(now()) & right(file2.FileName,4)
		if file2.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
			file2.SaveAs Server.mappath(formPath&filename2)   ''保存文件
		'上传大图片成功
		path2= "/upfiles/"& filename2
		end if

	'session
	session("path1")=path1
	session("wordpath1")=path1
	session("path2")=path2

%>
      <p>图片上传成功.
		<br>图片路径为:<br>
		<%
			response.write "插入图片的路径为:"&path1&"<br>"
		if path2<>"" then
			response.write "点击放大的图片路径为:"&path2&"<br>"
		end if
		%>
		<br>一秒钟后自动返回图片路径.
        <script>
			top.returnValue="<%=path1%>||<%=path2%>";
			top.setTimeout("window.close();",1000);
		</script>
<%
		set file1=nothing        
		set file2=nothing
%>
    </td>
  </tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 height=32 width="100%">
  <tbody> 
  <tr height=2> 
    <td bgcolor=#cccccc colspan=2><img alt="" height=2 src="" width=1></td>
  </tr>
  </tbody> 
</table>
</BODY>
</HTML>
 

⌨️ 快捷键说明

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