ATB Source Codes

Source of party and Government official open source Government TS version v1.0 Show file.htm Source code

Return Download Source of party and Government official open source Government TS version v1.0: download file.htm Source code - Download Source of party and Government official open source Government TS version v1.0 Source code - Type:.htm
  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.  
  10. <script language="JavaScript" src="dialog.js"></script>
  11.  
  12. <script language="JavaScript">
  13.  
  14. // 文件来源单选点击事件
  15. function RadioClick(what){
  16.         if (what=="url"){
  17.                 d_checkfromfile.checked=false;
  18.                 d_fromurl.disabled=false;
  19.                 d_checkfromurl.checked=true;
  20.                 d_file.myform.uploadfile.disabled=true;
  21.         }else{
  22.                 d_checkfromurl.checked=false;
  23.                 d_file.myform.uploadfile.disabled=false;
  24.                 d_checkfromfile.checked=true;
  25.                 d_fromurl.disabled=true;
  26.         }
  27. }
  28.  
  29. // 上传帧调入完成时执行
  30. function UploadLoaded(){
  31.         // 初始radio
  32.         RadioClick('file');
  33. }
  34.  
  35. // 上传错误
  36. function UploadError(sErrDesc){
  37.         AbleItems();
  38.         RadioClick('file');
  39.         divProcessing.style.display="none";
  40.         try {
  41.                 BaseAlert(d_file.myform.uploadfile,sErrDesc);
  42.         }
  43.         catch(e){}
  44. }
  45.  
  46. // 文件上传完成时执行,带入上传文件名
  47. function UploadSaved(sPathFileName){
  48.         d_fromurl.value = sPathFileName;
  49.         ReturnValue();
  50. }
  51.  
  52. // 本窗口返回值
  53. function ReturnValue(){
  54.         var url = d_fromurl.value;
  55.         var sFilePic = getFilePic(url);
  56.         var sPicSrc = relativePath2setPath("sysimage/file/"+sFilePic);
  57.         dialogArguments.insertHTML("<img id=eWebEditor_TempElement_Img border=0 src='"+sPicSrc+"'><a id=eWebEditor_TempElement_Href href='"+url+"' target=_blank>"+d_filename.value+"</a>");
  58.  
  59.         var oTempElement = dialogArguments.eWebEditor.document.getElementById("eWebEditor_TempElement_Img");
  60.         oTempElement.src = sPicSrc;
  61.         oTempElement.removeAttribute("id");
  62.        
  63.         oTempElement = dialogArguments.eWebEditor.document.getElementById("eWebEditor_TempElement_Href");
  64.         oTempElement.href = url;
  65.         oTempElement.removeAttribute("id");
  66.        
  67.         window.returnValue = null;
  68.         window.close();
  69. }
  70.  
  71. // 点确定时执行
  72. function ok(){
  73.         if (d_checkfromurl.checked){
  74.                 // 取文件名
  75.                 GetFileName(d_fromurl.value, "/");
  76.                 // 返回值
  77.                 ReturnValue();
  78.         }else{
  79.                 // 上传文件判断
  80.                 if (!d_file.CheckUploadForm()) return false;
  81.                 // 取文件名
  82.                 GetFileName(d_file.myform.uploadfile.value, "\\");
  83.                 // 使各输入框无效
  84.                 DisableItems();
  85.                 // 显示正在上传文件
  86.                 divProcessing.style.display="";
  87.                 // 上传表单提交
  88.                 d_file.myform.submit();
  89.         }
  90. }
  91.  
  92. // 使所有输入框无效
  93. function DisableItems(){
  94.         d_checkfromfile.disabled=true;
  95.         d_checkfromurl.disabled=true;
  96.         d_fromurl.disabled=true;
  97.         Ok.disabled=true;
  98. }
  99.  
  100. // 使所有输入框有效
  101. function AbleItems(){
  102.         d_checkfromfile.disabled=false;
  103.         d_checkfromurl.disabled=false;
  104.         d_fromurl.disabled=false;
  105.         Ok.disabled=false;
  106. }
  107.  
  108. // 按文件扩展名取图,并产生链接
  109. function getFilePic(url){
  110.         var sExt;
  111.         sExt=url.substr(url.lastIndexOf(".")+1);
  112.         sExt=sExt.toUpperCase();
  113.         var sPicName;
  114.         switch(sExt){
  115.         case "TXT":
  116.                 sPicName = "txt.gif";
  117.                 break;
  118.         case "CHM":
  119.         case "HLP":
  120.                 sPicName = "hlp.gif";
  121.                 break;
  122.         case "DOC":
  123.                 sPicName = "doc.gif";
  124.                 break;
  125.         case "PDF":
  126.                 sPicName = "pdf.gif";
  127.                 break;
  128.         case "MDB":
  129.                 sPicName = "mdb.gif";
  130.                 break;
  131.         case "GIF":
  132.                 sPicName = "gif.gif";
  133.                 break;
  134.         case "JPG":
  135.                 sPicName = "jpg.gif";
  136.                 break;
  137.         case "BMP":
  138.                 sPicName = "bmp.gif";
  139.                 break;
  140.         case "PNG":
  141.                 sPicName = "pic.gif";
  142.                 break;
  143.         case "ASP":
  144.         case "JSP":
  145.         case "JS":
  146.         case "PHP":
  147.         case "PHP3":
  148.         case "ASPX":
  149.                 sPicName = "code.gif";
  150.                 break;
  151.         case "HTM":
  152.         case "HTML":
  153.         case "SHTML":
  154.                 sPicName = "htm.gif";
  155.                 break;
  156.         case "ZIP":
  157.                 sPicName = "zip.gif";
  158.                 break;
  159.         case "RAR":
  160.                 sPicName = "rar.gif";
  161.                 break;
  162.         case "EXE":
  163.                 sPicName = "exe.gif";
  164.                 break;
  165.         case "AVI":
  166.                 sPicName = "avi.gif";
  167.                 break;
  168.         case "MPG":
  169.         case "MPEG":
  170.         case "ASF":
  171.                 sPicName = "mp.gif";
  172.                 break;
  173.         case "RA":
  174.         case "RM":
  175.                 sPicName = "rm.gif";
  176.                 break;
  177.         case "MP3":
  178.                 sPicName = "mp3.gif";
  179.                 break;
  180.         case "MID":
  181.         case "MIDI":
  182.                 sPicName = "mid.gif";
  183.                 break;
  184.         case "WAV":
  185.                 sPicName = "audio.gif";
  186.                 break;
  187.         case "XLS":
  188.                 sPicName = "xls.gif";
  189.                 break;
  190.         case "PPT":
  191.         case "PPS":
  192.                 sPicName = "ppt.gif";
  193.                 break;
  194.         case "SWF":
  195.                 sPicName = "swf.gif";
  196.                 break;
  197.         default:
  198.                 sPicName = "unknow.gif";
  199.                 break;
  200.         }
  201.         return sPicName;
  202.  
  203. }
  204.  
  205. // 取文件名到隐藏的输入框
  206. function GetFileName(url, opt){
  207.         d_filename.value=url.substr(url.lastIndexOf(opt)+1);
  208. }
  209.  
  210. </script>
  211.  
  212.  
  213. <BODY bgColor=menu>
  214.  
  215. <table border=0 cellpadding=0 cellspacing=0 align=center>
  216. <tr>
  217.         <td>
  218.         <fieldset>
  219.         <legend>文件来源</legend>
  220.         <table border=0 cellpadding=0 cellspacing=0>
  221.         <tr><td colspan=9 height=5></td></tr>
  222.         <tr>
  223.                 <td width=7></td>
  224.                 <td width=54 align=right onclick="RadioClick('file')"><input type=radio id="d_checkfromfile" value="1" onclick="RadioClick('file')">上传:</td>
  225.                 <td width=5></td>
  226.                 <td colspan=5>
  227.                 <Script Language=JavaScript>
  228.                 document.write('<iframe id=d_file frameborder=0 src="../upload.asp?type=file&style=' + config.StyleName + '" width="100%" height="22" scrolling=no></iframe>');
  229.                 </Script>
  230.                 </td>
  231.                 <td width=7></td>
  232.         </tr>
  233.         <tr><td colspan=9 height=5></td></tr>
  234.         <tr>
  235.                 <td width=7></td>
  236.                 <td width=54 align=right onclick="RadioClick('url')"><input type=radio id="d_checkfromurl" value="1" onclick="RadioClick('url')">网络:</td>
  237.                 <td width=5></td>
  238.                 <td colspan=5><input type=text id="d_fromurl" style="width:243px" size=30 value="http://"></td>
  239.                 <td width=7></td>
  240.         </tr>
  241.         <tr><td colspan=9 height=5></td></tr>
  242.         </table>
  243.         </fieldset>
  244.         </td>
  245. </tr>
  246. <tr><td height=5></td></tr>
  247. <tr><td align=right><input type=submit value='  确定  ' id=Ok onclick="ok()">&nbsp;&nbsp;<input type=button value='  取消  ' onclick="window.close();"></td></tr>
  248. </table>
  249.  
  250. <div id=divProcessing style="width:200px;height:30px;position:absolute;left:70px;top:30px;display:none">
  251. <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>
  252. </div>
  253. <input type=hidden id=d_filename value="">
  254. </body>
  255. </html>
  256.  
