📄 safari_insertmedia.aspx
字号:
<td style="height: 24px">
<input type="checkbox" name="Transparency" onchange="do_preview()" onpropertychange="do_preview()"
id="ShowControls" checked value="ShowControls" runat="server"></td>
</tr>
<tr>
<td>
[[ShowStatusBar]]:</td>
<td>
<input type="checkbox" name="Transparency" onchange="do_preview()" onpropertychange="do_preview()"
id="ShowStatusBar" checked value="ShowStatusBar" runat="server"></td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
</td>
<td width="10">
</td>
<td valign="top">
<fieldset style="width:300px" style="margin-bottom:5px">
<legend>
[[Insert]]</legend>
<table border="0" cellpadding="5" cellspacing="0" id="Table5">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="0" class="normal">
<tr>
<td valign="middle">
URL:</td>
<td>
<input type="text" id="TargetUrl" size="40" name="TargetUrl" runat="server"></td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
<fieldset align="center" style="width:300px" id="fieldsetUpload">
<legend>
[[Upload]] (Max file size allowed
<%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxMediaSize * 1024)%>
)</legend>
<table border="0" cellspacing="2" cellpadding="0" width="98%" align="center" class="normal">
<tr>
<td valign="top" width="54%" style="font-size: 8pt; vertical-align: middle; font-family: MS Sans Serif">
<asp:Label ID="Label_PictureUpload" Runat="server"> </asp:Label>
<input id="InputFile" size="40" type="file" runat="server" style="height:20px" NAME="InputFile">
</td>
</tr>
<tr>
<td height="8">
</td>
</tr>
<tr>
<td>
<asp:Button ID="uploadButton" Text="[[Upload]]" Runat="server" OnClick="uploadButton_Click" />
<asp:Label ID="uploadResult" Runat="server"></asp:Label>
</td>
</tr>
<tr>
<td height="5">
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<nobr>
Max Upload folder size is : <%= CuteEditor.Impl.FileStorage.FormatSize(secset.MaxMediaFolderSize * 1024)%>.
Used: <%= CuteEditor.Impl.FileStorage.FormatSize(fs.GetDirectorySize(fs.VirtualRoot)) %>
</nobr>
</td>
<td>
<div style="background-color:green;height:3px;width:40px;font-size:3px">
<div style="background-color:red;height:3px;width:<%= GetUsedSpaceBarWidth() %>px;font-size:3px"></div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
<p align="center">
<input class="inputbuttoninsert" type="button" value="[[Insert]]" onclick="do_insert()" id="Button1">
<input class="inputbuttoncancel" type="button" value="[[Cancel]]" onclick="do_cancel()" id="Button2">
</p>
</td>
</tr>
</table>
</form>
</body>
<script runat="server">
protected override void InitOfType()
{
fs.VirtualRoot=CuteEditor.EditorUtility.ProcessWebPath(Context,null,secset.MediaGalleryPath).TrimEnd('/')+"/";
}
protected override void GetFiles(ArrayList files)
{
foreach (string ext in secset.MediaFilters)
{
if (ext == null || ext.Length == 0) continue;
files.AddRange(fs.GetFileItems(CurrentDirectory, "*" + ext));
}
}
protected override bool AllowFileName(string filename)
{
filename = filename.ToLower();
foreach (string ext in secset.MediaFilters)
{
if (ext == null || ext.Length == 0) continue;
if(filename.EndsWith(ext.ToLower()))
return true;
}
return false;
}
protected override string CheckUploadData(ref byte[] data)
{
if (fs.GetDirectorySize(fs.VirtualRoot) >= secset.MaxMediaFolderSize * 1024)
return "Media folder size exceeds the limit: "+ CuteEditor.Impl.FileStorage.FormatSize(secset.MaxMediaFolderSize * 1024);
if (data.Length >= secset.MaxMediaSize * 1024)
return "Media size exceeds "+CuteEditor.Impl.FileStorage.FormatSize(secset.MaxMediaSize * 1024)+" limit: "+ CuteEditor.Impl.FileStorage.FormatSize(data.Length);
return null;
}
protected int GetUsedSpaceBarWidth()
{
int w = Convert.ToInt32(40*fs.GetDirectorySize(fs.VirtualRoot)/(secset.MaxFlashFolderSize * 1024));
if(w<1)
w=1;
if(w>40)
w=40;
return w;
}
</script>
<script src="addvars.js"></script>
<script>
var OxOc912=["dialogArguments","opener","availWidth","availHeight","TargetUrl","value","","Width","Height","ShowControls","AutoStart","ShowStatusBar","checked","\x3Cembed name=\x22MediaPlayer1\x22 src=\x22","\x22 autostart=\x22","\x22 showcontrols=\x22","\x22 width=\x22","\x22 height=\x22","\x22 type=\x22application/x-mplayer2\x22 pluginspage=\x22http://www.microsoft.com/Windows/MediaPlayer\x22 \x3E\x3C/embed\x3E\x0A","innerHTML","Please choose a Media movie to insert","w","px","h","medianame","editor","editdoc","Delete"];var dialogArguments=window[OxOc912[0x1]][OxOc912[0x0]]; window.resizeTo(0x23c,0x21c) ; window.moveTo((screen[OxOc912[0x2]]-0x258)/0x2,(screen[OxOc912[0x3]]-0x190)/0x2) ; window.focus() ; do_preview() ; function do_preview(){var Ox4e7;var Ox82;var Ox2d8;var TargetUrl=document.getElementById(OxOc912[0x4]);if(TargetUrl[OxOc912[0x5]]==OxOc912[0x6]){return ;} ;var Ox4ec=document.getElementById(OxOc912[0x7]);var Ox4ed=document.getElementById(OxOc912[0x8]);var Ox50e=document.getElementById(OxOc912[0x9]);var Ox50f=document.getElementById(OxOc912[0xa]);var Ox510=document.getElementById(OxOc912[0xb]);var Ox511Ox512Ox513;if(Ox50f[OxOc912[0xc]]){ Ox511=0x1 ;} else { Ox511=0x0 ;} ;if(Ox510[OxOc912[0xc]]){ Ox512=0x1 ;} else { Ox512=0x0 ;} ;if(Ox50e[OxOc912[0xc]]){ Ox513=0x1 ;} else { Ox513=0x0 ;} ; Ox82=Ox4ec[OxOc912[0x5]] ; Ox2d8=Ox4ed[OxOc912[0x5]] ; preview_width=0xf0 ; preview_height=0xc8 ; w=parseInt(Ox82) ; h=parseInt(Ox2d8) ;if(w>h){ Ox82=preview_width ; Ox2d8=preview_height*h/w ;} else { Ox82=preview_width*w/h ; Ox2d8=preview_height ;} ; Ox82=parseInt(Ox82) ; Ox2d8=parseInt(Ox2d8) ;var Oxbe=OxOc912[0xd]+TargetUrl[OxOc912[0x5]]+OxOc912[0xe]+Ox511+OxOc912[0xf]+Ox513+OxOc912[0x10]+Ox82+OxOc912[0x11]+Ox2d8+OxOc912[0x12]; divpreview[OxOc912[0x13]]=Oxbe ;} ;var parameters= new Array(); function do_insert(){var TargetUrl=document.getElementById(OxOc912[0x4]);var Ox4ec=document.getElementById(OxOc912[0x7]);var Ox4ed=document.getElementById(OxOc912[0x8]);var Ox50e=document.getElementById(OxOc912[0x9]);var Ox50f=document.getElementById(OxOc912[0xa]);var Ox510=document.getElementById(OxOc912[0xb]);if(TargetUrl[OxOc912[0x5]]==OxOc912[0x6]){ alert(OxOc912[0x14]) ;return false;} ; parameters[OxOc912[0x15]]=Ox4ec[OxOc912[0x5]]+OxOc912[0x16] ; parameters[OxOc912[0x17]]=Ox4ed[OxOc912[0x5]]+OxOc912[0x16] ; parameters[OxOc912[0x18]]=document.getElementById(OxOc912[0x4])[OxOc912[0x5]] ;if(Ox50f[OxOc912[0xc]]){ parameters[OxOc912[0xa]]=0x1 ;} else { parameters[OxOc912[0xa]]=0x0 ;} ;if(Ox510[OxOc912[0xc]]){ parameters[OxOc912[0xb]]=0x1 ;} else { parameters[OxOc912[0xb]]=0x0 ;} ;if(Ox50e[OxOc912[0xc]]){ parameters[OxOc912[0x9]]=0x1 ;} else { parameters[OxOc912[0x9]]=0x0 ;} ;if(TargetUrl[OxOc912[0x5]]==OxOc912[0x6]){ alert(OxOc912[0x14]) ;return false;} ;var Oxbe=OxOc912[0xd]+parameters[OxOc912[0x18]]+OxOc912[0xe]+parameters[OxOc912[0xa]]+OxOc912[0xf]+parameters[OxOc912[0x9]]+OxOc912[0x10]+parameters[OxOc912[0x15]]+OxOc912[0x11]+parameters[OxOc912[0x17]]+OxOc912[0x12];var obj=window[OxOc912[0x1]][OxOc912[0x0]];var editor=obj[OxOc912[0x19]];var editdoc=obj[OxOc912[0x1a]]; editdoc.execCommand(OxOc912[0x1b],false,OxOc912[0x6]) ; editor.PasteHTML(Oxbe) ; top.close() ;} ; function do_cancel(){ top.close() ;} ;
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -