add select console from zip file

This commit is contained in:
kingprapop 2023-10-17 20:39:43 +07:00 committed by GitHub
parent c37a559fe7
commit c9c6a87f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,18 @@
$ext = explode(".", $name);
$ext = end($ext);
//for zipfile
if ($ext=='zip'){
include_once('pclzip.lib.php');
$zip = new PclZip($name);
$contents = $zip->listContent();
foreach ($contents as $content) {
$names=$content['filename'];
$ext = explode(".", $names);
$ext = end($ext);
}
}
if (in_array($ext, $nes)) { $console = 'nes'; }
else if (in_array($ext, $snes)) { $console = 'snes'; }
else if (in_array($ext, $n64)) { $console = 'n64'; }
@ -153,4 +165,4 @@
</script>
<script src='data/loader.js'></script>
</body>
</html>
</html>