📄 media.htm
字号:
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script type="text/javascript" src="dialog.js"></script>
<script type="text/javascript">
document.write ("<link href='../skin/" + config.Skin + "/dialog.css' type='text/css' rel='stylesheet'>");
document.write ("<TITLE>" + lang["DlgMedia"] + "</TITLE>");
var bAllowUpload = ((parseFloat(config.AllowMediaSize)>0) ? true : false);
function RadioClick(what){
if (what=="url"){
d_fromurl.disabled=false;
if (config.AllowBrowse=="1"){
d_browse.disabled=false;
}
d_checkfromurl.checked=true;
if (bAllowUpload){
d_checkfromfile.checked=false;
document.myuploadform.uploadfile.disabled=true;
}
}else{
d_checkfromurl.checked=false;
document.myuploadform.uploadfile.disabled=false;
d_checkfromfile.checked=true;
d_fromurl.disabled=true;
if (config.AllowBrowse=="1"){
d_browse.disabled=true;
}
}
}
function UploadError(s_Flag){
AbleItems();
RadioClick('file');
divProcessing.style.display="none";
try {
BaseAlert(document.myuploadform.uploadfile,getUploadErrDesc(s_Flag, config.AllowMediaExt, config.AllowMediaSize));
}
catch(e){}
}
function UploadSaved(sPathFileName){
d_fromurl.value = sPathFileName;
ReturnValue();
}
function ReturnValue(){
var sFromUrl = d_fromurl.value;
var sWidth = d_width.value;
var sHeight = d_height.value;
var sHTML = '<EMBED src="' + sFromUrl + '" width="' + sWidth + '" height="' + sHeight + '" type="audio/x-pn-realaudio-plugin" autostart="true" controls="IMAGEWINDOW,ControlPanel,StatusBar" console="Clip1"></EMBED>';
dialogArguments.insertHTML(sHTML);
window.returnValue = null;
window.close();
}
function ok(){
d_width.value=ToInt(d_width.value);
d_height.value=ToInt(d_height.value);
if (d_checkfromurl.checked){
ReturnValue();
}else{
if (!IsExt(document.myuploadform.uploadfile.value,config.AllowMediaExt)){
UploadError("ext");
return false;
}
DisableItems();
divProcessing.style.display="";
document.myuploadform.submit();
}
}
function DisableItems(){
d_checkfromfile.disabled=true;
d_checkfromurl.disabled=true;
d_fromurl.disabled=true;
if (config.AllowBrowse=="1"){
d_browse.disabled=true;
}
d_width.disabled=true;
d_height.disabled=true;
Ok.disabled=true;
}
function AbleItems(){
d_checkfromfile.disabled=false;
d_checkfromurl.disabled=false;
d_fromurl.disabled=false;
if (config.AllowBrowse=="1"){
d_browse.disabled=false;
}
d_width.disabled=false;
d_height.disabled=false;
Ok.disabled=false;
}
function InitDocument(){
lang.TranslatePage(document);
if (!bAllowUpload){
RadioClick("url");
}else{
RadioClick("file");
}
adjustDialog();
}
</script>
</HEAD>
<BODY onload="InitDocument()">
<table border=0 cellpadding=0 cellspacing=5 id=tabDialogSize><tr><td>
<table border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
<td>
<fieldset>
<legend><span lang=DlgMediaSource></span></legend>
<table border=0 cellpadding=5 cellspacing=0 width="100%">
<tr><td>
<table border=0 cellpadding=0 cellspacing=0 width="300px"><tr><td></td></tr></table>
<table border=0 cellpadding=0 cellspacing=2 width="100%">
<script type="text/javascript">
if (bAllowUpload){
document.write("<tr>");
document.write("<td noWrap width=\"20%\"><input type=radio id=\"d_checkfromfile\" value=\"1\" onclick=\"RadioClick('file')\"><label for=d_checkfromfile>"+lang["DlgFromFile"]+"</label>:</td>");
document.write("<td noWrap width=\"80%\">");
document.write(getUploadForm("media"));
document.write("</td>");
document.write("</tr>");
}
</script>
<tr>
<td noWrap width="20%"><input type=radio id="d_checkfromurl" value="1" onclick="RadioClick('url')"><label for=d_checkfromurl><span lang=DlgFromUrl></span></label>:</td>
<td noWrap width="80%">
<script type="text/javascript">
if (config.AllowBrowse=="1"){
document.write("<table border=0 cellpadding=0 cellspacing=0 width='100%'><tr><td width='100%'><input type=text id='d_fromurl' style='width:100%' size=10 value='http://'></td><td><input class='dlgBtnBrowse' type=button id='d_browse' onclick=\"SelectBrowse('media','fromurl')\" value='"+lang["DlgBtnBrowse"]+"' align=absmiddle></td></tr></table>");
} else {
document.write("<input type=text id='d_fromurl' style='width:100%' size=10 value='http://'>");
}
</script>
</td>
</tr>
</table>
</td></tr>
</table>
</fieldset>
</td>
</tr>
<tr><td height=5></td></tr>
<tr>
<td>
<fieldset>
<legend><span lang=DlgMediaEffect></span></legend>
<table border=0 cellpadding=5 cellspacing=0 width="100%">
<tr><td>
<table border=0 cellpadding=0 cellspacing=2 width="100%">
<tr>
<td noWrap width="20%"><span lang=DlgMediaWidth></span>:</td>
<td noWrap width="29%"><input style="width:80px" type=text id=d_width size=10 value="200" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
<td width="2%"> </td>
<td noWrap width="20%"><span lang=DlgMediaHeight></span>:</td>
<td noWrap width="29%"><input style="width:80px" type=text id=d_height size=10 value="200" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
</tr>
</table>
</td></tr>
</table>
</fieldset>
</td>
</tr>
<tr><td height=5></td></tr>
<tr><td noWrap align=right><input type=submit class="dlgBtnCommon" value='' id=Ok onclick="ok()" lang=DlgBtnOK> <input type=button class="dlgBtnCommon" value='' onclick="window.close();" lang=DlgBtnCancel></td></tr>
</table>
</td></tr></table>
<div id=divProcessing style="width:200px;height:30px;position:absolute;left:70px;top:50px;display:none">
<table border=0 cellpadding=0 cellspacing=1 bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor=#3A6EA5><marquee align="middle" behavior="alternate" scrollamount="5"><font color=#FFFFFF><span lang=DlgComUploading></span></font></marquee></td></tr></table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -