FileList.js
上传用户:q2283699q
上传日期:2022-05-17
资源大小:10704k
文件大小:9k
源码类别:

Ftp客户端

开发平台:

Visual C++

  1. var tbhb=0;var zjj=0;var xtpb=0;var zld=0;var djfb=0;var cmnb=0;AW.Formats.Filesize=AW.System.Format.subclass();AW.Formats.Filesize.create=function(){var lng=this.prototype;var pwm=this.superclass.prototype;lng.init=function(){pwm.init.call(this);this.m_sShortcutSize1="18446744073709551615";this.m_sShortcutSize2="18446744073709552000";};lng.dataToText=function(rbq){if((rbq.toString()==this.m_sShortcutSize1)||(rbq.toString()==this.m_sShortcutSize2))return(hrm(0,false));else return(hrm(rbq,false));};lng.dataToValue=function(rbq){var bj=parseInt(rbq);if((isNaN(bj))||(rbq==this.m_sShortcutSize1)||(rbq==this.m_sShortcutSize2))return(0);else return(bj);};lng.comparator=fsz;};AW.Formats.LocaleDate=AW.System.Format.subclass();AW.Formats.LocaleDate.create=function(){var lng=this.prototype;var pwm=this.superclass.prototype;var mrkb=new Date();var ldq=mrkb.getTimezoneOffset();lng.init=function(){pwm.init.call(this);};lng.dataToText=function(rbq){if((typeof(rbq)=="undefined")||(rbq==""))return("");else{if((AW.ie)&&(parseInt(navigator.appVersion)>=4))return(VBDateFormat(rbq,ldq));else{return(qjwb(rbq));}}};lng.dataToValue=function(rbq){var bj=parseInt(rbq);if(isNaN(bj))return(0);else return(bj);};lng.comparator=fsz;};AW.Formats.BWCFileString=AW.Formats.XMLString.subclass();AW.Formats.BWCFileString.create=function(){var lng=this.prototype;var pwm=this.superclass.prototype;lng.init=function(){pwm.init.call(this);};lng.dataToText=function(rbq,ycn,ysjb,nffb){var jzr="";rbq=gbpb(rbq);rbq=rbq.replace(new RegExp("&","g"),"&amp;");if((ycn!=undefined)&&(ycn.getCellValue(7,nffb))&&((jzr=decodeURIComponent(ycn.getCellData(6,nffb)))!=""))return(kdf(rbq,true)+" ("+jzr+")");else return(kdf(rbq,true));};lng.comparator=fsz;};function fsz(dtfb,jlvb,ftpb,equal,tqgb){return(function(psx,cvw){try{var dnbb=dtfb[psx];var tqm=dtfb[cvw];var dsj=false;var mkj;if(isNaN(dnbb)&&isNaN(tqm)){dnbb=dnbb.toLocaleLowerCase();tqm=tqm.toLocaleLowerCase();mkj=dnbb.localeCompare(tqm);}else dsj=true;var ykbb=wnk.getCellValue(4,psx);var xqbb=wnk.getCellValue(4,cvw);if(!dsj){if(ykbb==xqbb){if(mkj>0){return jlvb}if(mkj<0){return ftpb}return equal(psx,cvw);}else{if(ykbb==1){return ftpb}else{return jlvb}}}else{if(ykbb==xqbb){if(dnbb>tqm){return jlvb}if(dnbb<tqm){return ftpb}return equal(psx,cvw);}else{if(ykbb==1){return ftpb}else{return jlvb}}}}catch(mls){return tqgb(psx,cvw,mls);}});}function bxnb(lxnb){var jwjb="";if(lxnb!=undefined){jwjb=lxnb.replace(eval("/%2F/g"),"/");jwjb=jwjb.replace(eval("/%3A/g"),":");jwjb=jwjb.replace(eval("/%26/g"),"&");jwjb=jwjb.replace(eval("/%24/g"),"$");jwjb=jwjb.replace(eval("/%2C/g"),",");jwjb=jwjb.replace(eval("/%40/g"),"@");jwjb=jwjb.replace(eval("/%23/g"),"#");jwjb=jwjb.replace(eval("/%2B/g"),"+");jwjb=jwjb.replace(eval("/%3D/g"),"=");jwjb=jwjb.replace(eval("/%3B/g"),";");jwjb=decodeURI(jwjb);}return(jwjb);}function jdm(jnv,ysjb,fly){var hth=parseInt(this.getCellValue(4,fly))?true:false;var brgb=parseInt(this.getCellValue(7,fly))?true:false;if((hth)||(brgb)){this.UpdateText("",1,fly);if(brgb){var ypk=parseInt(this.getCellValue(8,fly));if(ypk==2){if((jnv.toUpperCase()=="A:")||(jnv.toUpperCase()=="B:"))return(vms(2));else return(vms(7));}else return(vms(ypk));}else return("DirExt");}else return(dzkb(jnv.substr(jnv.lastIndexOf(".")+1)));}function htmb(){zjj=0;tbhb=0;xtpb=0;zld=0;djfb=0;cmnb=0;document.getElementById("TotalFiles").innerHTML="0";document.getElementById("TotalDirs").innerHTML="0";document.getElementById("TotalSize").innerHTML="0";}function mkgb(){wnk.raiseEvent("adjustScrollBars");wnk.raiseEvent("adjustScrollHeight");wnk.setScrollTop(0);}function trs(){if(wnk.getCellText(4,wnk.getSelectedRows())==1)ttn="<strong>"+smdb+"</strong>";else if(wnk.getCellText(4,wnk.getSelectedRows())==0)ttn="<strong>"+gfq+"</strong>";return(ttn);}function zbw(){if(wnk.getCellText(4,wnk.getSelectedRows())==1)yhcb="FileOpen";else if(wnk.getCellText(4,wnk.getSelectedRows())==0)yhcb="Download";return(yhcb);}function qjwb(wfjb){var sxk=new Date(parseInt(wfjb)*1000);return(sxk.toLocaleString());}function mxr(tsk){var jlkb={"DLL":1,"ISO":1,"MID":1,"WMV":1,"MPG":1,"SAFARI":1,"SAFURL":1,"FIREFOX":1,"FFURL":1,"MOV":1,"M4A":1,"MDB":1,"MP3":1,"PDF":1,"PPT":1,"PNG":1,"DOC":1,"URL":1,"XLS":1,"ZIP":1,"TXT":1,"HTM":1,"HTML":1,"EXE":1,"PSD":1,"AI":1,"INDD":1};tsk=tsk.toUpperCase();switch(tsk){case"MP4":case"M4P":tsk="MOV";break;case"RTF":case"RTX":tsk="DOC";break;case"LOG":tsk="TXT";break;break;case"POT":case"PPA":case"PPS":case"PPZ":case"PWZ":tsk="PPT";break;case"WMA":tsk="MP3";break;case"HTM":case"HTML":if(navigator.userAgent.toLowerCase().indexOf('safari')!=-1)tsk="SAFARI";else if(navigator.userAgent.indexOf("Firefox")!=-1)tsk="FIREFOX";break;case"URL":if(navigator.userAgent.toLowerCase().indexOf('safari')!=-1)tsk="SAFURL";else if(navigator.userAgent.indexOf("Firefox")!=-1)tsk="FFURL";break;}if(jlkb[tsk])return(tsk+"Ext");else return("DefaultExt");}function dzkb(tsk){var jlkb={"AVI":1,"BAT":1,"BMP":1,"C":1,"CAB":1,"CHM":1,"CNT":1,"CPP":1,"CRT":1,"CSV":1,"DEF":1,"DLL":1,"DOC":1,"DOT":1,"DSP":1,"DSW":1,"EXE":1,"GIF":1,"H":1,"ANI":1,"HTML":1,"HTM":1,"HXC":1,"HXI":1,"HXK":1,"HXS":1,"HXT":1,"INI":1,"ISO":1,"JPG":1,"JS":1,"MAK":1,"MDB":1,"MDE":1,"MDW":1,"MDZ":1,"MID":1,"MP3":1,"URL":1,"MOV":1,"MPG":1,"MSI":1,"PPT":1,"PDF":1,"POT":1,"PNG":1,"RC":1,"REG":1,"RTF":1,"SCT":1,"SLN":1,"HLP":1,"TTF":1,"TXT":1,"VBS":1,"SAFARI":1,"FIREFOX":1,"VCPROJ":1,"VSSSCC":1,"XML":1,"WAV":1,"WMA":1,"WMV":1,"WMZ":1,"WRI":1,"XLS":1,"ZIP":1,"PSD":1,"AI":1,"INDD":1};tsk=tsk.toUpperCase();switch(tsk){case"MP4":case"M4P":tsk="MOV";break;case"HTM":case"HTML":case"URL":if(navigator.userAgent.toLowerCase().indexOf('safari')!=-1)tsk="SAFARI";else if(navigator.userAgent.indexOf("Firefox")!=-1)tsk="FIREFOX";break;case"POT":case"PPA":case"PPS":case"PPZ":case"PWZ":tsk="PPT";break;}if(jlkb[tsk])return(tsk+"Ext");else return("DefaultExt");}function vms(bvl){var hdx=["DRIVE_UNKNOWN","DRIVE_NO_ROOT_DIR","DRIVE_REMOVABLE","DRIVE_FIXED","DRIVE_REMOTE","DRIVE_CDROM","DRIVE_RAMDISK","DRIVE_REMOVABLE_OTHER"];bvl=parseInt(bvl);if((!isNaN(bvl))&&(bvl<hdx.length))return(hdx[bvl]);else return("DRIVE_UNKNOWN");}function ssrb(cpr){var mcp;cpr=decodeURIComponent(cpr);if(cpr.toUpperCase()=="/")mcp=[""];else mcp=cpr.split("/");var slg="";var vlkb="<div style='width:100%;'><table cellpadding='0' cellspacing='0' border='0' style='white-space:nowrap;'><tr><td style='white-space:nowrap;>"+hhfb+" - <span id='CurrentDir'></span></td>";var zbdb="";for(var psx=0;psx<mcp.length;psx++){slg+=mcp[psx]+"/";var whs=String('fvb(''+rqf(slg)+'');');var cqdb=String('mvj(''+rqf(slg)+'', '+psx+');');var kwtb=String('xqw('+psx+')');var bnp=document.createElement("div");bnp.id=("crumb-container"+psx);bnp.className="CrumbBarMenu";bnp.style.zIndex="9999";bnp.style.cursor="pointer";bnp.style.height="60px";if(psx<(mcp.length-1)||(mcp.length==1))vlkb+='<td style="white-space:nowrap;" onmouseout="javascript:'+kwtb+'" onmouseover="javascript:'+cqdb+'"><a class="highlightbuttonbox-path" href="javascript:'+whs+'">'+mcp[psx]+'/<span id="crumb'+psx+'" class="CrumbNav">&nbsp;</span></a></td>';else vlkb+='<td style="white-space:nowrap;" onmouseout="javascript:'+kwtb+'" onmouseover="javascript:'+cqdb+'"><a class="highlightbuttonbox-path" href="javascript:'+whs+'">'+mcp[psx]+'<span id="crumb'+psx+'" class="CrumbNav">&nbsp;</span></a></td>';zbdb='<div style="text-align:center;"><img src="'+bcz+'Images/BusyGrid.gif" style="margin:0 auto 0 auto;"></div>';bnp.innerHTML=zbdb;document.getElementsByTagName("body")[0].appendChild(bnp);}vlkb+='</tr></table></div>';return(vlkb);}function mvj(pvtb,pkwb){if(parseInt(tj)!=parseInt(pkwb)){var pvj="/?Command=List&DirsOnly=1&FilesOnly=0&Dir="+encodeURIComponent(pvtb);var gxr=new AW.XML.Table;var vxj=[],vkd=[],mbm=[];var gfr=0;rzk=true;if(tj!=undefined)document.getElementById("crumb-container"+tj).style.visibility="hidden";document.getElementById("crumb-container"+pkwb).style.height="60px";document.getElementById("crumb-container"+pkwb).innerHTML='<div style="text-align:center;"><img src="'+bcz+'Images/BusyGrid.gif" style="margin:0 auto 0 auto;"></div>';tj=pkwb;stj(undefined,"crumb-container"+pkwb,"crumb"+pkwb,true);gxr.setURL(pvj);gxr.setRows("//file");gxr.setColumns(["FileName","FilePath","FileIsDir","FileIsDrive","FileDriveType"]);gxr.response1=gxr.response;gxr.response=function(rbq){this.response1(rbq);for(var ndk=0;ndk<this.getCount();ndk++){var twn="";if(parseInt(this.getData(2,ndk))==1){twn=kdf(this.getData(0,ndk));vxj.push(twn);vkd.push(decodeURIComponent(this.getData(1,ndk)));if(parseInt(this.getData(3,ndk))==1){var ypk=parseInt(this.getData(4,ndk));if(ypk==2){if((twn.toUpperCase()=="A:")||(twn.toUpperCase()=="B:"))mbm.push(vms(2));else mbm.push(vms(7));}else mbm.push(vms(ypk));}else mbm.push("DirShortcut");gfr++}}setTimeout(function(){gwtb(vkd,vxj,pkwb,mbm,gfr);},500);rzk=false;};gxr.request();}}function fvb(cpr,spsb,nmv){if(nmv)sypb=true;if(spsb!=undefined){qxq=spsb;cst=lkgb[qxq];}lzb(true,cpr,true);}function rqf(cpr){wg=cpr;wg=wg.replace(new RegExp("[(]","g"),"\(");wg=wg.replace(new RegExp("[)]","g"),"\)");wg=wg.replace(new RegExp("'","g"),"\'");return(wg);}