header('Content-Disposition: attachment; filename="' . $filename . '"'); // necessary for IE6 to 8, because without it the download with SSL has problems header('Cache-Control: private'); header('Pragma: public'); } if ($getMode === 'csv') { // download CSV file header('Content-Type: text/comma-separated-values; charset=' . $charset); if ($charset === 'iso-8859-1') { echo utf8_decode($str_csv); } else { echo $str_csv; } } elseif ($getMode === 'pdf') { // output the HTML content $pdf->writeHTML($table->getHtmlTable(), true, false, true, false, ''); // Save PDF to file $pdf->Output(SERVER_PATH . '/adm_my_files/' . $filename, 'F'); // Redirect header('Content-Type: application/pdf'); readfile(SERVER_PATH . '/adm_my_files/' . $filename); ignore_user_abort(true); unlink(SERVER_PATH . '/adm_my_files/' . $filename); } elseif ($getMode === 'html' || $getMode === 'print') { // add table list to the page $page->addHtml($table->show(false)); // create a infobox for the role if ($getMode === 'html' && $numberRoles === 1) { $htmlBox = ''; // only show infobox if additional role information fields are filled if ($role->getValue('rol_weekday') > 0 || strlen($role->getValue('rol_start_date')) > 0 || strlen($role->getValue('rol_start_time')) > 0 || strlen($role->getValue('rol_location')) > 0 || strlen($role->getValue('rol_cost')) > 0 || strlen($role->getValue('rol_max_members')) > 0) {