【php ajax实现文件下载】php+ajax实现模拟Win文件管理系统十

更新时间:2014-09-17    来源:系统相关    手机版     字体:

【www.bbyears.com--系统相关】

 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();


  }


 }


 

本文来源:http://www.bbyears.com/aspjiaocheng/9337.html

热门标签

更多>>

本类排行