From 655fef4baabb4e062ff99dcec55a7b0cfdf5c731 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 17 Jun 2012 16:13:22 +0100 Subject: [PATCH] Zip It! Plugin Added This replaces backupOpenFiles Now zips up whole website be default, but also can zip up targets This plugin is also now available from the file manager menu --- images/zip-it.png | Bin 0 -> 551 bytes plugins/zip-it/index.php | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 images/zip-it.png create mode 100644 plugins/zip-it/index.php diff --git a/images/zip-it.png b/images/zip-it.png new file mode 100644 index 0000000000000000000000000000000000000000..d3778054d32d58bfcf28800c4ca1d4352628c924 GIT binary patch literal 551 zcmV+?0@(eDP)(RCwCdRJm@#KoAY~5)N?)LBSzt zL5Pxu9`U*S10UeR6*M3^4v7YdOBkF7k4y~SB_XLY602oq-pupNvm@j2_|0Jbe!taf zxvtyocC*=RwOWnEVh=eMe(xcR$K$8dX}8-Ahr`3+U|H6By&jE5`~6;nj~EQFXf%30 zpOsRmxY=xGvl-4G;o%1bMs3>$9%m|*S}YdZ?e=>-nlt44KJK7^6Zm4WIG@j@#3jkn z87Tk^{`hNO4bP7|X1Q9eJkLXdVi{(OkpeSF1Ypc!Fc_dYxFiyZQmNGGbd+R-@o0{d z{b3kEE|){pyV`U*y^L0iCx8Fba7WK%GFhoq3WWkaD1im5FnM}V0_Ei|_(MEgC+C9m zhBx)6AAQIl6a-0o#7j*0(o>fA`1AREuh%P=%aoAlLh^6@ zwS_a83|>Bjn$0HG#-|7mTdzMPVbt|{-Eo{+tp>H2IO_LDgJ9b2Hm7LHG4dy#ukDi@ zV}Cf0$K!IjOsCTjk7(%yJik`J%NOAVJXg?YG{9Vj|LpmL!u$%~YgR-l + + + + +Zip It! for ICEcoder + + + +read())) { + if (($node == '.') || ($node == '..')) {continue;} + if (is_dir($currentDir.$node) && !strpos($currentDir.$node,"_coder")) { + array_push($dirStack,$currentDir.$node.'/'); + } + if (is_file($currentDir.$node)) {$zipFiles[] = $currentDir.$node;} + } + } + } else { + if(file_exists($addItem)) {$zipFiles[] = $addItem;} + } + if(count($zipFiles)) { + $zip = new ZipArchive(); + if($zip->open($zipName,ZIPARCHIVE::CREATE)!== true) {return false;} + foreach($zipFiles as $file) { + $zip->addFile($file,str_replace($_SERVER['DOCUMENT_ROOT']."/","",$file)); + } + $zip->close(); + return file_exists($zipName); + } else { + return false; + } + } +} +if($_SESSION['userLevel']==10) { + $zipItDoZip = new zipIt(); + echo ''; + $zipItAddToZip = $zipItDoZip->zipFilesUp($zipItSaveLocation.$zipItFileName); + if (!$zipItAddToZip) { + echo ''; + } else { + echo ''; + } +} +?> + + + \ No newline at end of file