open($zipFile); // Create all files & dirs, in 1kb chunks for($i=0; $i<$zip->numFiles; $i++) { $name = $zip->getNameIndex($i); // Determine output filename $file = $target.$name; // Create the directories if necessary $dir = dirname($file); if (!is_dir($dir)) mkdir($dir, 0777, true); // Read from zip and write to disk $fpr = $zip->getStream($name); if (!is_dir($file)) { $fpw = fopen($file, 'w'); while ($data = fread($fpr, 1024)) { fwrite($fpw, $data); } fclose($fpw); } fclose($fpr); } $zip->close(); // Remove the tmp zip file unlink($zipFile); // Start creating a new chunk for the plugins settings $settingsNew = '"plugins" => array('; // Set all the old plugins for ($i=0; $iwindow.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;"; die('saving plugins...'); } else { echo ""; } } // Function to delete the plugin dir & files/dirs inside function deletePlugin($dir) { $mydir = opendir($dir); while(false !== ($file = readdir($mydir))) { if($file != "." && $file != "..") { chmod($dir.$file, 0777); if(is_dir($dir.$file)) { chdir('.'); deletePlugin($dir.$file.'/'); if(is_dir($dir.$file)) { rmdir($dir.$file) or DIE("couldn't delete dir: $dir$file
"); } } else unlink($dir.$file) or DIE("couldn't delete file: $dir$file
"); } } closedir($mydir); rmdir($dir); } ?> ICEcoder <?php echo $ICEcoder["versionNo"];?> plugins manager

plugins

','writingPlugins')" style="position: absolute; top: 26px; right: 20px">
Guide to writing plugins
0) { ?>

Manage Installed


'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo ''; echo ''; echo ''; echo ''; ?>
URL Target Timer
'.$plugins[$i][0].''.$plugins[$i][0].'
Update
">

Install / Uninstall


'.PHP_EOL; } $installUninstallButton = '
Install
'; for ($j=0; $jUninstall'; } } echo ''; echo ''; $styleExtra = ($i % 2 == 1 || $i == count($pluginsData)-1) ? "0" : "30px"; echo ''; if ($i % 2 == 1 || $i == count($pluginsData)-1) { echo PHP_EOL.''.PHP_EOL; } } ?>
'.$pluginsData[$i]['name'].''.$pluginsData[$i]['name'].''.$installUninstallButton.'