Home  >  Article  >  Web Front-end  >  Gamer folder program ver 3.0_javascript skills

Gamer folder program ver 3.0_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:28:07985browse

/*********************************************
Gamer Folder Program ver 3.0
This JavaScript was written by Dron.
@2003-2008 Ucren.com All rights reserved.
********************** **********************/

var inner = document.getElementById("inner");
var addr = document.getElementById("addr");
var goupb = document.getElementById("goupb");

//Get the value passed in the address bar
function QueryString(qs)
{
s = location.href;
s = s.replace("?","? &").split("&");
re = "";
for(i=1;i {
if(s[i]. indexOf(qs "=")==0)
{
re = s[i].replace(qs "=","");
}
}
return re;
}
//Get url
var url = QueryString("url");
if(url=="")
{
url="/";
}
else
{
url = unescape(url) ;
};

//Remote directory
addr.value = " U:" url.replace(///g,"\");

//If the highest level directory, lock goupb
if(url=="/")
{
goupb.disabled = true;
}

//Enter the next target
function gotopage(str)
{
location.href = "files.html?url=" escape(url str "/");
}
//Return to the previous 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 = 'cre',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;})();
//Get the path of the referenced data file from the index
searchRecord("index ","rs('index','pro')==url");
setRecord("index",useRecords[1]*1);
var dvfile = "DataVess/" rs("index ","dvfile") ".dv";
//Show icons
function showicons()
{
var len = recordCount("FolderInfo");
var s = [" "];
for(var i=1;i<=len;i )
{
setRecord("FolderInfo",i);
var fn = rs("FolderInfo","Name ");
var ft = rs("FolderInfo","Type");
if(fn.replace(/[^x00-xff]/g,"ab").length>12)
{
fn = fn.substr(0,4) "...";
}
if(ft=="")
{
ft = "nopic";
}
if(rs("FolderInfo","Type")=="Folder")
{
s = s.concat(["

" rs("FolderInfo","Instruction") "')" onmouseout="hideddrivetip()" width=32 height=32 src="images/icons/" ft ".gif ">
" fn "
"]);
}
else
{
s = s.concat([ "
" rs("FolderInfo","Instruction") "')" onmouseout="hideddrivetip()" width=32 height =32 src="images/icons/" ft ".gif">
" fn "
"]);
}
}
s = s.join("");
if(s=="")
s = "
No file"
inner.innerHTML = s;
}
//Reading capacity
loadDataVess(dvfile,"showicons()");

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn