BVB Source Codes

Pcook CMS bubble guest v3.0 SDCMS version Show media.htm Source code

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download media.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.htm
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <link href="../style/editor.css" rel="stylesheet" type="text/css">
  5. <script>
  6.   var sLangDir=window.opener.oUtil.langDir;
  7.   document.write("<scr"+"ipt src='../language/"+sLangDir+"/media.js'></scr"+"ipt>");
  8. </script>
  9. <script>writeTitle()</script>
  10. <script>
  11.  
  12. //reference to pop up window
  13. var activeModalWin;
  14.  
  15. function GetElement(oElement,sMatchTag)
  16.     {
  17.     while (oElement!=null&&oElement.tagName!=sMatchTag)
  18.        {
  19.        if(oElement.tagName=="BODY")return null;
  20.         oElement=oElement.parentNode;
  21.         }
  22.     return oElement;
  23.     }
  24.  
  25. function doWindowFocus()
  26.     {
  27.     window.opener.oUtil.onSelectionChanged=new Function("realTime()");
  28.     }
  29.    
  30. function bodyOnLoad()
  31.     {
  32.     window.onfocus=doWindowFocus;  
  33.     window.opener.oUtil.onSelectionChanged=new Function("realTime()");
  34.  
  35.     if(window.opener.oUtil.obj.cmdAssetManager!="")
  36.         document.getElementById("btnAsset").style.display="block";
  37.     if(window.opener.oUtil.obj.cmdMediaManager!="")
  38.         document.getElementById("btnAsset").style.display="block";
  39.  
  40.     realTime()
  41.     }
  42.    
  43. function openAsset()
  44.     {
  45.     if(window.opener.oUtil.obj.cmdAssetManager!="")
  46.     eval(window.opener.oUtil.obj.cmdAssetManager);
  47.   if(window.opener.oUtil.obj.cmdMediaManager!="")
  48.     eval(window.opener.oUtil.obj.cmdMediaManager);
  49.     }
  50.  
  51. function setAssetValue(v)
  52.     {
  53.     document.getElementById("inpURL").value = v;
  54.     }
  55.    
  56. function modalDialogShow(url,width,height)
  57.     {
  58.     if(url.indexOf("?")==-1) url=url+"?ffilter=media";//no querystring
  59.     else url=url+"&ffilter=media";
  60.  
  61.     var left = screen.availWidth/2 - width/2;
  62.     var top = screen.availHeight/2 - height/2;
  63.     activeModalWin = window.open(url, "", "width="+width+"px,height="+height+",left="+left+",top="+top);
  64.     window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};
  65.  
  66.     //return window.showModalDialog(url,window,
  67.     //    "dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:Yes;help:No;Resizable:Yes;Maximize:Yes");
  68.     }
  69.    
  70. function realTime()
  71.     {
  72.     var oEditor=window.opener.oUtil.oEditor;
  73.     var oSel=oEditor.getSelection();
  74.  
  75.     clearAllProperties()
  76.  
  77.     var oEl = window.opener.getSelectedElement(oSel);
  78.     oEl = GetElement(oEl, "OBJECT")
  79.     if (oEl) {oEl = oEl.getElementsByTagName("EMBED")[0]}
  80.    
  81.     if (oEl)
  82.         {
  83.         document.getElementById("inpURL").value=oEl.src;
  84.         document.getElementById("inpWidth").value=oEl.width;
  85.         document.getElementById("inpHeight").value=oEl.height;
  86.         if(oEl.getAttribute("autoRewind")=="1") document.getElementById("chkAutoRewind").checked=true;
  87.         else document.getElementById("chkAutoRewind").checked=false;
  88.         if(oEl.getAttribute("showDisplay")=="1") document.getElementById("chkShowDisplay").checked=true;
  89.         else document.getElementById("chkShowDisplay").checked=false;
  90.         if(oEl.getAttribute("showStatusbar")=="1") document.getElementById("chkShowStatusBar").checked=true;
  91.         else document.getElementById("chkShowStatusBar").checked=false;
  92.         if(oEl.getAttribute("showControls")=="1") document.getElementById("chkShowControls").checked=true;
  93.         else document.getElementById("chkShowControls").checked=false;
  94.         if(oEl.getAttribute("autoStart")=="1") document.getElementById("chkAutoStart").checked=true;
  95.         else document.getElementById("chkAutoStart").checked=false;
  96.        
  97.         document.getElementById("btnApply").style.display="block";
  98.         document.getElementById("btnOk").style.display="block";
  99.         document.getElementById("btnInsert").style.display="none";
  100.         }
  101.     else
  102.         {
  103.         document.getElementById("btnApply").style.display="none";
  104.         document.getElementById("btnOk").style.display="none";
  105.         document.getElementById("btnInsert").style.display="block";
  106.         }
  107.     }
  108.    
  109. function clearAllProperties()
  110.     {
  111.     document.getElementById("inpURL").value="";
  112.     document.getElementById("inpWidth").value="320";
  113.     document.getElementById("inpHeight").value="290";
  114.     document.getElementById("chkAutoStart").checked=true;
  115.     document.getElementById("chkShowControls").checked=true;
  116.     document.getElementById("chkShowStatusBar").checked=false;
  117.     document.getElementById("chkShowDisplay").checked=false;
  118.     document.getElementById("chkAutoRewind").checked=true;
  119.     }
  120.  
  121. function insertMedia()
  122.     {
  123.     var oEditor=window.opener.oUtil.oEditor;
  124.    
  125.     window.opener.oUtil.obj.saveForUndo();
  126.    
  127.     if(document.getElementById("chkAutoStart").checked)sAutoStart="1";
  128.     else sAutoStart="0";
  129.    
  130.     if(document.getElementById("chkShowControls").checked)sShowControls="1";
  131.     else sShowControls="0";
  132.    
  133.     if(document.getElementById("chkShowStatusBar").checked)sShowStatusBar="1";
  134.     else sShowStatusBar="0";
  135.    
  136.     if(document.getElementById("chkShowDisplay").checked)sShowDisplay="1";
  137.     else sShowDisplay="0";
  138.    
  139.     if(document.getElementById("chkAutoRewind").checked)sAutoRewind="1";
  140.     else sAutoRewind="0";
  141.    
  142.     var inpURL=document.getElementById("inpURL");
  143.     //var inpCLassID=document.getElementById("inpCLassID");
  144.     var inpHeight=document.getElementById("inpHeight")
  145.     var inpWidth=document.getElementById("inpWidth")
  146.    
  147.     var sHTML = "<object selThis=\"selThis\" width='"+inpWidth.value+"' height='"+inpHeight.value+"' "+
  148.        "classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' "+
  149.        "codebase='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' >"+
  150.         "<param name='URL' value='"+inpURL.value+"'>"+
  151.         "<param name='autoStart' value='"+(sAutoStart=="1"?"true":"false")+"'>"+
  152.         "<param name='uiMode' value='"+(sShowControls=="1"?"full":"none")+"'>"+
  153.         "<param name='playCount' value='"+(sAutoRewind=="1"?32767:1)+"'>"+
  154.         "   <embed "+
  155.        "   type='application/x-mplayer2' "+
  156.        "   pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' "+
  157.        "   width='"+inpWidth.value+"' "+
  158.        "   height='"+inpHeight.value+"' "+
  159.        "   src='"+inpURL.value+"' "+
  160.        "   filename='"+inpURL.value+"' "+
  161.        "   autostart='"+sAutoStart+"' "+
  162.        "   showcontrols='"+sShowControls+"' "+
  163.        "   showstatusbar='"+sShowStatusBar+"' "+
  164.        "   showdisplay='"+sShowDisplay+"' "+
  165.        "   autorewind='"+sAutoRewind+"'>"+
  166.         "   </embed>"+
  167.         "</object>";
  168.         /*
  169.     var sHTML = "<embed selThis=\"selThis\" "+
  170.        "type='application/x-mplayer2' "+
  171.        "pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' "+
  172.        "width='"+document.getElementById("inpWidth").value+"' "+
  173.        "height='"+document.getElementById("inpHeight").value+"' "+
  174.        "src='"+document.getElementById("inpURL").value+"' "+
  175.        "filename='"+document.getElementById("inpURL").value+"' "+
  176.        "autostart='"+sAutoStart+"' "+
  177.        "showcontrols='"+sShowControls+"' "+
  178.        "showstatusbar='"+sShowStatusBar+"' "+
  179.        "showdisplay='"+sShowDisplay+"' "+
  180.        "autorewind='"+sAutoRewind+"'></embed>"
  181.     */
  182.     var obj=window.opener.oUtil.obj;
  183.     obj.insertHTML(sHTML);
  184.    
  185.     var allEmb = oEditor.document.getElementsByTagName("EMBED");
  186.     for(var i=0;i<allEmb.length;i++)
  187.        {
  188.        if(allEmb[i].getAttribute("selThis")=="selThis")
  189.            {
  190.            allEmb[i].removeAttribute("selThis");              
  191.            var range = oEditor.document.createRange();
  192.            range.selectNode(allEmb[i]);
  193.            var oSelRange = oEditor.getSelection()
  194.            oSelRange.removeAllRanges();
  195.            oSelRange.addRange(range);
  196.            }
  197.        }
  198.    
  199.    realTime();
  200.    
  201.    window.opener.realTime(window.opener.oUtil.obj);
  202.    window.opener.oUtil.obj.selectElement(0);
  203.    }
  204.    
  205. function updateMedia()
  206.    {
  207.    var oEditor=window.opener.oUtil.oEditor;
  208.    var oSel=oEditor.getSelection();
  209.    
  210.    window.opener.oUtil.obj.saveForUndo();
  211.  
  212.    var oObj = window.opener.getSelectedElement(oSel);
  213.    oObj = GetElement(oObj, "OBJECT");
  214.    
  215.    var oEl=null;
  216.    if (oObj) {
  217.      oObj.width=document.getElementById("inpWidth").value;
  218.      oObj.height=document.getElementById("inpHeight").value;
  219.  
  220.      var allParams = oObj.getElementsByTagName("PARAM");
  221.      if (allParams.length) {
  222.        for (var i=0;i < allParams.length; i++) {
  223.          if (allParams[i].name=="playCount") {allParams[i].value=(document.getElementById("chkAutoRewind").checked?32767:1);}
  224.          if (allParams[i].name=="autoStart") {allParams[i].value=(document.getElementById("chkAutoStart").checked?"true":"false");}
  225.          if (allParams[i].name=="uiMode") {allParams[i].value=(document.getElementById("chkShowControls").checked?"full":"none");}
  226.          if (allParams[i].name=="URL") {allParams[i].value=document.getElementById("inpURL").value;}
  227.        }
  228.      }
  229.  
  230.      oEl = oObj.getElementsByTagName("EMBED")[0]
  231.    }
  232.    
  233.    if (oEl)
  234.        {
  235.        oEl.src=document.getElementById("inpURL").value;
  236.        oEl.width=document.getElementById("inpWidth").value;
  237.        oEl.height=document.getElementById("inpHeight").value;
  238.        
  239.        if(document.getElementById("chkAutoRewind").checked)oEl.setAttribute("autoRewind", "1");
  240.        else oEl.setAttribute("autoRewind", "0");
  241.        if(document.getElementById("chkShowDisplay").checked)oEl.setAttribute("showDisplay", "1");
  242.        else oEl.setAttribute("showDisplay", "0");
  243.        if(document.getElementById("chkShowStatusBar").checked)oEl.setAttribute("showStatusbar", "1");
  244.        else oEl.setAttribute("showStatusbar", "0");
  245.        if(document.getElementById("chkShowControls").checked)oEl.setAttribute("showControls", "1");
  246.        else oEl.setAttribute("showControls", "0");
  247.        if(document.getElementById("chkAutoStart").checked)oEl.setAttribute("autoStart", "1");
  248.        else oEl.setAttribute("autoStart", "0");
  249.        }
  250.    realTime()
  251.    window.focus();
  252.    }
  253.    
  254. </script>
  255. </head>
  256. <body onload="loadTxt();bodyOnLoad()" style="overflow:hidden;">
  257.  
  258. <table width=100% height=100% align=center cellpadding=0 cellspacing=0>
  259. <tr>
  260. <td valign=top style="padding:5;height:100%">
  261.  
  262.     <table cellpadding=2 cellspacing=0  style="width:100%">
  263.     <tr>
  264.         <td nowrap><span id="txtLang" name="txtLang">Source</span>:&nbsp;&nbsp;</td>
  265.         <td colspan="4" style="width:100%">
  266.             <table cellpadding="0" cellspacing="0" style="width:100%">
  267.             <tr>
  268.             <td style="width:100%"><input type="text" name=inpURL id=inpURL size=45 value="" style="width:100%" class="inpTxt"></td>
  269.             <td><input type="button" value="" onclick="openAsset()" id="btnAsset" name="btnAsset" style="display:none;background:url('openAsset.gif');width:20px;height:16px;border:#a5acb2 1px solid;margin-left:1px;"></td>
  270.             </tr>
  271.             </table>        
  272.         </td>
  273.     </tr>
  274.     <tr>
  275.         <td nowrap><span id="txtLang" name="txtLang">Width</span>:</td>
  276.         <td colspan="4"><input type="text" name="inpWidth" id="inpWidth" value=320 size=4 class="inpTxt"></td>
  277.     </tr>
  278.     <tr>
  279.         <td nowrap><span id="txtLang" name="txtLang">Height</span>:</td>
  280.         <td colspan="4"><input type="text" name="inpHeight" id="inpHeight" value=290 size=4 class="inpTxt"></td>
  281.     </tr>  
  282.     <!--
  283.    <tr>
  284.        <td colspan="5"><hr>
  285.        </td>
  286.    </tr>
  287.    <tr>
  288.        <td><span id="txtLang" name="txtLang">Class ID</span>:&nbsp;&nbsp;</td>
  289.        <td colspan="4">
  290.            <select id="inpCLassID" name="inpCLassID">
  291.            <option value="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" selected>CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95</option>
  292.            <option value="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6">CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6</option>
  293.            </select>
  294.        </td>
  295.    </tr>
  296.    <tr>
  297.        <td colspan="5" height="7px">
  298.        </td>
  299.    </tr>-->
  300.     <tr>
  301.         <td nowrap><span id="txtLang" name="txtLang">Auto Start</span>:</td>
  302.         <td>
  303.         <input type="checkbox" name="chkAutoStart" id="chkAutoStart" class="inpChk" checked>
  304.         </td>
  305.         <td colspan="3" rowspan="5">
  306.             &nbsp;
  307.         </td>
  308.     </tr>  
  309.     <tr>
  310.         <td nowrap><span id="txtLang" name="txtLang">Show Controls</span>:</td>
  311.         <td nowrap>
  312.         <input type="checkbox" name="chkShowControls" id="chkShowControls" class="inpChk" checked>
  313.         </td>
  314.     </tr>  
  315.     <tr style='display:none'>
  316.         <td nowrap><span id="txtLang" name="txtLang">Show Status Bar</span>:</td>
  317.         <td nowrap>
  318.         <input type="checkbox" name="chkShowStatusBar" id="chkShowStatusBar" class="inpChk">
  319.         </td>
  320.     </tr>
  321.     <tr style='display:none'>
  322.         <td nowrap><span id="txtLang" name="txtLang">Show Display</span>:</td>
  323.         <td nowrap>
  324.         <input type="checkbox" name="chkShowDisplay" id="chkShowDisplay" class="inpChk">
  325.         </td>
  326.     </tr>
  327.     <tr>
  328.         <td nowrap><span id="txtLang" name="txtLang">Auto Rewind</span>:</td>
  329.         <td nowrap>
  330.         <input type="checkbox" name="chkAutoRewind" id="chkAutoRewind" class="inpChk" checked>
  331.         </td>
  332.     </tr>
  333.     </table>
  334.    
  335. </td>
  336. </tr>
  337. <tr>
  338. <td class="dialogFooter" style="padding:6px;" align="right">
  339.     <table cellpadding=1 cellspacing=0>
  340.     <tr>
  341.     <td>
  342.     <input type="button" name=btnCancel id=btnCancel value="cancel" onclick="self.close()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  343.     </td>
  344.     <td>
  345.     <input type="button" name=btnInsert id=btnInsert value="insert" onclick="insertMedia();self.close()" style="display:block" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  346.     </td>
  347.     <td>    
  348.     <input type="button" name=btnApply id=btnApply value="apply" onclick="updateMedia()" style="display:none" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  349.     </td>
  350.     <td>    
  351.     <input type="button" name=btnOk id=btnOk value=" ok " onclick="updateMedia();self.close()" style="display:none;" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">  
  352.     </td>
  353.     </tr>
  354.     </table>
  355. </td>
  356. </tr>
  357. </table>
  358.  
  359. </body>
  360. </html>
downloadmedia.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code
Related Source Codes/Software:
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
Jie Yang v0.6.3 article system - System functions: 1, the system settings A confi... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
C9 v2.1.1 static post system - Program USES ASP + ACC structure design and develo... 2016-09-21
Imitation green download station perfect version - Before increased | software home page, on the basi... 2016-09-21
Subdomain hosting edition v1.9 s taobao, pat - The background site admin 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top