Remove db.php and add navigation menu to all pages

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-10-22 01:35:14 +00:00
parent 85555549f9
commit dfe1d0d2db
10 changed files with 190 additions and 98 deletions

View file

@ -1,12 +1,3 @@
<?php
// Start the website session to check if user is logged in
session_name("gameservers_website");
session_start();
// Check login status
$is_logged_in = isset($_SESSION['website_user_id']) && !empty($_SESSION['website_user_id']);
$username = $is_logged_in ? htmlspecialchars($_SESSION['website_username']) : '';
?>
<!DOCTYPE html>
<html lang="en">
<head>
@ -40,28 +31,11 @@ $username = $is_logged_in ? htmlspecialchars($_SESSION['website_username']) : ''
.gsw-btn{border:1px solid;border-radius:8px;padding:10px 14px;text-decoration:none;display:inline-block;font-weight:600}
.gsw-fine{font-size:.92rem;opacity:.9;text-align:center;margin-top:10px}
.gsw-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;background:rgba(255,255,255,0.1);backdrop-filter:blur(10px);margin-bottom:20px}
.gsw-header-left{font-weight:700;font-size:1.2rem;color:#fff}
.gsw-header-right{display:flex;gap:12px;align-items:center}
.gsw-user-info{color:#fff;font-size:0.95rem}
.gsw-header-btn{padding:8px 16px;background:#fff;color:#667eea;border-radius:6px;text-decoration:none;font-weight:600;transition:transform 0.2s}
.gsw-header-btn:hover{transform:translateY(-2px)}
</style>
</head>
<body>
<div class="gsw-header">
<div class="gsw-header-left">GameServers.World</div>
<div class="gsw-header-right">
<?php if ($is_logged_in): ?>
<span class="gsw-user-info">Welcome, <?php echo $username; ?>!</span>
<a href="logout.php" class="gsw-header-btn">Logout</a>
<?php else: ?>
<a href="login.php" class="gsw-header-btn">Login</a>
<?php endif; ?>
</div>
</div>
<?php include(__DIR__ . '/includes/menu.php'); ?>
<div class="gsw-outer-full">
<div class="gsw-page-center">