function Createfolder(){//創建文件夾
document.getElementById('t').style.display='block';
}
function Copy(path,tage){//復制文件
var time = new Date();
var filepath ="filepath";
time.setTime(time.getTime()+60000);
if(tage == 'c'){
document.getElementById(path).style.filter = "Alpha(Opacity=50,style=0);";//設置透明度讓用戶感覺是文件被剪切了,
path=path+"|";
}
document.cookie = filepath+"="+path+"; expires="+time.toGMTString()+"; path=/";//由於要用到全局變量所以用了cookie保存功能,
}
function Past(cookname,currentpath){//取得剪板中的文件
if(cookname == "" ){return false;}
var cookies = document.cookie;
if(cookies == ""){ alert("剪切貼為空!"); return false; }
var arrar = cookies.split("; ");
for(var i=0;i<=arrar.length-1;i++){
if( arrar[i].indexOf(cookname)!= -1 ){
returnvalue=arrar[i].split("=");
Pastfile(returnvalue[1],currentpath);
}
}
}
function Pastfile(p_file,p_path){// 粘貼文件
CreateAjax();
var name=p_file.substring(p_file.lastIndexOf("/")+1);
var url="rename.php?path="+encodeURI(p_path.replace("/","\/"))+"&nname="+name+"©path="+p_file+"&action=past&rd="+Math.random();
Senddata('GET',url,Pastreturn,'');
}
function Pastreturn(){
if(xmlhttp.readystate == 4 || xmlhttp.status == 200){
window.location.reload();
}
}