diff --git a/images/zip-it.png b/images/zip-it.png new file mode 100644 index 0000000..d377805 Binary files /dev/null and b/images/zip-it.png differ diff --git a/plugins/zip-it/index.php b/plugins/zip-it/index.php new file mode 100644 index 0000000..b5645cf --- /dev/null +++ b/plugins/zip-it/index.php @@ -0,0 +1,71 @@ + + + + + +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