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

📄 viewer.asp

📁 以前做的一个j2ee的项目
💻 ASP
字号:
<!-- #include file="../../include/pop_setup.asp" -->
<!-- #include file="../../include/pop_function.asp" -->
<!-- #include file="../../include/db_function.asp" -->
<!-- #include file="../../include/authentication.asp" -->
<!-- #include file="htmlarea_function.asp" -->
<%
Path=request("Path")
FullPath=EmployeeBaseRoot &"/"& Path

if Path<>"" then

	Set fs = CreateObject("Scripting.FileSystemObject")
	Set ff=fs.GetFile(server.MapPath(FullPath))
	intFileSize=ff.Size
	
	if intFileSize<1024 then intFileSize=1024
	intFileSize=intFileSize\1000
	
	Set Img=LoadPicture(server.MapPath(FullPath))
	srcWidth=Img.width
	srcHeight=Img.Height
	
	if srcWidth>=160 or srcHeight>=160 then
		
		dx=160/srcWidth
		dy=160/srcHeight
		
		if dx<dy then
			ratio=dx
		else
			ratio=dy
		end if
		
		width=round(srcWidth*ratio)
		height=round(srcHeight*ratio)
	
	end if
	
	Set Img=nothing
	
	Set ff=nothing
	Set fs=nothing

end if

%>

<html>
<head>
<title><%=htmlencode(DEF_SiteName)%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../css/default.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%if path<>"" then%>
<table width="108%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td bgcolor="#D9D9D9" align="center">&nbsp;<b><%=Path%></b><br>
      <%=intFileSize%>KB( <%=width%> X <%=height%>)</td>
  </tr>
  <tr> 
    <td align="center">&nbsp;<img src="<%=FullPath%>" width="<%=width%>" height="<%=height%>"></td>
  </tr>
</table>


<script language="javascript">

	parent.txtFileName.value="<%=FixJs(DEF_SiteUrl &"file_picture_uploads/"& Session(Def_MasterCookies &"UserId") &"/"&  Path)%>";
	
</script>

<%else%>
<table width="108%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="126" align="center">您还没有选择任何图片。</td>
  </tr>
</table>
<%end if%>


</body>
</html>

⌨️ 快捷键说明

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