V1.2.0
This commit is contained in:
parent
3aa2453da2
commit
4591e37c7d
38
admin.php
38
admin.php
@ -354,6 +354,17 @@ $current_session_user = isset($_SESSION['user']) ? (string) $_SESSION['user'] :
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
@ -454,6 +465,28 @@ $current_session_user = isset($_SESSION['user']) ? (string) $_SESSION['user'] :
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
border-color: #565d68;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
select.form-control:focus {
|
||||
background: #3d444f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.form-control option {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.form-control option:checked {
|
||||
background: #4a5260;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.modern-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
@ -541,11 +574,12 @@ $current_session_user = isset($_SESSION['user']) ? (string) $_SESSION['user'] :
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>R.E.A.C.T. Core Admin</h1>
|
||||
<p>Niveau d'accès : <strong><?php echo $is_admin ? 'Administrateur' : 'Membre'; ?></strong> | Session : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></p>
|
||||
<p>Niveau d'accès : <strong><?php echo $is_admin ? 'Administrateur' : 'Membre'; ?></strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Session End</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
<?php if ($is_admin): ?>
|
||||
|
||||
@ -429,6 +429,17 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: 1px solid var(--primary);
|
||||
@ -541,6 +552,28 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
box-shadow: 0 0 0 3px rgba(162, 155, 120, 0.15);
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
border-color: #565d68;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
select.form-control:focus {
|
||||
background: #3d444f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.form-control option {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.form-control option:checked {
|
||||
background: #4a5260;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.form-help {
|
||||
margin-top: 0.4rem;
|
||||
font-size: 0.8rem;
|
||||
@ -759,10 +792,10 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<h1>Item Custom</h1>
|
||||
<p>Associer des objets à autant de bonus / malus de stats que nécessaire</p>
|
||||
</div>
|
||||
<div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
|
||||
<span style="opacity:0.8;">Session: <?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
<div class="topbar-actions">
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Session End</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
22
scitems.php
22
scitems.php
@ -212,6 +212,17 @@ if ($edit_id > 0) {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
@ -289,6 +300,10 @@ if ($edit_id > 0) {
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
.form-control:focus { outline: none; border-color: var(--primary); background: rgba(0, 0, 0, 0.5); }
|
||||
select.form-control { background: #353b45; color: #fff; border-color: #565d68; color-scheme: dark; }
|
||||
select.form-control:focus { background: #3d444f; color: #fff; }
|
||||
select.form-control option { background: #353b45; color: #fff; }
|
||||
select.form-control option:checked { background: #4a5260; color: #fff; }
|
||||
|
||||
.modern-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
|
||||
.modern-table th { text-align: left; padding: 1rem; font-size: 0.8rem; text-transform: uppercase; color: var(--primary); opacity: 0.7; }
|
||||
@ -389,11 +404,12 @@ if ($edit_id > 0) {
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>R.E.A.C.T. Objects Control</h1>
|
||||
<p>Niveau d'accès : <strong>Administrateur</strong> | Session : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></p>
|
||||
<p>Niveau d'accès : <strong>Administrateur</strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@ -167,6 +167,17 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: 1px solid var(--primary);
|
||||
@ -261,11 +272,12 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>Gestion Manufactures</h1>
|
||||
<p>Niveau d\'accès : <strong>Administrateur</strong> | Session : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></p>
|
||||
<p>Niveau d\'accès : <strong>Administrateur</strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
18
scmining.php
18
scmining.php
@ -248,6 +248,17 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: 1px solid var(--primary);
|
||||
@ -447,11 +458,12 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>R.E.A.C.T. Mining Scanner</h1>
|
||||
<p>Niveau d\'accès : <strong>Administrateur</strong> | Session : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></p>
|
||||
<p>Niveau d\'accès : <strong>Administrateur</strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@ -403,6 +403,17 @@ function scnotification_old_checked(array $old, string $key, bool $default = fal
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@ -560,6 +571,28 @@ function scnotification_old_checked(array $old, string $key, bool $default = fal
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
select.control {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
border-color: #565d68;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
select.control:focus {
|
||||
background: #3d444f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.control option {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.control option:checked {
|
||||
background: #4a5260;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-height: 180px;
|
||||
resize: vertical;
|
||||
@ -663,11 +696,12 @@ function scnotification_old_checked(array $old, string $key, bool $default = fal
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>R.E.A.C.T. SC Notification</h1>
|
||||
<p>Niveau d'accès : <strong><?php echo htmlspecialchars($role_label, ENT_QUOTES, 'UTF-8'); ?></strong> | Session : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></p>
|
||||
<p>Niveau d'accès : <strong><?php echo htmlspecialchars($role_label, ENT_QUOTES, 'UTF-8'); ?></strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
22
scpreset.php
22
scpreset.php
@ -328,6 +328,17 @@ unset($preset);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: 1px solid var(--primary);
|
||||
@ -403,6 +414,10 @@ unset($preset);
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
.form-control:focus { outline: none; border-color: var(--primary); background: rgba(0, 0, 0, 0.5); }
|
||||
select.form-control { background: #353b45; color: #fff; border-color: #565d68; color-scheme: dark; }
|
||||
select.form-control:focus { background: #3d444f; color: #fff; }
|
||||
select.form-control option { background: #353b45; color: #fff; }
|
||||
select.form-control option:checked { background: #4a5260; color: #fff; }
|
||||
.form-control:disabled { opacity: 0.55; cursor: not-allowed; }
|
||||
.form-help {
|
||||
margin-top: 0.5rem;
|
||||
@ -463,11 +478,12 @@ unset($preset);
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>R.E.A.C.T. Ship Presets</h1>
|
||||
<p>Niveau d\'accès : <strong><?php echo htmlspecialchars($role_label); ?></strong> | Session : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></p>
|
||||
<p>Niveau d\'accès : <strong><?php echo htmlspecialchars($role_label); ?></strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@ -192,6 +192,17 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: 1px solid var(--primary);
|
||||
@ -279,6 +290,28 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
box-shadow: 0 0 0 3px var(--primary-glow);
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
border-color: #565d68;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
select.form-control:focus {
|
||||
background: #3d444f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.form-control option {
|
||||
background: #353b45;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
select.form-control option:checked {
|
||||
background: #4a5260;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.form-help {
|
||||
margin-top: 0.75rem;
|
||||
color: #9ca3af;
|
||||
@ -353,10 +386,10 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<h1>Stats Item</h1>
|
||||
<p>Gestion libre des statistiques d'objets</p>
|
||||
</div>
|
||||
<div style="display:flex; gap:10px; flex-wrap:wrap;">
|
||||
<span style="align-self:center; opacity:0.8;">Session: <?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></span>
|
||||
<div class="topbar-actions">
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Session End</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@ -168,6 +168,17 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
padding: 0.6rem 1.2rem;
|
||||
border: 1px solid var(--primary);
|
||||
@ -243,7 +254,10 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
.form-control:focus { outline: none; border-color: var(--primary); background: rgba(0, 0, 0, 0.5); }
|
||||
select.form-control option { background: var(--bg-dark); color: #fff; }
|
||||
select.form-control { background: #353b45; color: #fff; border-color: #565d68; color-scheme: dark; }
|
||||
select.form-control:focus { background: #3d444f; color: #fff; }
|
||||
select.form-control option { background: #353b45; color: #fff; }
|
||||
select.form-control option:checked { background: #4a5260; color: #fff; }
|
||||
|
||||
.modern-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
|
||||
.modern-table th { text-align: left; padding: 1rem; font-size: 0.8rem; text-transform: uppercase; color: var(--primary); opacity: 0.7; }
|
||||
@ -264,6 +278,21 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.ship-filter-status {
|
||||
margin: 0 0 1rem;
|
||||
font-size: 0.9rem;
|
||||
color: #b8bdc7;
|
||||
}
|
||||
.ship-filter-status strong {
|
||||
color: #fff;
|
||||
}
|
||||
.ship-filter-empty {
|
||||
display: none;
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
color: #8d94a0;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -272,11 +301,12 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>Gestion Vaisseaux</h1>
|
||||
<p>Niveau d\'accès : <strong>Administrateur</strong> | Session : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></p>
|
||||
<p>Niveau d\'accès : <strong>Administrateur</strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -328,6 +358,7 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<main class="main-panel">
|
||||
<section class="glass-card">
|
||||
<h2>Liste des Vaisseaux</h2>
|
||||
<p id="shipFilterStatus" class="ship-filter-status">Affichage : <strong>tous les vaisseaux</strong></p>
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="modern-table">
|
||||
<thead>
|
||||
@ -336,12 +367,12 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<th style="text-align: right;">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody id="shipTableBody">
|
||||
<?php if (empty($ships)): ?>
|
||||
<tr><td colspan="2" style="text-align: center; padding: 3rem; color: #666;">Aucun vaisseau enregistré.</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($ships as $s): ?>
|
||||
<tr>
|
||||
<tr class="ship-row" data-manufacture-id="<?php echo (int)$s['cl_scvaisseaux_manufacture_id']; ?>" data-manufacture-name="<?php echo htmlspecialchars($s['cl_scmanufactures_name'], ENT_QUOTES); ?>">
|
||||
<td>
|
||||
<span class="manufacturer-text"><?php echo htmlspecialchars($s['cl_scmanufactures_name']); ?></span>
|
||||
<strong style="color: var(--primary); text-transform: uppercase; font-size: 1.1rem;"><?php echo htmlspecialchars($s['cl_scvaisseaux_name']); ?></strong>
|
||||
@ -369,6 +400,9 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if (!empty($ships)): ?>
|
||||
<p id="shipFilterEmpty" class="ship-filter-empty">Aucun vaisseau trouvé pour cette manufacture.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@ -376,11 +410,51 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function applyShipManufactureFilter() {
|
||||
const manufactureSelect = document.getElementById('shipManufacture');
|
||||
const status = document.getElementById('shipFilterStatus');
|
||||
const emptyMessage = document.getElementById('shipFilterEmpty');
|
||||
const rows = document.querySelectorAll('#shipTableBody .ship-row');
|
||||
|
||||
if (!manufactureSelect || !status || !rows.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedManufactureId = manufactureSelect.value;
|
||||
const selectedOption = manufactureSelect.options[manufactureSelect.selectedIndex];
|
||||
const selectedManufactureName = selectedManufactureId && selectedOption
|
||||
? selectedOption.text.trim()
|
||||
: '';
|
||||
|
||||
let visibleCount = 0;
|
||||
|
||||
rows.forEach((row) => {
|
||||
const matches = !selectedManufactureId || row.dataset.manufactureId === selectedManufactureId;
|
||||
row.style.display = matches ? '' : 'none';
|
||||
if (matches) {
|
||||
visibleCount += 1;
|
||||
}
|
||||
});
|
||||
|
||||
if (selectedManufactureId && selectedManufactureName) {
|
||||
const label = visibleCount > 1 ? 'vaisseaux' : 'vaisseau';
|
||||
status.innerHTML = `Affichage : <strong>${visibleCount} ${label} pour ${selectedManufactureName}</strong>`;
|
||||
} else {
|
||||
const label = rows.length > 1 ? 'vaisseaux' : 'vaisseau';
|
||||
status.innerHTML = `Affichage : <strong>tous les ${rows.length} ${label}</strong>`;
|
||||
}
|
||||
|
||||
if (emptyMessage) {
|
||||
emptyMessage.style.display = visibleCount === 0 ? 'block' : 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function editShip(data) {
|
||||
document.getElementById('formAction').value = 'update_ship';
|
||||
document.getElementById('shipId').value = data.id;
|
||||
document.getElementById('shipName').value = data.name;
|
||||
document.getElementById('shipManufacture').value = data.manufacture_id;
|
||||
applyShipManufactureFilter();
|
||||
|
||||
document.getElementById('submitBtn').innerText = 'Mettre à jour';
|
||||
document.getElementById('cancelBtn').style.display = 'block';
|
||||
@ -393,11 +467,22 @@ $current_session_user = $_SESSION['user'] ?? '';
|
||||
document.getElementById('formAction').value = 'add_ship';
|
||||
document.getElementById('shipId').value = '';
|
||||
document.getElementById('shipForm').reset();
|
||||
applyShipManufactureFilter();
|
||||
|
||||
document.getElementById('submitBtn').innerText = 'Ajouter';
|
||||
document.getElementById('cancelBtn').style.display = 'none';
|
||||
document.getElementById('formTitle').innerText = 'Nouveau Vaisseau';
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const manufactureSelect = document.getElementById('shipManufacture');
|
||||
if (!manufactureSelect) {
|
||||
return;
|
||||
}
|
||||
|
||||
manufactureSelect.addEventListener('change', applyShipManufactureFilter);
|
||||
applyShipManufactureFilter();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -260,6 +260,17 @@ $banners = $stmt_banners->fetchAll();
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.topbar-actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.session-user {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-modern {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@ -537,11 +548,12 @@ $banners = $stmt_banners->fetchAll();
|
||||
<header class="admin-topbar">
|
||||
<div class="topbar-info">
|
||||
<h1>R.E.A.C.T. SC Webhook</h1>
|
||||
<p>Niveau d'accès : <strong>Administrateur</strong> | Session : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></p>
|
||||
<p>Niveau d'accès : <strong>Administrateur</strong></p>
|
||||
</div>
|
||||
<div class="topbar-actions">
|
||||
<a href="index.php" class="btn-modern">Site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Exit</a>
|
||||
<span class="session-user">Connecté : <strong><?php echo htmlspecialchars($current_session_user, ENT_QUOTES, 'UTF-8'); ?></strong></span>
|
||||
<a href="index.php" class="btn-modern">Retour au site</a>
|
||||
<a href="logout.php" class="btn-modern danger">Déconnexion</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user