Compare commits
3 Commits
a827275995
...
f1fb4cd4ea
| Author | SHA1 | Date | |
|---|---|---|---|
| f1fb4cd4ea | |||
|
|
7184d64116 | ||
|
|
5c9c00b48e |
@@ -86,7 +86,8 @@ if (isset($_GET['export_csv']) && current_user_can('manage_options')) {
|
|||||||
$output = fopen('php://output', 'w');
|
$output = fopen('php://output', 'w');
|
||||||
// Excel erwartet in DE meist ; als Trennzeichen
|
// Excel erwartet in DE meist ; als Trennzeichen
|
||||||
$delimiter = ';';
|
$delimiter = ';';
|
||||||
fputcsv($output, ['Phase','Workshop','Teamer','Teilnehmer'], $delimiter);
|
// Kopfzeile mit separaten Namensspalten und Wunsch
|
||||||
|
fputcsv($output, ['Phase','Workshop','Teamer','Nachname','Vorname','Wunsch'], $delimiter);
|
||||||
foreach($phases as $phase) {
|
foreach($phases as $phase) {
|
||||||
if (empty($workshop_groups[$phase])) continue;
|
if (empty($workshop_groups[$phase])) continue;
|
||||||
$display = [];
|
$display = [];
|
||||||
@@ -114,14 +115,27 @@ if (isset($_GET['export_csv']) && current_user_can('manage_options')) {
|
|||||||
foreach($teilnehmer as $t) {
|
foreach($teilnehmer as $t) {
|
||||||
$vorname = preg_replace('/<[^>]*>/', '', $t->vorname);
|
$vorname = preg_replace('/<[^>]*>/', '', $t->vorname);
|
||||||
$nachname = preg_replace('/<[^>]*>/', '', $t->nachname);
|
$nachname = preg_replace('/<[^>]*>/', '', $t->nachname);
|
||||||
$teilnehmer_name = trim($vorname . ', ' . $nachname);
|
|
||||||
$ws_name_clean = preg_replace('/<[^>]*>/', '', $ws_name);
|
$ws_name_clean = preg_replace('/<[^>]*>/', '', $ws_name);
|
||||||
$teamer_str_clean = preg_replace('/<[^>]*>/', '', $teamer_str);
|
$teamer_str_clean = preg_replace('/<[^>]*>/', '', $teamer_str);
|
||||||
|
// Wunsch-Text ermitteln
|
||||||
|
if ($t->wunsch_rang == 0) {
|
||||||
|
$wunsch = 'Vorzuteilung';
|
||||||
|
} elseif ($t->wunsch_rang == -1) {
|
||||||
|
$wunsch = 'zugelost';
|
||||||
|
} elseif ($t->wunsch_rang == 99) {
|
||||||
|
$wunsch = 'Zulosung';
|
||||||
|
} elseif ($t->wunsch_rang > 0) {
|
||||||
|
$wunsch = intval($t->wunsch_rang) . '.';
|
||||||
|
} else {
|
||||||
|
$wunsch = '';
|
||||||
|
}
|
||||||
|
|
||||||
fputcsv($output, [
|
fputcsv($output, [
|
||||||
$phase,
|
$phase,
|
||||||
$ws_name_clean,
|
$ws_name_clean,
|
||||||
$teamer_str_clean,
|
$teamer_str_clean,
|
||||||
$teilnehmer_name,
|
$nachname,
|
||||||
|
$vorname,
|
||||||
$wunsch
|
$wunsch
|
||||||
], $delimiter);
|
], $delimiter);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user