} fclose($res); $_SESSION['upload_files']['percent'] = 100; } fclose($fp); } if ($error) { $_SESSION['upload_files'] = array('error' => $error); } } elseif ($_POST['where'] == 'unzip') { $_SESSION['upload_files'] = array(); require "zip.class.php"; // Get the zipfile class $zipfile = new zipfile(); // Create an object $zipfile->unzip("../../latest.zip", mnmpath); // Check for errors foreach ($zipfile->files as $filea) { $_SESSION['upload_files'] = array('error' => $filea['error']); exit; } $_SESSION['upload_files']['percent'] = 100; } elseif ($_GET['cleanup']) { if (file_exists("../../settings.php.default") && !@unlink("../../settings.php.default")) { $error .= "Can't remove settings.php.default<br>"; } if (file_exists("../../libs/dbconnect.php.default") && !@unlink("../../libs/dbconnect.php.default")) { $error .= "Can't remove /libs/dbconnect.php.default<br>"; } $dir = '../../install'; if ($dh = @opendir($dir)) {