📄 browse.aspx
字号:
<%@ Page language="c#" AutoEventWireup="false" validateRequest="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>FCKeditor - Image Browser</TITLE><!-- * FCKeditor - The text editor for internet * Copyright (C) 2003 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License * (http://www.opensource.org/licenses/lgpl-license.php) * * For further information go to http://www.fredck.com/FCKeditor/ * or contact fckeditor@fredck.com. * * browse.html: Sample server images browser for the editor. * * Authors: * Frederico Caldeira Knabben (fckeditor@fredck.com)-->
<META content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK rel="stylesheet" type="text/css" href="../css/fck_dialog.css">
<SCRIPT language="javascript">
//var sImagesPath = "<%="/upfiles/"%>" ;
var sActiveImage = "" ;
function getImage(imageName)
{
sActiveImage = sImagesPath + imageName ;
alert(sActiveImage);
imgPreview.src = sActiveImage ;
}
function ok()
{
window.setImage(sActiveImage) ;
window.close() ;
}
</SCRIPT>
</HEAD>
<BODY>
<TABLE height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR>
<TD height="100%">
<TABLE height="100%" cellSpacing="5" cellPadding="0" width="100%" border="0">
<TR>
<TD align="center" width="50%" height="80%">
<div class="ImagePreviewArea">
<%
if(!this.IsPostBack)
{
try
{
string strPath = (HttpContext.Current.Request.PhysicalApplicationPath + "\\upfiles\\");
//Response.Write("<script language='javascript'>alert('"+strPath+"')</script>");
string strTemp = "";
string[] strJpg = System.IO.Directory.GetFiles(strPath,"*.jpg");
string[] strGif = System.IO.Directory.GetFiles(strPath,"*.gif");
string[] strBmp = System.IO.Directory.GetFiles(strPath,"*.bmp");
int intFileCount = strJpg.Length + strGif.Length + strBmp.Length;
string[] strFiles = new string[intFileCount];
strJpg.CopyTo(strFiles,0);
strGif.CopyTo(strFiles,strJpg.Length);
strBmp.CopyTo(strFiles,strJpg.Length + strGif.Length);
Response.Write("<table>");
int i = 0;
for( i = 0 ; i < intFileCount ;i++)
{
strTemp = strFiles[i].Substring(strFiles[i].LastIndexOf("\\")+1,strFiles[i].Length - strFiles[i].LastIndexOf("\\") -1);
Response.Write("<tr><td><A href=\"javascript:getImage('" + strTemp + "');\">" + strTemp + "</A></td></tR>");
}
}
catch(Exception ep)
{
Response.Write("<tr><td>"+ep.Message+"</td></tr>");
}
Response.Write("</table border=1>");
}
%>
</div>
<FONT face="宋体"></FONT>
</TD> <!--<td> Select the image to load<BR> <BR> <A href="javascript:getImage('nature');">Nature</A><BR> <A href="javascript:getImage('money');">Money</A><BR> <A href="javascript:getImage('pen');">Pen</A><BR> <A href="javascript:getImage('spanner');">Spanner</A><BR> <A href="javascript:getImage('techcable');">Tech Cable</A><BR> <A href="javascript:getImage('techpcb');">Tech PCB</A> </TD> -->
<TD align="center" width="50%">
<div class="ImagePreviewArea">
<IMG id="imgPreview" src="../../upfiles/DefaultNews.jpg">
</div>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD vAlign="bottom" align="center"><INPUT style="WIDTH: 80px" onclick=javascript:ok(); type="button" value="OK">
<INPUT style="WIDTH: 80px" onclick="window.close();" type="button" value="Cancel"><BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -