Autosave: 20260322-160915
This commit is contained in:
parent
2ab31aabd7
commit
943d14294c
@ -449,4 +449,43 @@
|
||||
|
||||
.member-table a:hover {
|
||||
color: #88c0d0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Admin Footer Styles */
|
||||
.admin-footer {
|
||||
z-index: 9999;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: rgba(0,0,0,0.85);
|
||||
padding: 8px 25px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 15px;
|
||||
border-top: 1px solid #2d3545;
|
||||
box-sizing: border-box;
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
.admin-footer a {
|
||||
color: #fff !important;
|
||||
text-decoration: none !important;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
padding: 6px 15px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.admin-footer a:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
||||
}
|
||||
.btn-mj { background: #ebcb8b; color: #000 !important; }
|
||||
.btn-mj:hover { background: #f2d5a0; }
|
||||
.btn-adm { background: #bf616a; color: #fff !important; }
|
||||
.btn-adm:hover { background: #d08770; }
|
||||
|
||||
2
auth.php
2
auth.php
@ -69,7 +69,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if ($user && password_verify($password, $user['password'])) {
|
||||
$_SESSION['user_id'] = $user['id'];
|
||||
$_SESSION["username"] = $user["username"]; $_SESSION["display_name"] = $user["display_name"];
|
||||
$_SESSION['role'] = $user['role'];
|
||||
$_SESSION['role'] = $user['role']; $_SESSION['user_role'] = $user['role'];
|
||||
|
||||
$db->prepare("UPDATE users SET last_login = CURRENT_TIMESTAMP WHERE id = ?")->execute([$user['id']]);
|
||||
|
||||
|
||||
@ -132,3 +132,12 @@ if (isset($_SESSION['user_id'])) {
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<?php if (isset($_SESSION['user_role']) && ($_SESSION['user_role'] === 'admin' || $_SESSION['user_role'] === 'gm')): ?>
|
||||
<div class="admin-footer">
|
||||
<a href="gm_console.php" class="btn-mj"><i class="fa-solid fa-headset"></i> CONSOLE MJ</a>
|
||||
<?php if ($_SESSION['user_role'] === 'admin'): ?>
|
||||
<a href="admin.php" class="btn-adm"><i class="fa-solid fa-shield-halved"></i> CONSOLE ADMIN</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
24
index.php
24
index.php
@ -240,10 +240,6 @@ function getStatusColor($status, $statuses_map) {
|
||||
.breadcrumb { margin-bottom: 20px; font-size: 14px; color: #88c0d0; }
|
||||
.breadcrumb a { color: #fff; text-decoration: none; }
|
||||
.breadcrumb a:hover { text-decoration: underline; }
|
||||
.admin-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.8); padding: 5px 20px; display: flex; justify-content: flex-end; gap: 15px; border-top: 1px solid #2d3545; }
|
||||
.admin-footer a { color: #fff; text-decoration: none; font-size: 11px; font-weight: bold; padding: 5px 10px; border-radius: 3px; }
|
||||
.btn-mj { background: #ebcb8b; color: #000 !important; }
|
||||
.btn-adm { background: #bf616a; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -253,7 +249,6 @@ function getStatusColor($status, $statuses_map) {
|
||||
<main id="game-container">
|
||||
<div class="breadcrumb">
|
||||
<a href="?view=galaxy&galaxy_id=<?php echo $galaxy_id; ?>">Galaxie <?php echo $galaxy_id; ?></a>
|
||||
<?php if($view === 'sector'): ?> > <?php echo htmlspecialchars($sector_display_name); ?> <?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 40px; align-items: flex-start; width: 100%; max-width: 1200px; justify-content: center;">
|
||||
@ -261,10 +256,8 @@ function getStatusColor($status, $statuses_map) {
|
||||
<h3>Univers</h3>
|
||||
<form method="GET"><input type="hidden" name="view" value="<?php echo $view; ?>">
|
||||
<div><label>Galaxie</label><input type="number" name="galaxy_id" value="<?php echo $galaxy_id; ?>" min="1"></div>
|
||||
<?php if($view === 'sector'): ?><div><label>Secteur</label><input type="number" name="sector_id" value="<?php echo $sector_id; ?>" min="1"></div><?php endif; ?>
|
||||
<button type="submit">Localiser</button>
|
||||
</form>
|
||||
<?php if($view === 'sector'): ?><button onclick="location.href='?view=galaxy&galaxy_id=<?php echo $galaxy_id; ?>'" style="background: #3b4252; margin-top: 5px;">Vue Galaxie</button><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if($view === 'sector'): ?>
|
||||
@ -285,7 +278,6 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div style="font-size: 10px; color: #88c0d0; margin-bottom: 5px;"><i class="fa-solid fa-circle-info"></i> <?php echo $statuses_map[$obj['status']]['name'] ?? ucfirst($obj['status']); ?></div>
|
||||
<?php if ($fac_info && $fac_info['name'] !== 'Aucune'): ?>
|
||||
<div style="font-size: 10px; color: <?php echo htmlspecialchars($fac_info['color'] ?? '#ebcb8b'); ?>; margin-bottom: 5px;"><i class="fa-solid fa-flag"></i> Faction: <?php echo htmlspecialchars($fac_info['name']); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="tooltip-desc"><?php echo htmlspecialchars($type_info['description'] ?? ''); ?></div>
|
||||
|
||||
<?php if (!empty($obj['orbital_controls'])): ?>
|
||||
@ -303,7 +295,6 @@ function getStatusColor($status, $statuses_map) {
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($obj['cities'])): ?>
|
||||
<div class="settlement-title"><i class="fa-solid fa-city"></i> Établissements:</div>
|
||||
@ -322,10 +313,8 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div class="control-bar-mini"><div class="control-fill" style="width: <?php echo $lvl; ?>%; background: <?php echo htmlspecialchars($fColor); ?>;"></div></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($type_info['modifiers'])): ?>
|
||||
<div class="mod-list">
|
||||
@ -333,7 +322,6 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div class="mod-item <?php echo $m['type'] === 'bonus' ? 'mod-bonus' : 'mod-malus'; ?>"><i class="fa-solid <?php echo $m['type'] === 'bonus' ? 'fa-circle-up' : 'fa-circle-down'; ?>"></i> <strong><?php echo htmlspecialchars($m['name']); ?>:</strong> <?php echo htmlspecialchars($m['description']); ?></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="slot-icons">
|
||||
@ -341,10 +329,7 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div class="faction-icon-sm">
|
||||
<?php if (!empty($fac_info['image_url'])): ?><img src="<?php echo htmlspecialchars($fac_info['image_url']); ?>?v=<?php echo time(); ?>" style="width: 100%; height: 100%; object-fit: contain;" title="<?php echo htmlspecialchars($fac_info['name']); ?>">
|
||||
<?php elseif (!empty($fac_info['fa_icon'])): ?><i class="fa-solid <?php echo htmlspecialchars($fac_info['fa_icon']); ?>" style="color: <?php echo htmlspecialchars($fac_info['color'] ?? '#fff'); ?>; font-size: 16px;" title="<?php echo htmlspecialchars($fac_info['name']); ?>"></i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($obj['cities'])): ?><div class="info-icon-sm" title="Établissements présents"><i class="fa-solid fa-city"></i></div><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="object-icon <?php echo ($statuses_map[$obj['status']]['is_blinking'] ?? 0) ? 'blink-effect' : ''; ?>">
|
||||
@ -354,12 +339,10 @@ function getStatusColor($status, $statuses_map) {
|
||||
$imageUrl = $type_info['image_url'] ?? null;
|
||||
if ($imageUrl): ?><img src="<?php echo htmlspecialchars($imageUrl); ?>?v=<?php echo time(); ?>" class="object-image">
|
||||
<?php else: ?><i class="fa-solid <?php echo $icon; ?>" style="color: <?php echo $color; ?>;"></i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<span class="object-name"><?php echo htmlspecialchars($obj['name']); ?></span>
|
||||
<?php else: ?>
|
||||
<div style="opacity: 0.05;"><i class="fa-solid fa-circle fa-sm"></i></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
@ -378,11 +361,9 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div style="font-size: 10px; color: #88c0d0;">SECTEUR</div>
|
||||
<div style="font-size: 20px; font-weight: bold;"><?php echo $s; ?></div>
|
||||
<?php if($isActive): ?><div style="font-size: 8px; color: #a3be8c; margin-top: 5px;"><i class="fa-solid fa-check"></i> Actif</div>
|
||||
<?php else: ?><div style="font-size: 8px; color: #4c566a; margin-top: 5px;">Inexploré</div><?php endif; ?>
|
||||
</a>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="legend">
|
||||
@ -432,12 +413,7 @@ function getStatusColor($status, $statuses_map) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($user_role === 'admin' || $user_role === 'gm'): ?>
|
||||
<div class="admin-footer">
|
||||
<a href="gm_console.php" class="btn-mj"><i class="fa-solid fa-headset"></i> CONSOLE MG</a>
|
||||
<?php if ($user_role === 'admin'): ?><a href="admin.php" class="btn-adm"><i class="fa-solid fa-shield-halved"></i> CONSOLE ADMIN</a><?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
const factionsMap = <?php echo json_encode($factions_map); ?>;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user