update xport
All checks were successful
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Successful in 14s
All checks were successful
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Successful in 14s
This commit is contained in:
@@ -59,34 +59,20 @@ function kc_teilnehmer_page() {
|
||||
|
||||
$output = fopen('php://output', 'w');
|
||||
$delimiter = ';';
|
||||
fputcsv($output, ['Vorname','Nachname','Wahl','Phase','Wunsch 1','Wunsch 2','Wunsch 3'], $delimiter);
|
||||
fputcsv($output, ['Vorname','Nachname','Wahl','Phase'], $delimiter);
|
||||
|
||||
foreach ($export_rows as $tn) {
|
||||
$w1_id = intval($tn->wunsch1);
|
||||
$w2_id = intval($tn->wunsch2);
|
||||
$w3_id = intval($tn->wunsch3);
|
||||
|
||||
$w1_disp = $w1_id && isset($workshops_map[$w1_id]) ? $workshops_map[$w1_id] : ($w1_id ? strval($w1_id) : '');
|
||||
$w2_disp = $w2_id && isset($workshops_map[$w2_id]) ? $workshops_map[$w2_id] : ($w2_id ? strval($w2_id) : '');
|
||||
$w3_disp = $w3_id && isset($workshops_map[$w3_id]) ? $workshops_map[$w3_id] : ($w3_id ? strval($w3_id) : '');
|
||||
|
||||
$wahl_name = isset($wahl_name_map[intval($tn->wahl_id)]) ? $wahl_name_map[intval($tn->wahl_id)] : '';
|
||||
|
||||
$vorname = preg_replace('/<[^>]*>/', '', $tn->vorname);
|
||||
$nachname = preg_replace('/<[^>]*>/', '', $tn->nachname);
|
||||
$wahl_name_clean = preg_replace('/<[^>]*>/', '', $wahl_name);
|
||||
$w1_clean = preg_replace('/<[^>]*>/', '', $w1_disp);
|
||||
$w2_clean = preg_replace('/<[^>]*>/', '', $w2_disp);
|
||||
$w3_clean = preg_replace('/<[^>]*>/', '', $w3_disp);
|
||||
|
||||
fputcsv($output, [
|
||||
$vorname,
|
||||
$nachname,
|
||||
$wahl_name_clean,
|
||||
intval($tn->phase),
|
||||
$w1_clean,
|
||||
$w2_clean,
|
||||
$w3_clean
|
||||
intval($tn->phase)
|
||||
], $delimiter);
|
||||
}
|
||||
|
||||
@@ -307,7 +293,7 @@ function kc_teilnehmer_page() {
|
||||
|
||||
echo '<div class="kc-admin-table-wrap">';
|
||||
echo '<h2 style="margin-top:0;">Alle Teilnehmer</h2>';
|
||||
echo '<a id="kc-export-current-view" class="kc-btn" style="float:right;margin-right:8px;margin-bottom:12px;background:#2da66a;color:#fff;" href="?page=kc_teilnehmer&export_csv=1">CSV Export (Ansicht)</a>';
|
||||
echo '<a id="kc-export-current-view" class="kc-btn" style="float:right;margin-right:8px;margin-bottom:12px;background:#2da66a;color:#fff;" href="?page=kc_teilnehmer&export_csv=1">Teilnehmer-Export (Ansicht)</a>';
|
||||
echo '<a class="kc-btn" style="float:right;margin-bottom:12px;" href="?page=kc_teilnehmer&new=1">+ Neuer Teilnehmer</a>';
|
||||
|
||||
// Manuelle Export-Auswahl (Wahl + Phase)
|
||||
@@ -326,7 +312,7 @@ function kc_teilnehmer_page() {
|
||||
echo '<select id="kc-export-phase" name="phase" data-current="'.intval($selected_export_phase).'" style="padding:6px 8px;min-width:140px;">';
|
||||
echo '<option value="">Alle Phasen</option>';
|
||||
echo '</select>';
|
||||
echo '<button type="submit" class="kc-btn" style="background:#2da66a;color:#fff;">CSV Export (Auswahl)</button>';
|
||||
echo '<button type="submit" class="kc-btn" style="background:#2da66a;color:#fff;">Teilnehmer-Export (Auswahl)</button>';
|
||||
echo '</form>';
|
||||
|
||||
// Wahl-Filter-Buttons sortiert nach KC1, KC2, KC3, dann Rest
|
||||
@@ -380,7 +366,7 @@ function kc_teilnehmer_page() {
|
||||
echo '<details style="margin:10px 0 18px 0;border:1px solid #eaeaea;border-radius:6px;padding:8px;">';
|
||||
echo '<summary style="font-weight:700;cursor:pointer;">'. $wahl_disp . ' <span style="color:#555;font-weight:600;">(' . $gesamt . ' TN)</span></summary>';
|
||||
echo '<div style="text-align:right;margin:8px 0 4px 0;">';
|
||||
echo '<a class="kc-btn" style="background:#2da66a;color:#fff;" href="'.esc_url($csv_wahl_url).'">CSV Export dieser Wahl</a>';
|
||||
echo '<a class="kc-btn" style="background:#2da66a;color:#fff;" href="'.esc_url($csv_wahl_url).'">Teilnehmer-Export dieser Wahl</a>';
|
||||
echo '</div>';
|
||||
foreach ($phasen as $phase => $tns) {
|
||||
echo '<details style="margin:10px 0 10px 0;border:1px solid #f0f0f0;border-radius:6px;padding:8px;">';
|
||||
|
||||
Reference in New Issue
Block a user