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:
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
$page_id = 'agm_minutes';
|
$page_id = 'agm_minutes';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
4
404.php
4
404.php
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
|
|
||||||
// Fetch all trips
|
// Fetch all trips
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST['accept_indemnity'])) {
|
if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST['accept_indemnity'])) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
|
|
||||||
// Fetch all trips
|
// Fetch all trips
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
// SQL query to fetch data
|
// 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";
|
$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";
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkSuperAdmin();
|
checkSuperAdmin();
|
||||||
// SQL query to fetch data
|
// SQL query to fetch data
|
||||||
$sql = "SELECT user_id, first_name, last_name, email, member, date_joined, token, is_verified, profile_pic FROM users";
|
$sql = "SELECT user_id, first_name, last_name, email, member, date_joined, token, is_verified, profile_pic FROM users";
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
unset($_SESSION['cart']);
|
unset($_SESSION['cart']);
|
||||||
|
|||||||
@@ -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
|
// Assuming you have the user ID stored in the session
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
$page_id = 'best_0f_ec';
|
$page_id = 'best_0f_ec';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
4
blog.php
4
blog.php
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php') ?>
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php') ?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.image {
|
.image {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php') ?>
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php') ?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.image {
|
.image {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
|
|
||||||
// SQL query to fetch dates for driver training
|
// SQL query to fetch dates for driver training
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
|
|
||||||
$conn = openDatabaseConnection();
|
$conn = openDatabaseConnection();
|
||||||
$result = $conn->query("SELECT * FROM campsites");
|
$result = $conn->query("SELECT * FROM campsites");
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php') ?>
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php') ?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.image {
|
.image {
|
||||||
|
|||||||
@@ -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 query to fetch dates for driver training
|
||||||
$sql = "SELECT course_id, date FROM courses WHERE course_type = 'driver_training'";
|
$sql = "SELECT course_id, date FROM courses WHERE course_type = 'driver_training'";
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
|
|
||||||
// SQL query to fetch dates for driver training
|
// SQL query to fetch dates for driver training
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php') ?>
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php') ?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.image {
|
.image {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php') ?>
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php') ?>
|
||||||
<style>
|
<style>
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
.container {
|
.container {
|
||||||
|
|||||||
@@ -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
|
// Assuming you have the user ID stored in the session
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header01.php');
|
<?php
|
||||||
|
$headerStyle = 'dark';
|
||||||
|
include_once('header.php');
|
||||||
$indemnityPending = false;
|
$indemnityPending = false;
|
||||||
|
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
// Include Google login PHP logic
|
// Include Google login PHP logic
|
||||||
require_once 'google-client/vendor/autoload.php';
|
require_once 'google-client/vendor/autoload.php';
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// Assuming you have the user ID stored in the session
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
|
|
||||||
// Assuming you have the user ID stored in the session
|
// Assuming you have the user ID stored in the session
|
||||||
|
|||||||
@@ -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
|
// Assuming you have the user ID stored in the session
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkAdmin();
|
checkAdmin();
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php') ?>
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php') ?>
|
||||||
<style>
|
<style>
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
.container {
|
.container {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
|
|
||||||
// SQL query to fetch dates for driver training
|
// SQL query to fetch dates for driver training
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
$token = $_GET['token'] ?? '';
|
$token = $_GET['token'] ?? '';
|
||||||
|
|
||||||
if (empty($token)) {
|
if (empty($token)) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
require_once("functions.php");
|
require_once("functions.php");
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
|
|
||||||
if (!isset($_GET['token']) || empty($_GET['token'])) {
|
if (!isset($_GET['token']) || empty($_GET['token'])) {
|
||||||
@@ -148,7 +150,9 @@ $conn->close();
|
|||||||
/* Optional: makes non-member price stand out */
|
/* Optional: makes non-member price stand out */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php include_once('header02.php');
|
<?php
|
||||||
|
$headerStyle = 'light';
|
||||||
|
include_once('header.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -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
|
// Assuming you have the user ID stored in the session
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
$user_id = $_SESSION['user_id'];
|
$user_id = $_SESSION['user_id'];
|
||||||
|
|||||||
Reference in New Issue
Block a user