Refactor: Update all remaining pages to use unified header template

- Updated 39 pages from old header01.php and header02.php includes
- All pages now use single configurable header.php with $headerStyle variable
- Light style (default): Most pages (login, register, trips, courses, etc.)
- Dark style: Coming from header01 original usage

Pages updated:
  - Admin pages: admin_*.php (10 files)
  - Booking pages: bookings.php, campsite_booking.php, etc.
  - Content pages: blog.php, blog_details.php, contact.php, events.php, etc.
  - User pages: account_settings.php, membership*.php, register.php, etc.
  - Utility pages: 404.php, payment_confirmation.php, reset_password.php, etc.

All pages now maintain single header template source - easier to update navigation, styles, and functionality across the entire site.
This commit is contained in:
twotalesanimation
2025-12-03 16:55:32 +02:00
parent 0d01c7da90
commit 110c853945
39 changed files with 120 additions and 40 deletions

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
$page_id = 'agm_minutes';
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
// Fetch all trips

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST['accept_indemnity'])) {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
// Fetch all trips

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
// SQL query to fetch data
$sql = "SELECT ip_address, user_id, page_url, referrer_url, visit_time, country FROM visitor_logs WHERE NOT (ip_address = '185.203.122.69' OR ip_address = '156.155.29.213') ORDER BY visit_time DESC";

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkSuperAdmin();
// SQL query to fetch data
$sql = "SELECT user_id, first_name, last_name, email, member, date_joined, token, is_verified, profile_pic FROM users";

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
$user_id = $_SESSION['user_id'];
unset($_SESSION['cart']);

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// Assuming you have the user ID stored in the session
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
$page_id = 'best_0f_ec';
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php') ?>
<?php
$headerStyle = 'light';
include_once('header.php') ?>
<style>
.image {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php') ?>
<?php
$headerStyle = 'light';
include_once('header.php') ?>
<style>
.image {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
$user_id = $_SESSION['user_id'];

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
// SQL query to fetch dates for driver training

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
$conn = openDatabaseConnection();
$result = $conn->query("SELECT * FROM campsites");

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php') ?>
<?php
$headerStyle = 'light';
include_once('header.php') ?>
<style>
.image {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// SQL query to fetch dates for driver training
$sql = "SELECT course_id, date FROM courses WHERE course_type = 'driver_training'";

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
// SQL query to fetch dates for driver training

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php') ?>
<?php
$headerStyle = 'light';
include_once('header.php') ?>
<style>
.image {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php') ?>
<?php
$headerStyle = 'light';
include_once('header.php') ?>
<style>
@media (min-width: 991px) {
.container {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// Assuming you have the user ID stored in the session
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];

View File

@@ -1,4 +1,6 @@
<?php include_once('header01.php');
<?php
$headerStyle = 'dark';
include_once('header.php');
$indemnityPending = false;
if (isset($_SESSION['user_id'])) {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// Include Google login PHP logic
require_once 'google-client/vendor/autoload.php';

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// Assuming you have the user ID stored in the session
if (isset($_SESSION['user_id'])) {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
// Assuming you have the user ID stored in the session

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// Assuming you have the user ID stored in the session
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
?>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkAdmin();
checkUserSession();
$user_id = $_SESSION['user_id'];

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php') ?>
<?php
$headerStyle = 'light';
include_once('header.php') ?>
<style>
@media (min-width: 991px) {
.container {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
// SQL query to fetch dates for driver training

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
$token = $_GET['token'] ?? '';
if (empty($token)) {

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
require_once("functions.php");
checkUserSession();

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
checkUserSession();
if (!isset($_GET['token']) || empty($_GET['token'])) {
@@ -148,7 +150,9 @@ $conn->close();
/* Optional: makes non-member price stand out */
}
</style>
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
?>
<style>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
?>
<style>

View File

@@ -1,4 +1,6 @@
<?php include_once('header02.php');
<?php
$headerStyle = 'light';
include_once('header.php');
// Assuming you have the user ID stored in the session
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];