Просмотр файла includes/wap/builder/dir_delete.php

Размер файла: 980B
  1. <?php
  2. if ($query2!='') $nocache_=$query2+0;
  3. $fp = @fopen ($userpath."opeation.cache", "r");$testcache = trim(@fgets($fp, 10));@fclose ($fp);
  4. if ($nocache_!=$testcache)
  5. {
  6. $_dir=@realpath($userpath.$currentdir);
  7. if (is_subdir($userpath,$_dir)) dir_delete($_dir);
  8. $fp = fopen ($userpath."opeation.cache", "w+");fwrite ($fp, $nocache_);fclose ($fp);
  9.  
  10. $tmp=explode('/',str_replace($userpath,'',realpath($userpath.$currentdir)));
  11. unset($tmp[sizeof($tmp)-1]);
  12. $_new_current_dir=realpath($userpath.implode('/',$tmp));
  13. if (is_dir($_new_current_dir))
  14. {
  15. $currentdir=str_replace('.','',str_replace('/.','',str_replace($userpath,'',$_new_current_dir.'/.')));
  16. $f=@fopen($sitespath.'/'.$user.'/currentdir.dat','w+');
  17. @fwrite($f,trim($currentdir));
  18. @fclose($f);
  19. }
  20. if (!is_subdir($userpath,$userpath.$currentdir)) $currentdir='.';
  21. if ($currentdir=='') $currentdir='.';
  22. $query1=$query2=$query3=$query4='';
  23. include($buildpath.'dir.php');
  24. exit;
  25. }
  26. ?>