diff --git a/index.php b/index.php index 7630ecd..f09b236 100644 --- a/index.php +++ b/index.php @@ -41,6 +41,8 @@ $is_authenticated = $session_cl_auth_user !== ''; $scan_reference_rows = []; $scan_reference_max_occurrence = 0; $scan_reference_error = null; +$ship_preset_rows = []; +$ship_preset_error = null; try { $db = db(); @@ -97,6 +99,31 @@ try { } catch (Throwable $e) { $scan_reference_error = 'Impossible de charger le tableau des signatures de scan pour le moment.'; } + +try { + if (!isset($db) || !($db instanceof PDO)) { + $db = db(); + } + + $stmt_ship_presets = $db->query( + "SELECT cl_scpreset_id, cl_scpreset_name, cl_scpreset_manufacturer, cl_scpreset_description, cl_scpreset_link, cl_scpreset_creator + FROM tbl_scpreset + ORDER BY cl_scpreset_manufacturer ASC, cl_scpreset_name ASC" + ); + + foreach ($stmt_ship_presets->fetchAll() as $row) { + $ship_preset_rows[] = [ + 'id' => (string) ($row['cl_scpreset_id'] ?? ''), + 'name' => trim((string) ($row['cl_scpreset_name'] ?? '')), + 'manufacturer' => trim((string) ($row['cl_scpreset_manufacturer'] ?? '')), + 'creator' => trim((string) ($row['cl_scpreset_creator'] ?? '')) ?: 'Inconnu', + 'description' => trim((string) ($row['cl_scpreset_description'] ?? '')) ?: 'Aucune description disponible pour ce preset.', + 'link' => trim((string) ($row['cl_scpreset_link'] ?? '')), + ]; + } +} catch (Throwable $e) { + $ship_preset_error = 'Impossible de charger les presets de vaisseaux pour le moment.'; +} ?> @@ -326,13 +353,144 @@ try { color: #b5bcc8; } + .modal-ship-presets { + width: 92%; + max-width: 1320px; + min-width: 940px; + } + + .ship-presets-dialog { + background: linear-gradient(180deg, rgba(17, 22, 31, 0.98), rgba(8, 11, 18, 0.98)); + border: 1px solid rgba(162, 155, 120, 0.35); + box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); + } + + .ship-presets-dialog h3 { + font-size: 1.75em; + letter-spacing: 0.08em; + } + + .ship-presets-dialog > div { + padding: 22px 26px 26px; + } + + .ship-presets-intro, + .ship-presets-empty, + .ship-presets-error { + margin: 0 0 18px; + padding: 12px 14px !important; + border-radius: 10px; + font-size: 0.95em; + text-align: left !important; + } + + .ship-presets-intro { + background: rgba(162, 155, 120, 0.12); + border: 1px solid rgba(162, 155, 120, 0.18); + } + + .ship-presets-empty { + background: rgba(255, 255, 255, 0.06); + border: 1px solid rgba(255, 255, 255, 0.12); + } + + .ship-presets-error { + background: rgba(140, 32, 32, 0.18); + border: 1px solid rgba(255, 88, 88, 0.25); + color: #ffbdbd; + } + + .ship-presets-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 18px; + max-height: 68vh; + overflow-y: auto; + padding-right: 4px; + } + + .ship-preset-card { + display: flex; + flex-direction: column; + justify-content: space-between; + min-height: 290px; + padding: 18px; + border-radius: 16px; + background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)); + border: 1px solid rgba(162, 155, 120, 0.22); + box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22); + gap: 14px; + } + + .ship-preset-card-header { + display: flex; + flex-direction: column; + gap: 8px; + } + + .ship-preset-card-manufacturer { + margin: 0; + font-size: 0.74em; + text-transform: uppercase; + letter-spacing: 0.14em; + color: rgba(162, 155, 120, 0.95); + } + + .ship-preset-card-name { + margin: 0; + font-size: 1.35em; + line-height: 1.2; + color: #ffffff; + text-transform: uppercase; + } + + .ship-preset-card-meta { + margin: 0; + font-size: 0.78em; + color: rgba(255, 255, 255, 0.68); + } + + .ship-preset-card-description { + margin: 0; + font-size: 0.88em; + line-height: 1.6; + color: rgba(255, 255, 255, 0.82); + flex: 1; + } + + .ship-preset-card-link { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 10px 14px; + border-radius: 999px; + border: 1px solid rgba(162, 155, 120, 0.4); + background: rgba(162, 155, 120, 0.12); + color: #f6f1dc; + font-size: 0.76em; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; + text-decoration: none; + transition: background 0.18s ease, transform 0.18s ease; + } + + .ship-preset-card-link:hover, + .ship-preset-card-link:focus-visible { + background: rgba(162, 155, 120, 0.22); + transform: translateY(-1px); + outline: none; + } + @media (max-width: 1100px) { - .modal-scan-reference { + .modal-scan-reference, + .modal-ship-presets { width: 96%; min-width: 0; } - .scan-reference-dialog h3 { + .scan-reference-dialog h3, + .ship-presets-dialog h3 { font-size: 1.2em; } @@ -344,13 +502,28 @@ try { .scan-reference-filter-status { text-align: left; } + + .ship-presets-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + + @media (max-width: 720px) { + .ship-presets-grid { + grid-template-columns: 1fr; + } + + .ship-preset-card { + min-height: 0; + } }
- Contenu à venir + Signatures de minage + Presets de vaisseaux
id="accountPanel"> @@ -415,6 +588,38 @@ try {
+ +