Location: PHPKode > projects > PHPExplorer > modules/pressepapier.php
<?

require_once("../include/varsfuncs.php");

if($ac=="Restaurer"&&$flist){
$z=opendir($tmpd);
 while($s=readdir($z)){
  for($i=0;$flist[$i];$i++){
   $e=$flist[$i];
   if($s==$e||$s==$e.".txt"){
    if(is_dir($tmpd."/".$s)){
      delrep($tmpd."/".$s);
    }else{
      unlink($tmpd."/".$s);
    }
  }
 }}
include("$instp/skins/$sk/msg_jump/_pl_err_clipboad_restaure.php");
exit();}

if($ac=="Copier"||$ac=="Couper"&&$act&&$dir){ $nnn=0;
 if(substr($dir,-1,1)!="/") $dir.="/";
 set_time_limit(2000);
 if($ac=="Couper") $m=1; else $m=0;
 if(!@chdir($tmpd)){
    mkdir($tmpd,""); } chdir($tmpd);
 for($i=0;$act[$i];$i++){ $d=$act[$i];
  if(is_dir($dir.$d)){ cprep($dir,$tmpd,$d,$m); }else{
   fputs(fopen($tmpd."/".$d.".txt","w+"),"$dir$d@$dir@$d@$m");
  $nnn++;}
 }
include("$instp/skins/$sk/msg_jump/_pl_err_clipboad_copied.php");
 }
if(($ac=="Coller"&&$to)||($ac=="Restaurer"&&!$flist)){
 if($flist){
  $z=opendir($tmpd);
  while($s=readdir($z)){
   for($i=0;$flist[$i];$i++){
     if($s==$flist[$i]||$s==$flist[$i].".txt"){
      if(is_dir($tmpd."/".$s)) pastedir($tmpd,$s,$to);
      else{
       if($d!="_wgzxv.pid"){
       $k=explode("@",fgets(fopen($tmpd."/".$s,"r"),999));
       if($nbpaste>1){
         for($i=1;$i<=$nbpaste;$i++){
           Copy($k[0],$to."$i-".$k[2]);
         }
       }else{
         Copy($k[0],$to.$k[2]);
       }
       if($k[3]==1) @unlink($k[0]);}
       @unlink($tmpd."/".$s);
      }
     }
   }
 } print("<Script>window.location.href='$PHP_SELF?ac=Coller&to=$to&rand=".rand(0,9999)."';</Script>");
exit();}
include("$instp/skins/$sk/_pl_clipb/_head.php");
$z=opendir($tmpd); $nn=0;
while($d=readdir($z)){
 if($d!="."&&$d!=".."){$nn++;
  if(is_dir($tmpd."\\".$d)){
   $fromdir=fgets(fopen($tmpd."\\".$d."\\_wgzxv.pid","r"),9999);
   $piec=explode("@",$fromdir); $cut=$piec[1];
   $fromdir=$piec[0]; if($cut==1) $cut="Oui"; else $cut="Non";
include("$instp/skins/$sk/_pl_clipb/_list.php");
  }else{
   $k=explode("@",fgets(fopen($tmpd."\\".$d,"r"),9999));
   $fromdir=$k[1]; $cut=$k[3]; $d=$k[2]; 
   if($cut==1) $cut="Oui"; else $cut="Non"; 
include("$instp/skins/$sk/_pl_clipb/_list.php");
  }
 }
}if($nn==0){ 
include("$instp/skins/$sk/_pl_clipb/_empty.php");
}
include("$instp/skins/$sk/_pl_clipb/_foot.php");
exit(); } ?>
Return current item: PHPExplorer