function editfile2(fileid){ var filerename=document.getElementById("filerename").value var fileshare='no'; var fileintro=document.getElementById("fileintro").value;
if (filerename!=undefined) { var url = "../editfile.asp?action=save&rename="+escape(filerename)+"&share="+fileshare+"&intro="+fileintro+"&id="+fileid; xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = editfileok; xmlHttp.send(null); } }
function editfileok() { if (xmlHttp.readyState == 4) { gonow(); setmsg(' 编辑文件成功!'); } }
function CheckAll(form) { for (var i=0;i { var e = form.elements[i]; e.checked = true } } function CheckOthers(form) { for (var i=0;i { var e = form.elements[i]; if (e.checked==false) { e.checked = true; } else { e.checked = false; } } }
function creatfolder(){ var foldername=document.getElementById("foldername").value; var y1='no'; var y2='no'; var pwd=document.getElementById("passwordin").value;
if (foldername!=undefined) { var url = "../createfolder.asp?action=create&foldername="+foldername+"&everyone="+y1+"&needpassword="+y2+"&passwordin="+pwd; xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = creatfolderok; xmlHttp.send(null); } }
function creatfolderok() { if (xmlHttp.readyState == 4) { hidemenu(); gonow(); setmsg(' 新建文件夹成功!'); } }
function addlink(){ var urlname=document.getElementById("urlname").value; var y1='no'; var urllocation=document.getElementById("urllocation").value; if(document.getElementById("sharethis").checked) { y1=document.getElementById("sharethis").value; } if (urlname!=undefined) { var url = "addlink.asp?uname="+urlname+"&share="+y1+"&uloction="+urllocation; xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = addlinkok; xmlHttp.send(null); } }
function addlinkok() { if (xmlHttp.readyState == 4) { hidemenu1(); gonow(); setmsg(' 网址标签添加成功!'); } }
function movefiles(){ var fileid=""; var obj=document.getElementsByName('myselect'); for(var i=0; i < obj.length; i++){ if(obj[i].checked) fileid=fileid+obj[i].value+ ','; } if (fileid) { var foldername=document.getElementById("folder").value; var url = "../moveitok.asp?action=createbyurl&folder="+foldername+"&my_select="+fileid; xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = movefilesok; xmlHttp.send(null); } else { alert(" 请先选择文件!"); } }
function movefilesok() { if (xmlHttp.readyState == 4) { hidemenu(); gonow(); setmsg(' 文件移动成功!'); } }
var showl=true;
function showmenu2(){ document.getElementById("Movefiles").style.display="block"; document.getElementById('Movefiles').style.height=20; } function showmenu1(){ document.getElementById("CreateFolder").style.display="block"; document.getElementById('CreateFolder').style.height=20; }
function showmenu4(){ document.getElementById("addlink").style.display="block"; document.getElementById('addlink').style.height=20; }
function showmenu3(){ if (showl != false) { document.getElementById('showloctionx').innerHTML=""; document.getElementById("mylocation").style.display="block"; document.getElementById('mylocation').style.height=20; showl=false } else { document.getElementById('showloctionx').innerHTML=""; document.getElementById("mylocation").style.display="none"; showl=true; }
}
function hidemenu(){ document.getElementById("Movefiles").style.display="none"; document.getElementById("CreateFolder").style.display="none"; }
function hidemenu1(){ document.getElementById("addlink").style.display="none"; }
function setorderby(){ var orderby=document.getElementById("orderby").value; var url = "setorderby.asp?setby="+orderby+"&pid="+Math.random(); xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = setorderbyok; xmlHttp.send(null); }
function setorderbyok() { if (xmlHttp.readyState == 4) { gonow(); setmsg(' 文件排序设置成功!'); } }
function editlink(linkid,urlname,urlloction,share){ document.getElementById(linkid).innerHTML="标签名: 是否公享 网址编辑: "; }
function editlink2(linkidx){ var urlname=document.getElementById("editlinkname").value; var linkshare='no'; var urlloction=document.getElementById("editlinkloaction").value; if(document.getElementById("editlinkshare").checked) { linkshare=document.getElementById("editlinkshare").value; } if (urlname!=undefined) { var url = "editlink.asp?uname="+urlname+"&share="+linkshare+"&uloction="+urlloction+"&id="+linkidx+"&pid="+Math.random(); xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange = editlinkok; xmlHttp.send(null); } }
function editlinkok() { if (xmlHttp.readyState == 4) { gonow(); setmsg(' 编辑网址标签成功!'); } }
function highlightme(o){ o.parentNode.parentNode.style.backgroundColor = (o.checked)?"#FFEBD7":"" }