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,3 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Order Server - GameServers.World</title>
</head>
<body>
<?php
/*
@ -11,7 +19,18 @@ In our website, we are setting "post" pages with a "Tag". The first tag in our p
There are other methods that might be better to get the info. But all we need is the "service_ID" in the "ogp_billing_services" table
This method means we can use one code block in every game page and fill in the data dynamically.
*/
include "db.php";
// Include database configuration
require_once(__DIR__ . '/includes/config.inc.php');
// Create database connection
$db = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
if (!$db) {
die("Connection failed: " . mysqli_connect_error());
}
// Include menu
include(__DIR__ . '/includes/menu.php');
if (isset($_POST['save']) AND !empty($_POST['description']))
@ -287,3 +306,9 @@ if ($row['price_monthly'] == 0.0) {
}
?>
</div>
<?php
// Close database connection
mysqli_close($db);
?>
</body>
</html>