Lib. js used in the filemanage function? 1.1.23 var indexnum = 10;
Var count = 0;
Function getmap (sFileName, sId ){
Var Uploadpic = "../filetype/unknown.gif ";
Var sExten = sFileName. substring (sFileName. lastIndexOf (".") + 1, sFileName. length );
Var createp = document. createElement ("p ");
Createp. setAttribute ("id", "myfile _" + sId );
Createp. style. height = "17px ";
Createp. className = "file_p ";
StrHtml ="
"StrHtml + ="
"+ SFileName +" | "StrHtml + ="
|
"
Createp. innerHTML = strHtml;
Document. getElementById ("myfilesarea"). appendChild (createp );
Document. getElementById (sId). style. display = "none"
Count ++;
Checkexist (sExten, sId );
}
Function checkexist (xExt, xId ){
Var picurl = "../filetype/" + xExt + ". gif ";
Var url = "checkexist. asp? Pic = "+ xExt +" & pid = "+ Math. random ();
XmlHttp. open ("GET", url, false );
XmlHttp. onreadystatechange = function sendinfo (){
If (xmlHttp. readyState = 4 ){
If (xmlHttp. status = 200 ){
Var response = xmlHttp. responseText;
If (response = "yes "){
Document. getElementById ('fileext _ '+ xId). src = picurl;
}
}
}
}
XmlHttp. send (null );
}
Function clearfiles (xId ){
Document. getElementById ("myfile _" + xId). removeNode (true );
Document. getElementById (xId). style. display = "block ";
Count --;
}
Function step1 (){
Document. getElementById ("step01"). innerHTML = "Step 1: update files and folders"
Var url = ".../listall. asp? Pid = "+ Math. random ();
XmlHttp. open ("GET", url, true );
XmlHttp. onreadystatechange = step1ok;
XmlHttp. send (null );
}
Function step1ok (){
If (xmlHttp. readyState = 4 ){
Document. getElementById ("step01"). innerHTML = "Step 1: update files and folders"
Document. getElementById ("step02"). innerHTML = "Step 2: delete invalid Files"
SetTimeout ("step2 ()", 1000 );
}
}
Function step2 (){
Var url = "../delall. asp? Pid = "+ Math. random ();
XmlHttp. open ("GET", url, true );
XmlHttp. onreadystatechange = step2ok;
XmlHttp. send (null );
}
Function step2ok (){
If (xmlHttp. readyState = 4 ){
Document. getElementById ("step02"). innerHTML = "Step 2: delete invalid Files"
Document. getElementById ("step03"). innerHTML = "Step 3: Set FTP space synchronization"
SetTimeout ("step3 ()", 1000 );
}
}
Function step3 (){
Var url = "ftpformate. asp? Pid = "+ Math. random ();
XmlHttp. open ("GET", url, true );
XmlHttp. onreadystatechange = step3ok;
XmlHttp. send (null );
}
Function step3ok (){
If (xmlHttp. readyState = 4 ){
Document. getElementById ("step03"). innerHTML = "Step 3: Set FTP space synchronization"
SetTimeout ("step4 ()", 1000 );
}
}
Function step4 (){
Document. getElementById ("filemanage_update"). style. display = "none"
Document. getElementById ("filemanage_all"). style. display = "block ";
Showfiles ();
}
Var tagstate;
Tagstate = "no"
Function showtag (){
If (tagstate = "no "){
Document. getElementById ("arror_01"). src = 'images/arror2.gif'
Document. getElementById ("intro"). style. display = "block ";
Tagstate = "yes ";
} Else {
Document. getElementById ("arror_01"). src = 'images/arror.gif'
Document. getElementById ("intro"). style. display = "none ";
Tagstate = "no ";
}
}
Function showtips (){
Document. getElementById ("layer_tips"). innerHTML =
Document. getElementById ("layer_tips"). style. display = "block ";
Document. getElementById ("layer_tips"). style. pixelTop = window. event. y + 18;
Document. getElementById ("layer_tips"). style. pixelLeft = window. event. x + 12;
}
Function notips (){
Document. getElementById ("layer_tips"). style. display = "none ";
}
Function showfileintro (a, B, c, d, e, f ){
Var count
If (f = ''){
Count = 0
} Else {
Count = f
}
Var htmlstr = "file name:" + a +"
"+" File directory: "+ B +"
"+" File size: "+ c +"
"+" Upload time: "+ d +"
"+" File Introduction: "+ e +"
"+" File downloads: "+ count +"
"
Document. getElementById ("layer_fileintro"). innerHTML = htmlstr
Document. getElementById ("layer_fileintro"). style. display = "block ";
Document. getElementById ("layer_fileintro"). style. pixelTop = window. event. y + 18;
Document. getElementById ("layer_fileintro"). style. pixelLeft = window. event. x + 12;
}
Function nofileintro (){
Document. getElementById ("layer_fileintro"). style. display = "none ";
}