414 lines
23 KiB
PHP
414 lines
23 KiB
PHP
<?php
|
|
require_once 'db/config.php';
|
|
session_start();
|
|
$db = db();
|
|
|
|
$user_role = 'user';
|
|
if (isset($_SESSION['user_id'])) {
|
|
$stmt = $db->prepare("SELECT role FROM users WHERE id = ?");
|
|
$stmt->execute([$_SESSION['user_id']]);
|
|
$u_data = $stmt->fetch();
|
|
$user_role = $u_data['role'] ?? 'user';
|
|
}
|
|
|
|
$view = isset($_GET['view']) ? $_GET['view'] : 'sector';
|
|
$galaxy_id = isset($_GET['galaxy_id']) ? (int)$_GET['galaxy_id'] : 1;
|
|
$sector_id = isset($_GET['sector_id']) ? (int)$_GET['sector_id'] : 1;
|
|
|
|
// Fetch Dynamic Types, Statuses and Factions
|
|
$object_types_db = $db->query("SELECT * FROM celestial_object_types")->fetchAll(PDO::FETCH_ASSOC);
|
|
$statuses_db = $db->query("SELECT * FROM celestial_object_statuses")->fetchAll(PDO::FETCH_ASSOC);
|
|
$factions_db = $db->query("SELECT * FROM factions")->fetchAll(PDO::FETCH_ASSOC);
|
|
|
|
$object_types_map = [];
|
|
foreach($object_types_db as $ot) {
|
|
// Get modifiers for this type
|
|
$stmt = $db->prepare("SELECT m.* FROM modifiers m JOIN celestial_object_type_modifiers cotm ON m.id = cotm.modifier_id WHERE cotm.celestial_object_type_id = ?");
|
|
$stmt->execute([$ot['id']]);
|
|
$ot['modifiers'] = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
$object_types_map[$ot['slug']] = $ot;
|
|
}
|
|
|
|
$statuses_map = []; foreach($statuses_db as $s) $statuses_map[$s['slug']] = $s;
|
|
$factions_map = []; foreach($factions_db as $f) $factions_map[$f['id']] = $f;
|
|
|
|
// Grid size: 6x6 = 36 slots per sector
|
|
$grid_size = 36;
|
|
|
|
// Mock Resources
|
|
$resources = [
|
|
'Metal' => ['val' => '136 053', 'max' => '1 210 000', 'prod' => '+1 980', 'icon' => 'fa-cube'],
|
|
'Crystal' => ['val' => '127 322', 'max' => '1 010 000', 'prod' => '+1 703', 'icon' => 'fa-gem'],
|
|
'Deuterium' => ['val' => '32 277', 'max' => '50 000', 'prod' => '+28', 'icon' => 'fa-flask'],
|
|
'Energy' => ['val' => '2 100', 'max' => '2 100', 'prod' => '', 'icon' => 'fa-bolt'],
|
|
'Dark Matter' => ['val' => '4 930', 'max' => '', 'prod' => '', 'icon' => 'fa-atom']
|
|
];
|
|
|
|
if ($view === 'sector') {
|
|
$stmt = $db->prepare("SELECT * FROM planets WHERE galaxy_id = ? AND sector_id = ? AND slot BETWEEN 1 AND ?");
|
|
$stmt->execute([$galaxy_id, $sector_id, $grid_size]);
|
|
$objects_raw = $stmt->fetchAll();
|
|
|
|
$grid = array_fill(1, $grid_size, null);
|
|
$planet_ids = [];
|
|
foreach ($objects_raw as $obj) {
|
|
$grid[$obj['slot']] = $obj;
|
|
$planet_ids[] = $obj['id'];
|
|
$grid[$obj['slot']]['cities'] = [];
|
|
}
|
|
|
|
if (!empty($planet_ids)) {
|
|
$placeholders = implode(',', array_fill(0, count($planet_ids), '?'));
|
|
$stmt = $db->prepare("SELECT c.*, st.name as type_name
|
|
FROM cities c
|
|
LEFT JOIN settlement_types st ON c.settlement_type_id = st.id
|
|
WHERE c.planet_id IN ($placeholders)");
|
|
$stmt->execute($planet_ids);
|
|
$all_cities = $stmt->fetchAll();
|
|
foreach ($all_cities as $city) {
|
|
foreach ($grid as &$slot_data) {
|
|
if ($slot_data && $slot_data['id'] == $city['planet_id']) {
|
|
$slot_data['cities'][] = $city;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$stmt = $db->prepare("SELECT name FROM sectors WHERE id = ?");
|
|
$stmt->execute([$sector_id]);
|
|
$sector_info = $stmt->fetch();
|
|
$sector_display_name = $sector_info['name'] ?? "Secteur $sector_id";
|
|
$page_title = "$sector_display_name [G$galaxy_id]";
|
|
} else {
|
|
$stmt = $db->prepare("SELECT sector_id, slot, status, type FROM planets WHERE galaxy_id = ? ORDER BY sector_id, slot ASC");
|
|
$stmt->execute([$galaxy_id]);
|
|
$all_planets = $stmt->fetchAll();
|
|
$sector_data = [];
|
|
$active_sectors = [];
|
|
foreach ($all_planets as $p) {
|
|
$sector_data[$p['sector_id']][$p['slot']] = ['status' => $p['status'], 'type' => $p['type']];
|
|
if (!in_array($p['sector_id'], $active_sectors)) { $active_sectors[] = (int)$p['sector_id']; }
|
|
}
|
|
$page_title = "Galaxie $galaxy_id";
|
|
}
|
|
|
|
function getStatusColor($status, $statuses_map) {
|
|
return $statuses_map[$status]['color'] ?? 'rgba(255,255,255,0.05)';
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Nexus - <?php echo $page_title; ?></title>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
<link href="assets/css/custom.css?v=<?php echo time(); ?>" rel="stylesheet">
|
|
<style>
|
|
body { background: #000; color: #fff; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; }
|
|
#main-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
|
|
header#top-bar { background: rgba(10, 15, 30, 0.95); border-bottom: 2px solid #2d3545; padding: 10px 40px; }
|
|
.user-auth-bar { display: flex; justify-content: flex-end; gap: 20px; font-size: 11px; color: #8c92a3; margin-bottom: 10px; }
|
|
.user-auth-bar a { color: #88c0d0; text-decoration: none; font-weight: bold; }
|
|
.user-auth-bar .username { color: #ebcb8b; }
|
|
|
|
.resource-container { display: flex; gap: 25px; align-items: center; justify-content: center; }
|
|
.resource-box { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 80px; }
|
|
.resource-box i { position: absolute; right: -15px; top: 5px; font-size: 20px; color: rgba(136, 192, 208, 0.2); }
|
|
.resource-name { font-size: 10px; color: #88c0d0; text-transform: uppercase; font-weight: bold; }
|
|
.resource-value { font-size: 14px; font-weight: bold; color: #fff; }
|
|
.resource-prod { font-size: 9px; color: #a3be8c; }
|
|
|
|
#game-container { flex: 1; padding: 30px; display: flex; flex-direction: column; align-items: center; }
|
|
.nav-panel { background: rgba(10, 15, 30, 0.95); border: 1px solid #2d3545; padding: 20px; width: 180px; }
|
|
.nav-panel h3 { margin: 0 0 15px 0; color: #88c0d0; font-size: 14px; text-transform: uppercase; border-bottom: 1px solid #2d3545; padding-bottom: 10px; }
|
|
.nav-panel label { display: block; font-size: 10px; color: #8c92a3; margin-top: 10px; }
|
|
.nav-panel input { width: 100%; background: #000; border: 1px solid #3b4252; color: #fff; padding: 5px; margin-top: 3px; font-size: 12px; }
|
|
.nav-panel button { width: 100%; margin-top: 15px; background: #88c0d0; border: none; padding: 8px; color: #000; font-weight: bold; cursor: pointer; border-radius: 2px; }
|
|
|
|
.galaxy-map {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 140px);
|
|
grid-template-rows: repeat(6, 140px);
|
|
gap: 10px;
|
|
padding: 15px;
|
|
background: rgba(10, 15, 30, 0.5);
|
|
border: 1px solid #2d3545;
|
|
box-shadow: 0 0 30px rgba(0,0,0,0.5);
|
|
}
|
|
.slot {
|
|
width: 140px;
|
|
height: 140px;
|
|
background: rgba(46, 52, 64, 0.3);
|
|
border: 1px solid #3b4252;
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
overflow: hidden;
|
|
}
|
|
.slot:hover { background: rgba(136, 192, 208, 0.1); border-color: #88c0d0; z-index: 10; }
|
|
.slot-id { position: absolute; top: 5px; left: 8px; font-size: 9px; color: #4c566a; font-weight: bold; z-index: 5; }
|
|
|
|
.slot-icons {
|
|
position: absolute;
|
|
top: 5px;
|
|
right: 5px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
align-items: center;
|
|
z-index: 6;
|
|
}
|
|
|
|
.faction-icon-sm {
|
|
width: 22px;
|
|
height: 22px;
|
|
filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.info-icon-sm {
|
|
width: 20px;
|
|
height: 20px;
|
|
font-size: 14px;
|
|
color: #ebcb8b;
|
|
filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.object-icon {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 90px;
|
|
height: 90px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
line-height: 1;
|
|
font-size: 90px;
|
|
z-index: 2;
|
|
}
|
|
.object-image { width: 90px; height: 90px; object-fit: contain; margin: 0; }
|
|
.slot:hover .object-icon { transform: translate(-50%, -50%) scale(1.1); }
|
|
|
|
.object-name {
|
|
position: absolute;
|
|
bottom: 8px;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
color: #eceff4;
|
|
text-align: center;
|
|
width: 95%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
z-index: 3;
|
|
text-shadow: 0 0 4px rgba(0,0,0,0.8);
|
|
}
|
|
|
|
.sector-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 180px);
|
|
grid-template-rows: repeat(6, 180px);
|
|
gap: 15px;
|
|
}
|
|
.sector-card { background: rgba(10, 15, 30, 0.95); border: 1px solid #2d3545; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #fff; transition: all 0.2s; position: relative; width: 180px; height: 180px; box-sizing: border-box; }
|
|
.sector-card:hover { border-color: #88c0d0; background: #1a202c; transform: translateY(-3px); }
|
|
.sector-card.empty { opacity: 0.6; }
|
|
|
|
.mini-map { display: grid; grid-template-columns: repeat(6, 12px); gap: 4px; margin-bottom: 15px; background: #000; padding: 6px; border-radius: 2px; }
|
|
.mini-dot { width: 12px; height: 12px; border-radius: 1px; }
|
|
|
|
.tooltip-box { display: none; position: absolute; top: -10px; left: 105%; width: 220px; background: #1e293b; border: 1px solid #88c0d0; padding: 15px; z-index: 100; pointer-events: none; box-shadow: 10px 10px 20px rgba(0,0,0,0.5); }
|
|
.slot:hover .tooltip-box { display: block; }
|
|
.tooltip-title { font-size: 14px; color: #88c0d0; font-weight: bold; border-bottom: 1px solid #334155; padding-bottom: 8px; margin-bottom: 8px; }
|
|
.tooltip-desc { font-size: 11px; color: #d8dee9; line-height: 1.4; font-style: italic; margin-bottom: 10px; }
|
|
.mod-list { display: flex; flex-direction: column; gap: 5px; }
|
|
.mod-item { font-size: 10px; padding: 4px 8px; border-radius: 3px; display: flex; align-items: center; gap: 8px; }
|
|
.mod-bonus { background: rgba(163, 190, 140, 0.15); color: #a3be8c; border: 1px solid rgba(163, 190, 140, 0.3); }
|
|
.mod-malus { background: rgba(191, 97, 106, 0.15); color: #bf616a; border: 1px solid rgba(191, 97, 106, 0.3); }
|
|
.mod-item i { font-size: 12px; }
|
|
|
|
.settlement-title { font-size: 10px; color: #ebcb8b; font-weight: bold; border-top: 1px solid #334155; margin-top: 8px; padding-top: 5px; }
|
|
.settlement-item-tool { font-size: 9px; color: #fff; margin-bottom: 3px; }
|
|
|
|
.legend { margin-top: 20px; background: rgba(10, 15, 30, 0.95); border: 1px solid #2d3545; padding: 10px 20px; display: flex; gap: 15px; font-size: 10px; flex-wrap: wrap; max-width: 1000px; justify-content: center; }
|
|
.legend-item { display: flex; align-items: center; gap: 5px; }
|
|
.dot { width: 8px; height: 8px; border-radius: 1px; }
|
|
.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>
|
|
<div id="main-wrapper">
|
|
<header id="top-bar">
|
|
<div class="user-auth-bar">
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<span>Bienvenue, <span class="username">@<?php echo htmlspecialchars($_SESSION['username']); ?></span></span>
|
|
<a href="profile.php"><i class="fa-solid fa-user-gear"></i> Profil</a>
|
|
<a href="auth.php?logout=1" style="color: #bf616a;"><i class="fa-solid fa-right-from-bracket"></i> Déconnexion</a>
|
|
<?php else: ?>
|
|
<a href="auth.php?page=login"><i class="fa-solid fa-right-to-bracket"></i> Connexion</a>
|
|
<a href="auth.php?page=register"><i class="fa-solid fa-user-plus"></i> S'inscrire</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="resource-container">
|
|
<?php foreach($resources as $name => $res): ?>
|
|
<div class="resource-box">
|
|
<div class="resource-name"><?php echo $name; ?></div>
|
|
<div class="resource-value"><?php echo $res['val']; ?></div>
|
|
<div class="resource-prod"><?php echo $res['prod']; ?></div>
|
|
<i class="fa-solid <?php echo $res['icon']; ?>"></i>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</header>
|
|
|
|
<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;">
|
|
<div class="nav-panel">
|
|
<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'): ?>
|
|
<div class="galaxy-map">
|
|
<?php for($i=1; $i<=$grid_size; $i++): ?>
|
|
<div class="slot">
|
|
<span class="slot-id"><?php echo $i; ?></span>
|
|
<?php if (isset($grid[$i])): $obj = $grid[$i];
|
|
$type_info = $object_types_map[$obj['type']] ?? null;
|
|
$fac_info = isset($obj['faction_id']) ? ($factions_map[$obj['faction_id']] ?? null) : null;
|
|
?>
|
|
<div class="tooltip-box">
|
|
<div class="tooltip-title"><?php echo htmlspecialchars($obj['name']); ?></div>
|
|
<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: #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['cities'])): ?>
|
|
<div class="settlement-title"><i class="fa-solid fa-city"></i> Établissements:</div>
|
|
<?php foreach ($obj['cities'] as $c): ?>
|
|
<div class="settlement-item-tool">
|
|
<strong><?php echo htmlspecialchars($c['name']); ?></strong>
|
|
<span style="color: #8c92a3; font-size: 8px;">(<?php echo htmlspecialchars($c['type_name']); ?>)</span>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (!empty($type_info['modifiers'])): ?>
|
|
<div class="mod-list">
|
|
<?php foreach ($type_info['modifiers'] as $m): ?>
|
|
<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">
|
|
<?php if ($fac_info): ?>
|
|
<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: #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
|
|
$icon = $type_info['icon'] ?? 'fa-earth-europe';
|
|
$color = getStatusColor($obj['status'], $statuses_map);
|
|
$imageUrl = $type_info['image_url'] ?? null;
|
|
?>
|
|
<?php 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>
|
|
<?php else: ?>
|
|
<div class="sector-grid">
|
|
<?php for($s=1; $s<=$grid_size; $s++): $isActive = in_array($s, $active_sectors); ?>
|
|
<a href="?view=sector&galaxy_id=<?php echo $galaxy_id; ?>§or_id=<?php echo $s; ?>" class="sector-card <?php echo $isActive ? '' : 'empty'; ?>">
|
|
<div class="mini-map">
|
|
<?php for($p=1; $p<=$grid_size; $p++):
|
|
$dotColor = 'rgba(255,255,255,0.05)';
|
|
if (isset($sector_data[$s][$p])) { $dotColor = getStatusColor($sector_data[$s][$p]['status'], $statuses_map); }
|
|
?>
|
|
<div class="mini-dot" style="background-color: <?php echo $dotColor; ?>;"></div>
|
|
<?php endfor; ?>
|
|
</div>
|
|
<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">
|
|
<?php foreach($statuses_db as $s): ?>
|
|
<div class="legend-item"><span class="dot" style="background: <?php echo $s['color']; ?>;"></span> <?php echo $s['name']; ?></div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<?php if ($user_role === 'admin' || $user_role === 'gm'): ?>
|
|
<div class="admin-footer">
|
|
<a href="gm_console.php" target="_blank" class="btn-mj"><i class="fa-solid fa-headset"></i> CONSOLE MG</a>
|
|
<?php if ($user_role === 'admin'): ?>
|
|
<a href="admin.php" target="_blank" class="btn-adm"><i class="fa-solid fa-shield-halved"></i> CONSOLE ADMIN</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</body>
|
|
</html>
|