復制代碼 代碼如下:
<%@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 (
[email protected])\\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"*/};this.GetDriverList = function(){/*返回驅動器列表的數組*/var fso = this.fso;var a = new Array();var e = new Enumerator(fso.Drives);a[a.length] = new Array(bIsReady/*是否就緒*/, "<font face='wingdings' class='ItemIconStyle'>y</font>", "<nobr>[Home]</nobr> <nobr>CCDM 4.51</nobr>", "", Server.MapPath("."), 20, "", "", "", "","COCOON Online Disk Manager 4.51.4714", "Producted by Cocoon Studio (www.ccopus.com)", "Coding by Sunrise_Chen");for (; !e.atEnd(); e.moveNext()){var bIsReady = false;var x = e.item();try{bIsReady = x.isReady;};catch(e){bIsReady = false;};if(bIsReady){a[a.length] = new Array(bIsReady/*是否就緒*/, GetIconByType_Driver(x.DriveType)/*圖標,用於顯示*/, "<nobr>" + GetTypeName(x.DriveType) + "</nobr> <nobr>(" + x.DriveLetter + ":)</nobr>"/*名稱,用於顯示*/, GetTypeName(x.DriveType) + "(" + x.DriveLetter + ")", x.RootFolder/*根目錄*/, 16/**/, GetTypeName(x.DriveType), "<div align=right>" + FormatSize(x.TotalSize) + "</div>", "<div align=right>" + FormatSize(x.AvailableSpace) + "</div>", "", "路徑: " + x.RootFolder, "類型: " + GetTypeName(x.DriveType), "文件系統: " + x.FileSystem, "卷標: " + x.VolumeName, "總容量: " + FormatSize(x.TotalSize), "剩余容量: " + FormatSize(x.AvailableSpace));};else{a[a.length] = new Array(bIsReady, GetIconByType_Driver(x.DriveType), "<nobr>" + GetTypeName(x.DriveType) + "</nobr> <nobr>(" + x.DriveLetter + ":)</nobr>", GetTypeName(x.DriveType) + "(" + x.DriveLetter + ")", x.DriveLetter + ":\\", -1, GetTypeName(x.DriveType), "", "", "", "路徑: " + x.DriveLetter + ":\\", "類型: " + GetTypeName(x.DriveType));};};return a;};/*function GetDriverList;*/this.CurrentFolder = null;this.GetFolderInfo = function(sFolderSpec){if(this.CurrentFolder) return this.CurrentFolder;var fso = this.fso;var a = new Array();try{var x = fso.GetFolder(sFolderSpec);};catch(e){ShowError(e);};a[a.length] = new Array(true, "<font face='wingdings' class='ItemIconStyle'>0</font>", "<span class='ItemTitle'><nobr>" + x.name + "</nobr></span>", x.Name, x.Path, x.Attributes, "路徑: \"" + x.Path + "\"", "屬性: " + GetAttribute(x.Attributes));if(!x.isRootFolder){a[a.length-1]=(new Array).concat(a[a.length-1],Array("創建