$s_geraet) { $sub_default = $anzahl_laeufe_array[$g_id]['all'] ?? $default; $is_g_specific = isset($anzahl_laeufe_array[$g_id]['all']); foreach ($programme as $p_id => $s_prog) { $is_p_specific = isset($anzahl_laeufe_array[$g_id][$p_id]) && !is_array($anzahl_laeufe_array[$g_id][$p_id]); $k = $is_p_specific ? intval($anzahl_laeufe_array[$g_id][$p_id]) : $sub_default; if ($k < 1) continue; if ($g_id === 0 && !($is_p_specific || $is_g_specific)) continue; for ($i = 1; $i <= $k; $i++) { $options_note[$id][$g_id][$i][$p_id] = 1; } } $runs_per_device[$g_id] = isset($options_note[$id][$g_id]) ? count($options_note[$id][$g_id]) : 0; } if (isset($options_note[$id])) { foreach ($options_note[$id] as $g_id => $g_array) { foreach ($g_array as $run => $run_array) { if (count($run_array) === $total_programs_count) { $options_note[$id][$g_id][$run] = ['A']; } } } } $max = max($runs_per_device); for ($i = 1; $i <= $max; $i++) { foreach ($runs_per_device as $g_id => $run_c) { if ($run_c < $i) continue; $options_note_s_geraet[$id][$i][$g_id] = 1; } } if (isset($options_note_s_geraet[$id])) { foreach ($options_note_s_geraet[$id] as $run => $g_array) { $has_zero = isset($g_array[0]); $expected_count = $has_zero ? $total_geraete_count + 1 : $total_geraete_count; if (count($g_array) === $total_geraete_count && !$has_zero) { $options_note_s_geraet[$id][$run] = 'A'; } } } } $getGeraetName = function($id) use ($geraete) { return $geraete[$id] ?? ''; }; $allOptions = [ 'text' => [ 'text' => 'Eigener statischer Text' ], 'personData' => [ 'geburtsdatum' => 'Geburtsdatum', 'jahrgang' => 'Jahrgang', 'name' => 'Name', 'vorname' => 'Vorname', 'verein' => 'Verein', 'programm' => 'Programm' ], 'sortData' => [ 'rang' => 'Rang', 'startindex' => 'Startreihenfolge' ], 'layoutEls' => [ 'vertical' => 'Vertical' ], 'kampfrichterEls' => [ 'edit' => 'Bearbeitungsicon' ], 'notenData' => $options_note, 'notenGeraetData' => $options_note_s_geraet ]; $allOprionsNameArray = [ 'text' => 'Statischer Text', 'personData' => 'Personendaten', 'sortData' => 'Rangdaten', 'notenData' => 'Noten', 'notenGeraetData' => 'Noten', 'layoutEls' => 'Layout Elemente', 'kampfrichterEls' => 'Elemente Kampfrichter' ]; $jsonstr = db_select($mysqli, $tableRankLiveConfigs, 'json', 'type_slug = ?', [$active_slug], '', 1); $allowed_types = [ 'rankLive-overview' => ["name" => 'RankLive Overview', 'geraet' => 'all', 'type' => 'rankLive'], 'rankLive-geraet' => ["name" => 'RankLive einzelnes Gerät', 'geraet' => 'single', 'type' => 'rankLive'], 'kampfrichter-admin' => ["name" => 'Kampfrichter Admin (alle Geräte)', 'geraet' => 'all', 'type' => 'kampfrichter'], 'kampfrichter-geraet' => ["name" => 'Kampfrichter einzelnes Gerät', 'geraet' => 'single', 'type' => 'kampfrichter'], 'rangliste' => ["name" => 'Rangliste', 'geraet' => 'all', 'type' => 'indev'] ]; // 2. Decode JSON into an associative array $data = json_decode($jsonstr[0]['json'] ?? '', true) ?? []; $headers = $data['header'] ?? []; $bodyColumns = $data['body'] ?? []; function ipn($input) { global $programme; return $programme[$input] ?? ''; } $lindex = 0; $highest_uid = 0; function constructSingleValueSpan($token, $type) { global $lindex; global $highest_uid; $lindex++; $text = $token['text'] ?? ''; $uid = (int) ($token['uid'] ?? 0); if ($uid > $highest_uid) $highest_uid = $uid; $classes = 'singleValueSpan ui-sortable-handle dragable'; $extraAttributes = ''; $boldString = ''; $minDisplayWidth = $token['minDisplayWidth'] ?? 0; $dataAttributes = 'data-min-display-width="' . $minDisplayWidth . '" data-uid="' . $uid . '" data-type="' . htmlspecialchars($type) . '"'; $style = ''; if ($type !== 'kampfrichterEls') { $bold = $token['bold'] ?? false; $font_size = $token['fontSize'] ?? 0; $linked_el_uid = $token['linkedElUid'] ?? 0; if ($font_size > 0) { $style = ' style="font-size: ' . (int)$font_size . 'px"'; } $boldString = ($bold === true || $bold === 'true') ? 'true' : 'false'; $dataAttributes .= ' data-bold="' . $boldString . '" data-linked-el-uid="' . $linked_el_uid . '"'; } switch ($type) { case 'text': $classes .= ' staticText'; $dataAttributes .= ' data-column="' . htmlspecialchars($token['column'] ?? 'text') . '"'; break; case 'kampfrichterEls': $dataAttributes .= ' data-column="' . htmlspecialchars($token['column'] ?? 'text') . '"'; break; case 'personData': $dataAttributes .= ' data-column="' . htmlspecialchars($token['column'] ?? '') . '"'; if (($token['column'] ?? '') === 'geburtsdatum') { $dataAttributes .= ' data-php-date-format="' . htmlspecialchars($token['phpDateFormat'] ?? '') . '"'; } break; case 'notenData': $dataAttributes .= ' data-field-type-id="' . htmlspecialchars($token['field-type-id'] ?? '') . '"'; $dataAttributes .= ' data-geraet-id="' . htmlspecialchars($token['geraet-id'] ?? '') . '"'; $dataAttributes .= ' data-run="' . htmlspecialchars($token['run'] ?? '') . '"'; $dataAttributes .= ' data-programm-ids="' . htmlspecialchars($token['programm-ids'] ?? '') . '"'; $notenNullable = $token['notenNullable'] ?? false; $notenNullableStr = ($notenNullable === 'true' || $notenNullable === true) ? 'true' : 'false'; $dataAttributes .= ' data-noten-nullable="' . $notenNullableStr . '"'; break; case 'notenGeraetData': $dataAttributes .= ' data-field-type-id="' . htmlspecialchars($token['field-type-id'] ?? '') . '"'; $dataAttributes .= ' data-run="' . htmlspecialchars($token['run'] ?? '') . '"'; $notenNullable = $token['notenNullable'] ?? false; $notenNullableStr = ($notenNullable === 'true' || $notenNullable === true) ? 'true' : 'false'; $dataAttributes .= ' data-noten-nullable="' . $notenNullableStr . '"'; break; case 'sortData': $dataAttributes .= ' data-column="' . htmlspecialchars($token['column'] ?? '') . '"'; break; } ?>
= $extraAttributes; ?>= $style ?>>
= htmlspecialchars($text) ?>
Text:
Wert 0.00
nicht
anzeigen?
>
PHP-Datumsformat
Fetter Text:
>
Schriftgrösse
px
Minimale Bildschirmbreite
px
Conditional Display
Element auswählen…
Löschen
X
Konfiguration RankLive
= $allowed_types[$active_slug]['name'] ?? '' ?>
$s_type_data): ?>
= htmlspecialchars($s_type_data['name']) ?>
X
+
+
Minimale Bildschirmbreite
px
+
Spalte hinzufügen
Tablelle importieren
Gespeicherte Tablelle exportieren
Tablelle speichern
Dieses Feature befindet sich zurzeit noch in Entwicklung
Bitte auswählen…
$sNotenGroup): ?>
= $allOprionsNameArray[$sNotenGroupName] ?>
$sNote): ?> $n_array_gerate): ?> $n_array_run): ?> 1 ? ' (Run ' . $run . ')' : ''; $geraet = (intval($g_id) !== 0) ? ', ' . ($geraete[$g_id] ?? 'INTERNAL ERROR') : ''; ?>
= $indexed_noten[$key] ?>= $geraet ?>= $runs ?>= $displayed_progs ?>
1; foreach ($sNote as $run => $run_geraete): $run_text = ($multiple_runs) ? " R". $run : ''; $geraete_text = (is_array($run_geraete) && !empty($run_geraete)) ? " (nur " . implode(", ", array_map($getGeraetName, array_keys($run_geraete))) . ")" : ""; ?>
= $note_name ?>= $run_text ?>= $geraete_text ?>
= $sNote ?>