// backup the selected directories // WEBSITE Backup version 1.0 // AB Webservices, Albert // july 2004 ini_set("max_execution_time",0); extract($_POST); // create a backupdir $path1 = $path."dump"; if (isset($dobackup)) { $tst=@mkdir($path1,0766); if ($tst==false) header("location: error.php?error=1"); else @chmod($path1, 0777); } elseif (file_exists($path1) && !isset($submit)) { header("location: error.php?error=1"); } if (!isset($dobackup)) { $c=0; $files=array(); do { // check whether selected $chk ='select'.$c; $ddir ='dirs'.$c; if (!isset($$ddir)) { break; } if ($$chk=='on') { // get the files in the directory into an array if ($$ddir=="--Server Root--") { $dirs0='../'; $ddir = 'dirs0'; } if ($handle = opendir($$ddir) ) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." ) { if ($$ddir=="../") { if (!is_dir($$ddir.$file)) { $files[]=$$ddir.$file; } } else { $files[]=$$ddir."/".$file; } } } } if ($handle!=false) closedir($handle); } $c++; } while(isset($$ddir)); if (count($files)==0) header("location: error.php?error=2"); } else { // start the timer $starttime=time(); $c=0; $files=array(); do { // recreate array $ffiles ='bfiles'.$c; if (!isset($$ffiles)) { break; } $files[]=$$ffiles; $c++; } while(isset($$ffiles)); } ?>
PHP Website Backup :: Backup |
|
| |
| |
| |
| |
|
Return to Main.
Php Website Backup Version 1.1 © 2004 by AB
Webservices |
|