Beispiel #1
0
    if ($admindata['session_liste']) {
        $listdata = $auth->listdata[$admindata['session_liste']];
    }
}
$output->build_listbox(AUTH_VIEW, false, './view.php?mode=' . $mode);
//
// Mode download : téléchargement des fichiers joints à un log
//
if ($mode == 'download') {
    if (!$auth->check_auth(AUTH_VIEW, $listdata['liste_id'])) {
        $output->message('Not_auth_view');
    }
    require WA_ROOTDIR . '/includes/class.attach.php';
    $file_id = !empty($_GET['fid']) ? intval($_GET['fid']) : 0;
    $attach = new Attach();
    $attach->download_file($file_id);
} else {
    if ($mode == 'export') {
        $compressed = null;
        if (EXPORT_FORMAT == 'Zip') {
            $archive_name = 'newsletter.zip';
            $mime_type = 'application/zip';
            $classname = 'Archive_Zip';
            $classfile = 'Archive/Zip.php';
        } else {
            $archive_name = 'newsletter.tar';
            $mime_type = 'application/x-tar';
            $classname = 'Archive_Tar';
            $classfile = 'Archive/Tar.php';
            if (extension_loaded('zlib')) {
                $archive_name .= '.gz';