-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtool-zip-content.php
More file actions
36 lines (36 loc) · 819 Bytes
/
tool-zip-content.php
File metadata and controls
36 lines (36 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
include_once dirname(__FILE__)."/functions.php";
include_once dirname(__FILE__)."/auth.php";
include dirname(__FILE__)."/conf.php";
if($cfg->authentification_needed && !$userlogin)
{
exit();
}
$filename = path_decode(kh_filter_input(INPUT_GET, 'filepath'), $cfg->rootdir);
$path = path_encode($filename, $cfg->rootdir);
$json_exif = "";
if(file_exists($filename))
{
$zip = new ZipArchive;
if ($zip->open($filename))
{
?>
<div style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" title="<?php echo $path;?>"><?php echo $path;?></div>
<div class="seleted-file-list">
<?php
for($i = 0; $i < $zip->numFiles; $i++)
{
?>
<div><?php echo $zip->getNameIndex($i);?></div>
<?php
}
?>
</div>
<?php
}
else
{
echo 'Error reading zip-archive!';
}
}
?>