You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/HtmlEditor/UploadPic.aspx

134 lines
5.5 KiB
Plaintext

2 years ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UploadPic.aspx.cs" Inherits="DSWeb.HtmlEditor.UploadPic" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>文件上传</title>
<link href="../Styles/admin_Default.css" media="all" rel="stylesheet" type="text/css" />
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function format(type, para){
//var f = window.frames["HtmlEditor"];
var f = window.opener.frames["HtmlEditor"];
var gIsIE = document.all;
//alert(f);
var sAlert = "";
if(!gIsIE){
switch(type){
case "Cut":
sAlert = "你的浏览器安全设置不允许编辑器自动执行剪切操作,请使用键盘快捷键(Ctrl+X)来完成";
break;
case "Copy":
sAlert = "你的浏览器安全设置不允许编辑器自动执行拷贝操作,请使用键盘快捷键(Ctrl+C)来完成";
break;
case "Paste":
sAlert = "你的浏览器安全设置不允许编辑器自动执行粘贴操作,请使用键盘快捷键(Ctrl+V)来完成";
break;
}
}
if(sAlert != ""){
alert(sAlert);
return;
}
f.focus();
if(!para)
if(gIsIE)
f.document.execCommand(type)
else
f.document.execCommand(type,false,false)
else
f.document.execCommand(type,false,"../../"+para)
f.focus();
window.close();
}
//-->
</SCRIPT>
<body>
<form id="form1" runat="server">
<table cellpadding="0" cellspacing="0" >
<tr>
<td align="center">
<div class="mframe">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="tl">
</td>
<td class="tm">
<span class="tt">上传文件</span></td>
<td class="tr">
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<asp:Panel runat="server" ID="panel1" >
<table cellpadding="3" cellspacing="3" >
<tr>
<td align="center" colspan="2">
支持文件类型JPG,JPEG,GIF</td>
</tr>
<tr>
<td align="center" class="style2">
选择文件:</td>
<td class="style3">
<input id="File1" runat="server" style="width: 292px" type="file" /></td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="btnUpload" runat="server" Text="上传1" OnClick="btnUpload_Click" BorderStyle="None" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
&nbsp;</td>
</tr>
</table>
</asp:Panel>
<asp:Panel runat="server" ID="panel2" Visible="false">
<table id="UploadedTbl" runat="server" cellpadding="3" cellspacing="3" >
<tr>
<td align="center" colspan="2" style="color:Red">
文件上传成功。</td>
</tr>
<tr>
<td align="center">
文件地址:</td>
<td>
<input id="CopyTxt" runat="server" readonly="readonly" size="50" type="text" /></td>
</tr>
<tr>
<td align="center" colspan="2" style="height: 30px">
<input onclick="return format('InsertImage', '../'+CopyTxt.value);" type="button" value="插入图片"/>
<input onclick="window.open('../../../' + CopyTxt.value,'Preview')" type="button" value="预览图片"/>
</td>
</tr>
</table>
</asp:Panel>
</form>
</body>
</html>