media.htm 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <HTML>
  2. <HEAD>
  3. <TITLE>媒体文件属性</TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. <style type="text/css">
  6. body, a, table, div, span, td, th, input, select{font:9pt;font-family: "宋体", Verdana, Arial, Helvetica, sans-serif;}
  7. body {padding:5px}
  8. </style>
  9. <script language="JavaScript" src="dialog.js"></script>
  10. <script language="JavaScript">
  11. // 文件来源单选点击事件
  12. function RadioClick(what){
  13. if (what=="url"){
  14. d_checkfromfile.checked=false;
  15. d_fromurl.disabled=false;
  16. d_checkfromurl.checked=true;
  17. d_file.myform.uploadfile.disabled=true;
  18. }else{
  19. d_checkfromurl.checked=false;
  20. d_file.myform.uploadfile.disabled=false;
  21. d_checkfromfile.checked=true;
  22. d_fromurl.disabled=true;
  23. }
  24. }
  25. // 上传帧调入完成时执行
  26. function UploadLoaded(){
  27. // 初始radio
  28. RadioClick('file');
  29. }
  30. // 上传错误
  31. function UploadError(sErrDesc){
  32. AbleItems();
  33. RadioClick('file');
  34. divProcessing.style.display="none";
  35. try {
  36. BaseAlert(d_file.myform.uploadfile,sErrDesc);
  37. }
  38. catch(e){}
  39. }
  40. // 文件上传完成时执行,带入上传文件名
  41. function UploadSaved(sFileName){
  42. d_fromurl.value=GetHttpUrl(config.StyleUploadDir+"/"+sFileName);
  43. ReturnValue();
  44. }
  45. // 本窗口返回值
  46. function ReturnValue(){
  47. var sFromUrl = d_fromurl.value;
  48. var sWidth = d_width.value;
  49. var sHeight = d_height.value;
  50. var sHTML = '<EMBED src="' + sFromUrl + '" width="' + sWidth + '" height="' + sHeight + '" type="audio/x-pn-realaudio-plugin" autostart="true" controls="IMAGEWINDOW,ControlPanel,StatusBar" console="Clip1"></EMBED>';
  51. dialogArguments.insertHTML(sHTML);
  52. window.returnValue = null;
  53. window.close();
  54. }
  55. // 点确定时执行
  56. function ok(){
  57. // 数字型输入的有效性
  58. d_width.value=ToInt(d_width.value);
  59. d_height.value=ToInt(d_height.value);
  60. if (d_checkfromurl.checked){
  61. // 返回值
  62. ReturnValue();
  63. }else{
  64. // 上传文件判断
  65. if (!d_file.CheckUploadForm()) return false;
  66. // 使各输入框无效
  67. DisableItems();
  68. // 显示正在上传文件
  69. divProcessing.style.display="";
  70. // 上传表单提交
  71. d_file.myform.submit();
  72. }
  73. }
  74. // 使所有输入框无效
  75. function DisableItems(){
  76. d_checkfromfile.disabled=true;
  77. d_checkfromurl.disabled=true;
  78. d_fromurl.disabled=true;
  79. d_width.disabled=true;
  80. d_height.disabled=true;
  81. Ok.disabled=true;
  82. }
  83. // 使所有输入框有效
  84. function AbleItems(){
  85. d_checkfromfile.disabled=false;
  86. d_checkfromurl.disabled=false;
  87. d_fromurl.disabled=false;
  88. d_width.disabled=false;
  89. d_height.disabled=false;
  90. Ok.disabled=false;
  91. }
  92. </script>
  93. </HEAD>
  94. <BODY bgColor=menu>
  95. <table border=0 cellpadding=0 cellspacing=0 align=center>
  96. <tr>
  97. <td>
  98. <fieldset>
  99. <legend>媒体文件来源</legend>
  100. <table border=0 cellpadding=0 cellspacing=0>
  101. <tr><td colspan=9 height=5></td></tr>
  102. <tr>
  103. <td width=7></td>
  104. <td width=54 align=right onClick="RadioClick('file')"><input type=radio id="d_checkfromfile" value="1" onClick="RadioClick('file')">上传:</td>
  105. <td width=5></td>
  106. <td colspan=5>
  107. <Script Language=JavaScript>
  108. document.write('<iframe id=d_file frameborder=0 src="../upload.jsp?type=media&style=' + config.StyleName + '" width="100%" height="22" scrolling=no></iframe>');
  109. </Script>
  110. </td>
  111. <td width=7></td>
  112. </tr>
  113. <tr><td colspan=9 height=5></td></tr>
  114. <tr>
  115. <td width=7></td>
  116. <td width=54 align=right onClick="RadioClick('url')"><input type=radio id="d_checkfromurl" value="1" onClick="RadioClick('url')">网络:</td>
  117. <td width=5></td>
  118. <td colspan=5><input type=text id="d_fromurl" style="width:243px" size=30 value="http://"></td>
  119. <td width=7></td>
  120. </tr>
  121. <tr><td colspan=9 height=5></td></tr>
  122. </table>
  123. </fieldset>
  124. </td>
  125. </tr>
  126. <tr><td height=5></td></tr>
  127. <tr>
  128. <td>
  129. <fieldset>
  130. <legend>播放效果</legend>
  131. <table border=0 cellpadding=0 cellspacing=0>
  132. <tr><td colspan=9 height=5></td></tr>
  133. <tr>
  134. <td width=7></td>
  135. <td noWrap>播放宽度:</td>
  136. <td width=5></td>
  137. <td><input type=text id=d_width size=10 value="200" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
  138. <td width=40></td>
  139. <td noWrap>播放高度:</td>
  140. <td width=5></td>
  141. <td><input type=text id=d_height size=10 value="200" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
  142. <td width=7></td>
  143. </tr>
  144. <tr><td colspan=9 height=5></td></tr>
  145. </table>
  146. </fieldset>
  147. </td>
  148. </tr>
  149. <tr><td height=5></td></tr>
  150. <tr><td align=right><input type=submit value=' 确定 ' id=Ok onClick="ok()">&nbsp;&nbsp;<input type=button value=' 取消 ' onClick="window.close();"></td></tr>
  151. </table>
  152. <div id=divProcessing style="width:200px;height:30px;position:absolute;left:70px;top:50px;display:none">
  153. <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>...文件上传中...请等待...</font></marquee></td></tr></table>
  154. </div>
  155. </body>
  156. </html>