asp javascript在线管理
编程学习 2021-07-05 10:58www.dzhlxh.cn编程入门
代码如下:
<%@LANGUAGE="JScript" CODEPAGE="936"%><%var sSelfPath = Server.MapPath(Request.ServerVariables("SCRIPT_NAME")(1)).toLowerCase();var sUrl = Request.ServerVariables("URL")(1);var sAction = Request("a")+"";var sTarget = (Request("t")+"").toLowerCase();var sShowSmall = Request("s")+"";var CURRENT_DIRECTORY = Request.Cookies("Cc_Dm_CurrentFolder") + "";if(!isNaN(sShowSmall)){Response.Cookies("CC_Dm_ShowSmall")=sShowSmall;sQueryString = "";var e = new Enumerator(Request.QueryString);for (; !e.atEnd(); e.moveNext()){var x = e.item();if(x!="s"){sQueryString += x + "=" + Request.QueryString(x) + "&";};};Response.Redirect(sUrl+"?"+sQueryString);};sShowSmall = Request.Cookies("CC_Dm_ShowSmall");if(isNaN(parseInt(sShowSmall))) sShowSmall="0";function ShowError(e){Response.write("<script language=javascript>alert('COCOON Online Disk Manager 4.51 \\r\\n"+ " Created by: COCOON Studio (www.ccopus.com)\\r\\n"+ " Coding by: Sunrise_Chen (sunrise_chen@msn.com)\\r\\n"+ "提示信息: \\r\\n\\r\\n "+ Str4Js(e.description) + "');history.back();window.close();<\/script>");Response.end();};function Str4Js(s){return (s+'').replace(/\\/g,"\\\\").replace(/\'/g,"'").replace(/\"/g,""");};function Cc_DiskManager(){try{this.fso = new ActiveXObject("Scripting.FileSystemObject");};catch(e){ShowError(e);};function FormatDateTime(dtDateTime){return new Date(dtDateTime).toLocaleString();};function GetTypeName(s){switch(s){case 0 : return "Unknown";case 1 : return "3.5 软盘";case 2 : return "本地硬盘";case 3 : return "Network";case 4 : return "CD 驱动器";case 5 : return "RamDisk";};};function GetAttribute(nAttrib,b){var a = new Array();if(nAttrib & 128) a[a.length] = (b?"C":"压缩");if(nAttrib & 64) a[a.length] = (b?"":"快捷方式");if(nAttrib & 32) a[a.length] = (b?"A":"归档");if(nAttrib & 16) a[a.length] = (b?"":"文件夹");if(nAttrib & 8) a[a.length] = (b?"":"卷标");if(nAttrib & 4) a[a.length] = (b?"S":"系统");if(nAttrib & 2) a[a.length] = (b?"H":"隐藏");if(nAttrib & 1) a[a.length] = (b?"R":"只读");if(nAttrib & 2048) a[a.length] = (b?"C":"压缩");return a.join((b?"":", "));};function GetIconByType_Driver(n){/*取得指定驱动器类型的图标*/switch(n){case 0 : return "<font face='wingdings' class='ItemIconStyle'>=</font>";case 1 : return "<font face='wingdings' class='ItemIconStyle'><</font>";case 2 : return "<font face='wingdings' class='ItemIconStyle'>;</font>";case 3 : return "<font face='wingdings' class='ItemIconStyle'>=</font>";case 4 : return "<font face='wingdings' class='ItemIconStyle'>></font>";case 5 : return "<font face='wingdings' class='ItemIconStyle'>=</font>";};};function GetIconByType_File(sFileName){var r = "." + sFileName;switch(r.substr(r.lastIndexOf(".")+1).toLowerCase()){case "txt" :return "<font face='wingdings' class='ItemIconStyle'>2</font>";case "exe": case "com": case "pif": case "bat":return "<font face='wingdings' class='ItemIconStyle'>ÿ</font>";case "jpg": case "gif": case "bmp": case "tiff": case "jpeg": case "tif" : case "png" :return "<font face='webdings' class='ItemIconStyle'>Ÿ</font>";case "mp3": case "wav": case"mid" :return "<font face='webdings' class='ItemIconStyle'>¯</font>";default :return "<font face='wingdings 2' class='ItemIconStyle'>/</font>";};};function FormatSize(nSize){if(nSize/Math.pow(1024,3)>0.9) return Math.round(nSize/Math.pow(1024,3)*100)/100 + " GB";else if(nSize/Math.pow(1024,2)>0.9) return Math.round(nSize/Math.pow(1024,2)*100)/100 + " MB";else if(nSize/1024>0.9) return Math.round(nSize/1024*100)/100 + " KB";else return "1 KB";/*nSize + " Bytes"*
上一篇:查询翻页优化第1/2页
下一篇:多域名绑定到一个空间访问不同首页的技巧