downloadfile.htm Source code - Download Source of party and Government official open source Government TS version v1.0 Source code
Related Source Codes/Software:
Sunzhuang town government - Simple and practical! 5.15KB
160 Shenzhen rental rental information network - Rental information network-a very good site, which... 79.99KB
Christmas blessings wishing wall - Christmas blessings wishing wall 3.56KB
ZerooneCMS v3.1 - A based on ASP.NET v2.0 of CMS, support Sql Server... 5.27KB
Zen Cart v1.3.0.2 Chinese Simplified version - Interface before and after culture in all, backgro... 15.93KB
Love agent shop navigation friendship China buffet chain V1.0 - Fully functional, application link, points into on... 4.34KB
Quanzhou China networks limited - Admin admin admin 21.45KB
Like webmaster forums - Administrator account: adminPassword: 86,552,4... 9.17KB
Journey of legends ASP.NET version system - Abbreviation for Cms is a Content Management Syste... 18.45KB
M media corporate website system v3.5.2 - M media on the powerful systems in addition to foc... 5.69KB
China source download System v1.0 - This 3-to beautify the program downloaded by the i... 5.26KB
Ganzhou Windows network - Cover feature:Windows Home | News vertical and... 34.61KB
Strains of strain of beautiful personal home page Build20061004 - -----------Modified part-------------1: added ... 7.7KB
Southwest agricultural information network - Southwest agricultural information network, an agr... 98.89KB
ZWMOBI 3G mobile station system - Powerful business modules, including mobile B2C mo... 3.89KB
As a campus site system v2.0 - For most school,, to built features powerful of ma... 44.88KB
Evening student seating system 7 - Evening student seating system is facilitated the ... 26.4KB
94KK be reluctant network community beautification bate3 (new year Edition) - Kernel KB 94kkBBS Forum, new landscaping, further ... 24.82KB
QQ Flash Word - 1. powerful DIY feature, which is now immeasurably... 67KB
Zoomla! Eall CMS v2.0 - Waves CMS is committed to providing our webmasters... 11.31KB

 Back to top