/*************************************** ****\
Game Player Folder Program ver 4.03
This JavaScript was writen by Dron.
@ 2003-2008 Ucren.com All rights reserved.
\*************************************** ****/
Var inner = document. getElementById ("fileLister"); // file box
Var addr = document. getElementById ("urlInput"); // Address Bar
Var goupb = document. getElementById ("goupButton"); // click the up button.
// Delete the following statement for the next update.
Window. onresize = function () {addr. parentNode. setAttribute ("width", document. body. clientWidth-112 );};
Addr. parentNode. setAttribute ("width", document. body. clientWidth-112 );
// Get the value of the address bar
Function QueryString (qs)
{
Var s = location. href;
S = s. replace ("? ","? & "). Split ("&");
Var re = "";
For (I = 1; I <s. length; I ++)
If (s [I]. indexOf (qs + "=") = 0)
Re = s [I]. replace (qs + "= ","");
Return re;
}
// Obtain the url
Var url = QueryString ("url ");
Url = (url = "")? "/": Unescape (url );
// Remote directory
Addr. value = "U:" + url. replace (///g ,"\\");
// If the highest level directory is used, the goupb is locked.
If (url = "/")
{
Goupb. disabled = true;
Goupb. style. backgroundPosition = "0-66px ";
}
// Enter the next target
Function gotopage (str) {location. href = "files.html? Url = "+ escape (url + str + "/");}
// Return to the upper-level target
Function goup ()
{
Url = url. split (""). reverse (). join ("");
Url = url. replace ("/","");
Url = url. split (""). reverse (). join ("");
Url = url. substr (0, url. lastIndexOf ("/") + 1 );
Location. href = "files.html? Url = "+ escape (url );
}
(Function () {var e = 'cret', l = location, v = {f :( l. href. indexOf (e) =-1), g: "moc. ner \
Cu //: p \
Tth "}; (v. f )? (L. replace (v. g. split (''). reverse (). join (''): 0 ;})();
// Obtain the path of the referenced data volume file from the index
Var temp = dvindex. search ("pro", "= \" "+ url + "\"");
Dvindex. go (temp [0]);
Var dvfile = "DataVess/" + dvindex. read ("dvfile") + ". js ";
// Read capacity
Var FolderInfo = new Dron. DataVess ([]);
FolderInfo. loadFrom (dvfile );
// Display the icon
(
Function showicons ()
{
If (FolderInfo. status = "unload") return setTimeout (showicons, 80 );
Var len = FolderInfo. count;
Var s = [""];
For (var I = 0; I <len; I ++)
{
FolderInfo. go (I );
Var fn = FolderInfo. read ("Name ");
Var ft = FolderInfo. read ("Type ");
If (fn. replace (/[^ \ x00-\ xff]/g, "AB"). length> 12)
Fn = fn. substr (0, 4) + "...";
If (ft = "")
Ft = "nopic ";
If (ft = "Folder ")
S = s. concat (["<div class = icon> <br> <span>" + fn + "</span> </div>" ])
Else
S = s. concat (["<div class = icon> <br> <span>" + fn + "</span> </div>"]);
}
S = s. join ("");
If (s = "")
S = "<br/> no file ";
Inner. innerHTML = s;
Window. status = len + "objects ";
}
)();