本文主要为广大网友提供“asp javascript在线管理”,希望对需要asp javascript在线管理网友有所帮助,学习一下!
复制代码 代码如下:
<%@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>";ca