diff --git a/.htaccess b/.htaccess index b73f49b4..eca2d732 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,120 @@ -php_flag display_errors Off +# URL Rewrite Rules - Maps old URLs to new directory structure during migration + +RewriteEngine On +RewriteBase / + +# Don't rewrite existing files or directories +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d + +# === STRIP .PHP EXTENSION === +# Redirect /page.php to /page (301 permanent redirect) +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.+)\.php$ /$1 [R=301,L] +# Internally rewrite /page to /page.php if page.php exists +RewriteCond %{REQUEST_FILENAME}\.php -f +RewriteRule ^(.+)$ $1.php [L] + +# === AUTH PAGES === +RewriteRule ^login$ src/pages/auth/login.php [L] +RewriteRule ^register$ src/pages/auth/register.php [L] +RewriteRule ^forgot_password$ src/pages/auth/forgot_password.php [L] +RewriteRule ^reset_password$ src/pages/auth/reset_password.php [L] +RewriteRule ^verify$ src/pages/auth/verify.php [L] +RewriteRule ^resend_verification$ src/pages/auth/resend_verification.php [L] +RewriteRule ^change_password$ src/pages/auth/change_password.php [L] +RewriteRule ^update_password$ src/pages/auth/update_password.php [L] + +# === MEMBERSHIP PAGES === +RewriteRule ^membership$ src/pages/memberships/membership.php [L] +RewriteRule ^membership_details$ src/pages/memberships/membership_details.php [L] +RewriteRule ^membership_application$ src/pages/memberships/membership_application.php [L] +RewriteRule ^membership_payment$ src/pages/memberships/membership_payment.php [L] +RewriteRule ^renew_membership$ src/pages/memberships/renew_membership.php [L] +RewriteRule ^member_info$ src/pages/memberships/member_info.php [L] + +# === BOOKING PAGES === +RewriteRule ^bookings$ src/pages/bookings/bookings.php [L] +RewriteRule ^campsites$ src/pages/bookings/campsites.php [L] +RewriteRule ^campsite_booking$ src/pages/bookings/campsite_booking.php [L] +RewriteRule ^trips$ src/pages/bookings/trips.php [L] +RewriteRule ^trip-details$ src/pages/bookings/trip-details.php [L] +RewriteRule ^course_details$ src/pages/bookings/course_details.php [L] +RewriteRule ^driver_training$ src/pages/bookings/driver_training.php [L] + +# === SHOP PAGES === +RewriteRule ^view_cart$ src/pages/shop/view_cart.php [L] +RewriteRule ^add_to_cart$ src/pages/shop/add_to_cart.php [L] +RewriteRule ^bar_tabs$ src/pages/shop/bar_tabs.php [L] +RewriteRule ^payment_confirmation$ src/pages/shop/payment_confirmation.php [L] +RewriteRule ^confirm$ src/pages/shop/confirm.php [L] +RewriteRule ^confirm2$ src/pages/shop/confirm2.php [L] + +# === EVENTS & BLOG PAGES === +RewriteRule ^events$ src/pages/events/events.php [L] +RewriteRule ^blog$ src/pages/events/blog.php [L] +RewriteRule ^blog_details$ src/pages/events/blog_details.php [L] +RewriteRule ^best_of_the_eastern_cape_2024$ src/pages/events/best_of_the_eastern_cape_2024.php [L] +RewriteRule ^2025_agm_minutes$ src/pages/events/2025_agm_minutes.php [L] +RewriteRule ^agm_content$ src/pages/events/agm_content.php [L] +RewriteRule ^instapage$ src/pages/events/instapage.php [L] + +# === OTHER PAGES === +RewriteRule ^about$ src/pages/other/about.php [L] +RewriteRule ^contact$ src/pages/other/contact.php [L] +RewriteRule ^privacy_policy$ src/pages/other/privacy_policy.php [L] +RewriteRule ^404$ src/pages/other/404.php [L] +RewriteRule ^account_settings$ src/pages/other/account_settings.php [L] +RewriteRule ^rescue_recovery$ src/pages/other/rescue_recovery.php [L] +RewriteRule ^bush_mechanics$ src/pages/other/bush_mechanics.php [L] +RewriteRule ^indemnity$ src/pages/other/indemnity.php [L] +RewriteRule ^indemnity_waiver$ src/pages/other/indemnity_waiver.php [L] +RewriteRule ^basic_indemnity$ src/pages/other/basic_indemnity.php [L] +RewriteRule ^view_indemnity$ src/pages/other/view_indemnity.php [L] + +# === ADMIN PAGES === +RewriteRule ^admin_members$ src/admin/admin_members.php [L] +RewriteRule ^admin_payments$ src/admin/admin_payments.php [L] +RewriteRule ^admin_web_users$ src/admin/admin_web_users.php [L] +RewriteRule ^admin_course_bookings$ src/admin/admin_course_bookings.php [L] +RewriteRule ^admin_camp_bookings$ src/admin/admin_camp_bookings.php [L] +RewriteRule ^admin_trip_bookings$ src/admin/admin_trip_bookings.php [L] +RewriteRule ^admin_visitors$ src/admin/admin_visitors.php [L] +RewriteRule ^admin_efts$ src/admin/admin_efts.php [L] +RewriteRule ^add_campsite$ src/admin/add_campsite.php [L] + +# === API/AJAX ENDPOINTS === +RewriteRule ^fetch_users$ src/api/fetch_users.php [L] +RewriteRule ^fetch_drinks$ src/api/fetch_drinks.php [L] +RewriteRule ^fetch_bar_tabs$ src/api/fetch_bar_tabs.php [L] +RewriteRule ^get_campsites$ src/api/get_campsites.php [L] +RewriteRule ^get_tab_total$ src/api/get_tab_total.php [L] +RewriteRule ^google_validate_login$ src/api/google_validate_login.php [L] + +# === PROCESSORS === +RewriteRule ^validate_login$ src/processors/validate_login.php [L] +RewriteRule ^register_user$ src/processors/register_user.php [L] +RewriteRule ^process_application$ src/processors/process_application.php [L] +RewriteRule ^process_booking$ src/processors/process_booking.php [L] +RewriteRule ^process_camp_booking$ src/processors/process_camp_booking.php [L] +RewriteRule ^process_course_booking$ src/processors/process_course_booking.php [L] +RewriteRule ^process_trip_booking$ src/processors/process_trip_booking.php [L] +RewriteRule ^process_membership_payment$ src/processors/process_membership_payment.php [L] +RewriteRule ^process_payments$ src/processors/process_payments.php [L] +RewriteRule ^process_eft$ src/processors/process_eft.php [L] +RewriteRule ^submit_order$ src/processors/submit_order.php [L] +RewriteRule ^submit_pop$ src/processors/submit_pop.php [L] +RewriteRule ^process_signature$ src/processors/process_signature.php [L] +RewriteRule ^create_bar_tab$ src/processors/create_bar_tab.php [L] +RewriteRule ^update_application$ src/processors/update_application.php [L] +RewriteRule ^update_user$ src/processors/update_user.php [L] +RewriteRule ^upload_profile_picture$ src/processors/upload_profile_picture.php [L] +RewriteRule ^send_reset_link$ src/processors/send_reset_link.php [L] +RewriteRule ^logout$ src/processors/logout.php [L] + + + +php_flag display_errors On # php_value error_reporting -1 RedirectMatch 403 ^/\.well-known Options -Indexes diff --git a/about.php b/about.php index 126ff29a..a7989fdd 100644 --- a/about.php +++ b/about.php @@ -1,274 +1,3 @@ - - - 'index.php']]; -require_once('components/banner.php'); -?> - -
-
-
-
-
-
-

Welcome to the Four Wheel Drive Club of Southern Africa!

-
-

- We're a family-friendly outdoor adventure club passionate about exploring the great outdoors through off-road driving, camping, overlanding, cross-border trips, day trips, and unforgettable events. Whether you're new to 4x4 adventures or a seasoned explorer, our community is all about camaraderie, responsible adventure, and creating lasting memories—on and off the road. -

-
    -
  • Overlanding
  • -
  • Camping
  • -
  • Day Trips
  • -
  • 4x4 Driver Training
  • -
  • Family Events
  • -
  • Monthly Open Days
  • -
  • Guest Speakers
  • -
  • 4x4 Driving Track
  • -
- -
-
-
-
-
- Benefit -
-
- Benefit -
-
-
-
-
-
- - - -
-
-
-
-
-

BASE4 Open Days

-

Whether you're a member or just curious, everyone's welcome at our monthly open events. Come camp with us, enjoy guest speakers, take your rig for a spin on the 4x4 track, or just relax by the swimming pool. Saturday’s Open Day includes breakfast and lunch for sale, plus braai fires ready to go—just bring your tongs! It’s the perfect way to experience the spirit of the club and connect with fellow adventurers.

-
-
-
- '; - } - ?> -
- - - -
- - - - -
-
-
-
-
-
-

Want to get involved?JOIN THE COMMITTEE!

-

Want to be more involved in the adventure? Join our committee and help shape the future of the club! Whether it’s planning epic trips, organizing fun events, or assisting with training, your energy and ideas make all the difference. The club runs on the passion of its members—get stuck in, meet awesome people, and be part of what makes it all happen!

-
- Hotel -
-
-
-
-
-
-
-

4WDCSA Committee and Other Office Bearers

-
-

Committee

-
  • Chairman - John Runciman
  • -
  • National Liaison - Peter Hutchison
  • -
  • Treasurer - Doug Timm
  • -
  • Outings - John Runciman
  • -
  • Events - Noelene Runciman
  • -
  • Driver Training - John Runciman
  • -
  • Digital Media - Christopher Pinto
  • - -
    -
    -

    Administration

    -
  • Secretary - Jacqui Boshoff
  • - -
    -

    - All portfolio holders/committee members of the 4WDCSA are volunteers and are not paid for their services.
    The secretary is paid for administrative duties only.

    -
    -
    -
    - -
    -
    -
    - - - - -
    -
    -
    -
    -
    -

    4x4 Memories

    - -
    -
    -
    - '; - } - ?> -
    - - - -
    - - - -
    -
    -
    -
    -
    - Extended Trips -

    Come and Explore Africa and beyond

    - - Explore Trips - - -
    -
    -
    -
    - Driver Training -

    Level up your 4x4 Driving Skills

    - - Explore Training - - -
    -
    -
    -
    - Events -

    See whats cooking at BASE4!

    - - Explore Events - - -
    -
    -
    -
    -
    - - - - -
    -
    -
    - -
    -
    -
    - - - - \ No newline at end of file +// Redirector file - loads the actual page from src/pages/other/ +require_once __DIR__ . '/src/pages/other/about.php'; diff --git a/assets/tour-details.html b/assets/tour-details.html index 1ca392a5..fbf73c04 100644 --- a/assets/tour-details.html +++ b/assets/tour-details.html @@ -46,7 +46,7 @@
    - +
    @@ -871,7 +871,7 @@
    + + + + + + + \ No newline at end of file diff --git a/login.php b/src/pages/auth/login.php similarity index 88% rename from login.php rename to src/pages/auth/login.php index 56ddcc6b..8cbf35fb 100644 --- a/login.php +++ b/src/pages/auth/login.php @@ -1,124 +1,126 @@ setClientId('948441222188-8qhboq2urr8o9n35mc70s5h2nhd52v0m.apps.googleusercontent.com'); -$client->setClientSecret('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'); -$client->setRedirectUri($_ENV['HOST'] . '/validate_login.php'); -$client->addScope("email"); -$client->addScope("profile"); - -// 👇 Add this to force the account picker -$client->setPrompt('select_account'); - -$login_url = $client->createAuthUrl(); -?> - - - - - - - -
    -
    -
    - - -
    -
    -
    -
    -

    Log in

    -
    -
    - - - -
    - - or -
    - - -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    Don't have an account? Register here. | Forgot your password?
    -
    -
    -
    -
    -
    -
    - - - - - - \ No newline at end of file +// Determine the correct path to header.php based on file location +$rootPath = dirname(dirname(dirname(__DIR__))); +include_once($rootPath . '/header.php'); +// Include Google login PHP logic +require_once $rootPath . '/google-client/vendor/autoload.php'; + +$client = new Google_Client(); +$client->setClientId('948441222188-8qhboq2urr8o9n35mc70s5h2nhd52v0m.apps.googleusercontent.com'); +$client->setClientSecret('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'); +$client->setRedirectUri($_ENV['HOST'] . '/validate_login.php'); +$client->addScope("email"); +$client->addScope("profile"); + +// 👇 Add this to force the account picker +$client->setPrompt('select_account'); + +$login_url = $client->createAuthUrl(); +?> + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    +

    Log in

    +
    +
    + + + +
    + + or +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    + + +
    +
    +
    Don't have an account? Register here. | Forgot your password?
    +
    +
    +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/register.php b/src/pages/auth/register.php similarity index 95% rename from register.php rename to src/pages/auth/register.php index 695a9d2d..aa4bb651 100644 --- a/register.php +++ b/src/pages/auth/register.php @@ -1,174 +1,174 @@ - - -
    -
    -
    -
    -
    -
    -
    -

    Register

    - -
    -

    Register to create your 4WDCSA.co.za user profile.

    -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
      -
    • ✗ At least 8 characters
    • -
    • ✗ At least one uppercase letter
    • -
    • ✗ At least one lowercase letter
    • -
    • ✗ At least one number
    • -
    • ✗ At least one special character
    • -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    Already have an account? Log in here.
    -
    -
    - -
    -
    - -
    -
    -
    - - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php') ?> + + +
    +
    +
    +
    +
    +
    +
    +

    Register

    + +
    +

    Register to create your 4WDCSA.co.za user profile.

    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
      +
    • ✗ At least 8 characters
    • +
    • ✗ At least one uppercase letter
    • +
    • ✗ At least one lowercase letter
    • +
    • ✗ At least one number
    • +
    • ✗ At least one special character
    • +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    Already have an account? Log in here.
    +
    +
    + +
    +
    + +
    +
    +
    + + + + + + + \ No newline at end of file diff --git a/resend_verification.php b/src/pages/auth/resend_verification.php similarity index 82% rename from resend_verification.php rename to src/pages/auth/resend_verification.php index 667c59bb..f47b0198 100644 --- a/resend_verification.php +++ b/src/pages/auth/resend_verification.php @@ -1,40 +1,41 @@ - false, - 'message' => 'Missing required fields.' - ]); - exit; - } - - $email = $data['email']; - $name = $data['name']; - $token = $data['token']; - - - if (sendVerificationEmail($email, $name, $token)) { - $_SESSION['message'] = "Verification mail resend successful!"; - echo json_encode([ - 'success' => true, - 'message' => "Verification email sent to $email." - ]); - } else { - $_SESSION['message'] = "Verification mail resend FAILED!"; - echo json_encode([ - 'success' => false, - 'message' => "Failed to send verification email to $email." - ]); - } -} + false, + 'message' => 'Missing required fields.' + ]); + exit; + } + + $email = $data['email']; + $name = $data['name']; + $token = $data['token']; + + + if (sendVerificationEmail($email, $name, $token)) { + $_SESSION['message'] = "Verification mail resend successful!"; + echo json_encode([ + 'success' => true, + 'message' => "Verification email sent to $email." + ]); + } else { + $_SESSION['message'] = "Verification mail resend FAILED!"; + echo json_encode([ + 'success' => false, + 'message' => "Failed to send verification email to $email." + ]); + } +} diff --git a/reset_password.php b/src/pages/auth/reset_password.php similarity index 92% rename from reset_password.php rename to src/pages/auth/reset_password.php index f8b7d3c6..df9553da 100644 --- a/reset_password.php +++ b/src/pages/auth/reset_password.php @@ -1,113 +1,113 @@ NOW()"; -$stmt = $conn->prepare($sql); -$stmt->bind_param("s", $token); -$stmt->execute(); -$result = $stmt->get_result(); - -if ($result->num_rows === 0) { - die("Token is invalid or expired."); -} - -$user = $result->fetch_assoc(); -$user_id = $user['user_id']; - -// Display the reset password form -?> - - - -
    -
    -
    - - -
    -
    -
    -
    -

    Reset Password

    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - -
    -
    - - - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +$token = $_GET['token'] ?? ''; + +if (empty($token)) { + die("Invalid token."); +} + +// Verify the token +$sql = "SELECT user_id FROM password_resets WHERE token = ? AND expires_at > NOW()"; +$stmt = $conn->prepare($sql); +$stmt->bind_param("s", $token); +$stmt->execute(); +$result = $stmt->get_result(); + +if ($result->num_rows === 0) { + die("Token is invalid or expired."); +} + +$user = $result->fetch_assoc(); +$user_id = $user['user_id']; + +// Display the reset password form +?> + + + +
    +
    +
    + + +
    +
    +
    +
    +

    Reset Password

    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    + + + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/update_password.php b/src/pages/auth/update_password.php similarity index 89% rename from update_password.php rename to src/pages/auth/update_password.php index fd278235..131b9aa1 100644 --- a/update_password.php +++ b/src/pages/auth/update_password.php @@ -1,60 +1,61 @@ - 'error', 'message' => 'Something went wrong'); - -if (isset($_POST['token'], $_POST['new_password'], $_POST['confirm_password'])) { - $token = $_POST['token']; - $new_password = $_POST['new_password']; - $confirm_password = $_POST['confirm_password']; - - if ($new_password !== $confirm_password) { - $response['message'] = 'Passwords do not match.'; - echo json_encode($response); - exit(); - } - - // Verify the token - $sql = "SELECT user_id FROM password_resets WHERE token = ? AND expires_at > NOW()"; - $stmt = $conn->prepare($sql); - $stmt->bind_param("s", $token); - $stmt->execute(); - $result = $stmt->get_result(); - - if ($result->num_rows === 0) { - $response['message'] = 'Token is invalid or expired.'; - echo json_encode($response); - exit(); - } - - $user = $result->fetch_assoc(); - $user_id = $user['user_id']; - - // Hash the new password - $new_password_hash = password_hash($new_password, PASSWORD_BCRYPT); - - // Update the new password in the database - $sql = "UPDATE users SET password = ? WHERE user_id = ?"; - $stmt = $conn->prepare($sql); - $stmt->bind_param("si", $new_password_hash, $user_id); - - if ($stmt->execute()) { - // Delete the token from the database - $sql = "DELETE FROM password_resets WHERE token = ?"; - $stmt = $conn->prepare($sql); - $stmt->bind_param("s", $token); - $stmt->execute(); - - $response['status'] = 'success'; - $response['message'] = 'Password has been successfully reset.'; - } else { - $response['message'] = 'Failed to reset password.'; - } -} else { - $response['message'] = 'Invalid form submission.'; -} - -echo json_encode($response); -?> + 'error', 'message' => 'Something went wrong'); + +if (isset($_POST['token'], $_POST['new_password'], $_POST['confirm_password'])) { + $token = $_POST['token']; + $new_password = $_POST['new_password']; + $confirm_password = $_POST['confirm_password']; + + if ($new_password !== $confirm_password) { + $response['message'] = 'Passwords do not match.'; + echo json_encode($response); + exit(); + } + + // Verify the token + $sql = "SELECT user_id FROM password_resets WHERE token = ? AND expires_at > NOW()"; + $stmt = $conn->prepare($sql); + $stmt->bind_param("s", $token); + $stmt->execute(); + $result = $stmt->get_result(); + + if ($result->num_rows === 0) { + $response['message'] = 'Token is invalid or expired.'; + echo json_encode($response); + exit(); + } + + $user = $result->fetch_assoc(); + $user_id = $user['user_id']; + + // Hash the new password + $new_password_hash = password_hash($new_password, PASSWORD_BCRYPT); + + // Update the new password in the database + $sql = "UPDATE users SET password = ? WHERE user_id = ?"; + $stmt = $conn->prepare($sql); + $stmt->bind_param("si", $new_password_hash, $user_id); + + if ($stmt->execute()) { + // Delete the token from the database + $sql = "DELETE FROM password_resets WHERE token = ?"; + $stmt = $conn->prepare($sql); + $stmt->bind_param("s", $token); + $stmt->execute(); + + $response['status'] = 'success'; + $response['message'] = 'Password has been successfully reset.'; + } else { + $response['message'] = 'Failed to reset password.'; + } +} else { + $response['message'] = 'Invalid form submission.'; +} + +echo json_encode($response); +?> diff --git a/verify.php b/src/pages/auth/verify.php similarity index 78% rename from verify.php rename to src/pages/auth/verify.php index 7dcd4aa4..44e9ee96 100644 --- a/verify.php +++ b/src/pages/auth/verify.php @@ -1,38 +1,39 @@ -connect_error) { - die("Connection failed: " . $conn->connect_error); -} - -// Verify token -if (isset($_GET['token'])) { - $token = $conn->real_escape_string($_GET['token']); - - // Prepare and execute query - $stmt = $conn->prepare('UPDATE users SET is_verified = 1 WHERE token = ?'); - $stmt->bind_param('s', $token); - - if ($stmt->execute()) { - if ($stmt->affected_rows > 0) { - header('Location: login.php'); - } else { - header('Location: login.php'); - } - } else { - echo 'Error: ' . $stmt->error; - } - - $stmt->close(); -} else { - echo 'No token provided.'; -} - -$conn->close(); -?> +connect_error) { + die("Connection failed: " . $conn->connect_error); +} + +// Verify token +if (isset($_GET['token'])) { + $token = $conn->real_escape_string($_GET['token']); + + // Prepare and execute query + $stmt = $conn->prepare('UPDATE users SET is_verified = 1 WHERE token = ?'); + $stmt->bind_param('s', $token); + + if ($stmt->execute()) { + if ($stmt->affected_rows > 0) { + header('Location: login.php'); + } else { + header('Location: login.php'); + } + } else { + echo 'Error: ' . $stmt->error; + } + + $stmt->close(); +} else { + echo 'No token provided.'; +} + +$conn->close(); +?> diff --git a/bookings.php b/src/pages/bookings/bookings.php similarity index 96% rename from bookings.php rename to src/pages/bookings/bookings.php index 1b0b9d61..9e215473 100644 --- a/bookings.php +++ b/src/pages/bookings/bookings.php @@ -1,324 +1,325 @@ - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    - -
    - -
    - - × -
    - - - -
    - -
    - Upcoming Bookings -
    - - - -
    - prepare($sql); - $stmt->bind_param("i", $user_id); - $stmt->execute(); - $result = $stmt->get_result(); - - if ($result->num_rows > 0) { - // Loop through each row - while ($row = $result->fetch_assoc()) { - $booking_id = $row['booking_id']; - $booking_type = $row['booking_type']; - $from_date = $row['from_date']; - $to_date = $row['to_date']; - $num_vehicles = $row['num_vehicles']; - $num_adults = $row['num_adults']; - $num_children = $row['num_children']; - $add_firewood = $row['add_firewood']; - $total_amount = $row['total_amount']; - $discount_amount = $row['discount_amount']; - $status = $row['status']; - $trip_id = $row['trip_id']; - $course_id = $row['course_id']; - $course_nonmembers = $row['course_non_members']; - $radio = $row['radio']; - $amount = $total_amount - $discount_amount; - $total_adults = $num_adults + $course_nonmembers; - - if (!is_null($trip_id)) { - // Prepare a SQL statement to retrieve trip details - $sql_trip = "SELECT trip_name, location, short_description, start_date, end_date FROM trips WHERE trip_id = ?"; - $stmt_trip = $conn->prepare($sql_trip); - $stmt_trip->bind_param("i", $trip_id); - - if ($stmt_trip->execute()) { - $result_trip = $stmt_trip->get_result(); - - if ($result_trip->num_rows > 0) { - // Fetch trip details - $trip_data = $result_trip->fetch_assoc(); - $trip_name = $trip_data['trip_name'] ?? "Trip Name Placeholder"; - $location = $trip_data['location'] ?? "Location Placeholder"; - $short_description = $trip_data['short_description'] ?? "Short description of the trip."; - $start_date = $trip_data['start_date'] ?? $from_date; // Default to booking start date if not set - $end_date = $trip_data['end_date'] ?? $to_date; // Default to booking end date if not set - - } else { - // Set default values if no trip data found - $trip_name = "Trip Name Placeholder"; - $location = "Location Placeholder"; - $short_description = "Short description of the trip."; - $start_date = $from_date; // Default to booking start date - $end_date = $to_date; // Default to booking end date - } - } else { - // Handle SQL execution error - echo "Error retrieving trip information: " . $stmt_trip->error; - } - - // Close the statement - $stmt_trip->close(); - } elseif (!is_null($course_id)) { - // Prepare a SQL statement to retrieve trip details - $sql_course = "SELECT course_type, date FROM courses WHERE course_id = ?"; - $stmt_course = $conn->prepare($sql_course); - $stmt_course->bind_param("i", $course_id); - - if ($stmt_course->execute()) { - $result_course = $stmt_course->get_result(); - - if ($result_course->num_rows > 0) { - // Fetch trip details - $trip_data = $result_course->fetch_assoc(); - $date = $trip_data['date'] ?? "Location Placeholder"; - $type = $trip_data['course_type'] ?? "Trip Name Placeholder"; - if ($type === "driver_training") { - $trip_name = "Basic 4X4 Driver Training Course"; - } elseif ($type === "bush_mechanics") { - $trip_name = "Bush Mechanics Course"; - } elseif ($type === "rescue_recovery") { - $trip_name = "Rescue & Recovery Training Course"; - } else { - $trip_name = "General Course"; // Default fallback description - } - $start_date = $date; - $end_date = $date; - $location = "BASE4, Hennops"; - $short_description = getDetail($type); - } else { - // Set default values if no trip data found - $trip_name = "Trip Name Placeholder"; - $location = "BASE4, Hennops"; - $short_description = getDetail($type); - $start_date = $from_date; // Default to booking start date - $end_date = $to_date; // Default to booking end date - } - } else { - // Handle SQL execution error - echo "Error retrieving trip information: " . $stmt_course->error; - } - - // Close the statement - $stmt_course->close(); - } else { - // Set default values if trip_id is null - $trip_name = "BASE4 Camping"; - $location = "BASE4, Hennops"; - $short_description = "Please remember to bring 2 bags of firewood and drinking water for personal use."; - $start_date = $from_date; // Default to booking start date - $end_date = $to_date; // Default to booking end date - } - - // Get today's date - $today = date("Y-m-d"); - - // Determine if the date is past or future - if ($end_date < $today) { - $tense = 'past'; - } else { - $tense = 'future'; - } - - // Output the HTML structure with dynamic data - echo ' -
    -
    '; - if ($booking_type === 'trip') { - echo '' . htmlspecialchars($trip_name) . ''; - } elseif ($booking_type === 'course') { - echo '' . htmlspecialchars($trip_name) . ''; - } else { - echo 'Base4'; - } - echo ' -
    -
    -
    - ' . htmlspecialchars($location) . ' - -
    -
    ' . htmlspecialchars($trip_name) . '
    -

    ' . htmlspecialchars($short_description) . '

    -
      '; - if ($booking_type === 'course') { - echo '
    • ' . convertDate($start_date) . '
    • '; - } else { - echo '
    • ' . convertDate($start_date) . ' - ' . convertDate($end_date) . '
    • -
    • ' . calculateDaysAndNights($start_date, $end_date) . '
    • '; - } ?> -
    • - 1 ? 'vehicles' : 'vehicle') . ' ' . - $total_adults . ' ' . ($total_adults > 1 ? 'adults' : 'adult'); - if ($num_children > 0) { - echo ' ' . $num_children . ' ' . ($num_children > 1 ? 'children' : 'child'); - } - ?> -
    • - - - -
    -
    '; - } - } else { - echo '

    You have no upcoming bookings.

    '; - } - - - // Close connection - $conn->close(); - ?> - - -
    -
    -
    -
    - - - - - - \ No newline at end of file + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    + +
    + +
    + + × +
    + + + +
    + +
    + Upcoming Bookings +
    + + + +
    + prepare($sql); + $stmt->bind_param("i", $user_id); + $stmt->execute(); + $result = $stmt->get_result(); + + if ($result->num_rows > 0) { + // Loop through each row + while ($row = $result->fetch_assoc()) { + $booking_id = $row['booking_id']; + $booking_type = $row['booking_type']; + $from_date = $row['from_date']; + $to_date = $row['to_date']; + $num_vehicles = $row['num_vehicles']; + $num_adults = $row['num_adults']; + $num_children = $row['num_children']; + $add_firewood = $row['add_firewood']; + $total_amount = $row['total_amount']; + $discount_amount = $row['discount_amount']; + $status = $row['status']; + $trip_id = $row['trip_id']; + $course_id = $row['course_id']; + $course_nonmembers = $row['course_non_members']; + $radio = $row['radio']; + $amount = $total_amount - $discount_amount; + $total_adults = $num_adults + $course_nonmembers; + + if (!is_null($trip_id)) { + // Prepare a SQL statement to retrieve trip details + $sql_trip = "SELECT trip_name, location, short_description, start_date, end_date FROM trips WHERE trip_id = ?"; + $stmt_trip = $conn->prepare($sql_trip); + $stmt_trip->bind_param("i", $trip_id); + + if ($stmt_trip->execute()) { + $result_trip = $stmt_trip->get_result(); + + if ($result_trip->num_rows > 0) { + // Fetch trip details + $trip_data = $result_trip->fetch_assoc(); + $trip_name = $trip_data['trip_name'] ?? "Trip Name Placeholder"; + $location = $trip_data['location'] ?? "Location Placeholder"; + $short_description = $trip_data['short_description'] ?? "Short description of the trip."; + $start_date = $trip_data['start_date'] ?? $from_date; // Default to booking start date if not set + $end_date = $trip_data['end_date'] ?? $to_date; // Default to booking end date if not set + + } else { + // Set default values if no trip data found + $trip_name = "Trip Name Placeholder"; + $location = "Location Placeholder"; + $short_description = "Short description of the trip."; + $start_date = $from_date; // Default to booking start date + $end_date = $to_date; // Default to booking end date + } + } else { + // Handle SQL execution error + echo "Error retrieving trip information: " . $stmt_trip->error; + } + + // Close the statement + $stmt_trip->close(); + } elseif (!is_null($course_id)) { + // Prepare a SQL statement to retrieve trip details + $sql_course = "SELECT course_type, date FROM courses WHERE course_id = ?"; + $stmt_course = $conn->prepare($sql_course); + $stmt_course->bind_param("i", $course_id); + + if ($stmt_course->execute()) { + $result_course = $stmt_course->get_result(); + + if ($result_course->num_rows > 0) { + // Fetch trip details + $trip_data = $result_course->fetch_assoc(); + $date = $trip_data['date'] ?? "Location Placeholder"; + $type = $trip_data['course_type'] ?? "Trip Name Placeholder"; + if ($type === "driver_training") { + $trip_name = "Basic 4X4 Driver Training Course"; + } elseif ($type === "bush_mechanics") { + $trip_name = "Bush Mechanics Course"; + } elseif ($type === "rescue_recovery") { + $trip_name = "Rescue & Recovery Training Course"; + } else { + $trip_name = "General Course"; // Default fallback description + } + $start_date = $date; + $end_date = $date; + $location = "BASE4, Hennops"; + $short_description = getDetail($type); + } else { + // Set default values if no trip data found + $trip_name = "Trip Name Placeholder"; + $location = "BASE4, Hennops"; + $short_description = getDetail($type); + $start_date = $from_date; // Default to booking start date + $end_date = $to_date; // Default to booking end date + } + } else { + // Handle SQL execution error + echo "Error retrieving trip information: " . $stmt_course->error; + } + + // Close the statement + $stmt_course->close(); + } else { + // Set default values if trip_id is null + $trip_name = "BASE4 Camping"; + $location = "BASE4, Hennops"; + $short_description = "Please remember to bring 2 bags of firewood and drinking water for personal use."; + $start_date = $from_date; // Default to booking start date + $end_date = $to_date; // Default to booking end date + } + + // Get today's date + $today = date("Y-m-d"); + + // Determine if the date is past or future + if ($end_date < $today) { + $tense = 'past'; + } else { + $tense = 'future'; + } + + // Output the HTML structure with dynamic data + echo ' +
    +
    '; + if ($booking_type === 'trip') { + echo '' . htmlspecialchars($trip_name) . ''; + } elseif ($booking_type === 'course') { + echo '' . htmlspecialchars($trip_name) . ''; + } else { + echo 'Base4'; + } + echo ' +
    +
    +
    + ' . htmlspecialchars($location) . ' + +
    +
    ' . htmlspecialchars($trip_name) . '
    +

    ' . htmlspecialchars($short_description) . '

    +
      '; + if ($booking_type === 'course') { + echo '
    • ' . convertDate($start_date) . '
    • '; + } else { + echo '
    • ' . convertDate($start_date) . ' - ' . convertDate($end_date) . '
    • +
    • ' . calculateDaysAndNights($start_date, $end_date) . '
    • '; + } ?> +
    • + 1 ? 'vehicles' : 'vehicle') . ' ' . + $total_adults . ' ' . ($total_adults > 1 ? 'adults' : 'adult'); + if ($num_children > 0) { + echo ' ' . $num_children . ' ' . ($num_children > 1 ? 'children' : 'child'); + } + ?> +
    • + + + +
    +
    '; + } + } else { + echo '

    You have no upcoming bookings.

    '; + } + + + // Close connection + $conn->close(); + ?> + + +
    +
    +
    +
    + + + + + + diff --git a/campsite_booking.php b/src/pages/bookings/campsite_booking.php similarity index 96% rename from campsite_booking.php rename to src/pages/bookings/campsite_booking.php index 944829a9..a93d890f 100644 --- a/campsite_booking.php +++ b/src/pages/bookings/campsite_booking.php @@ -1,217 +1,217 @@ - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - Welcome to -

    BASE4 Camping

    -
    -

    Escape to the ultimate outdoor adventure at BASE4, nestled right next to a tranquil stream. Enjoy the perfect blend of rugged exploration and relaxation with top-notch facilities, including braai areas, hot showers, and clean ablution blocks. Gather with friends under our spacious lapa or take a dip in the refreshing swimming pool after a day of off-road fun. Whether you're conquering trails or kicking back by the fire, our campsite offers the ideal setting for an unforgettable getaway. Book your spot today and experience nature at its finest!

    - -
    -
    -
    Book your Campsite
    -
    -
    - From Date - -
    -
    - To Date - -
    -
    -
      -
    • - No. of Vehicles - -
    • -
    • - No. of Adults - -
    • -
    • - No. of Children - -
    • -
    -
    -
    Add Extra:
    -
      -
    • - - -
    • -
    -
    - - -
    -
    Discount:
    -
      -
    • - -
    • -
    -
    -
    - - -
    Total: -
    - - -
    - Need some help? | Payments will be redirected to Payfast. -
    -
    - -
    - - -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +checkUserSession(); +?> + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + Welcome to +

    BASE4 Camping

    +
    +

    Escape to the ultimate outdoor adventure at BASE4, nestled right next to a tranquil stream. Enjoy the perfect blend of rugged exploration and relaxation with top-notch facilities, including braai areas, hot showers, and clean ablution blocks. Gather with friends under our spacious lapa or take a dip in the refreshing swimming pool after a day of off-road fun. Whether you're conquering trails or kicking back by the fire, our campsite offers the ideal setting for an unforgettable getaway. Book your spot today and experience nature at its finest!

    + +
    +
    +
    Book your Campsite
    +
    +
    + From Date + +
    +
    + To Date + +
    +
    +
      +
    • + No. of Vehicles + +
    • +
    • + No. of Adults + +
    • +
    • + No. of Children + +
    • +
    +
    +
    Add Extra:
    +
      +
    • + + +
    • +
    +
    + + +
    +
    Discount:
    +
      +
    • + +
    • +
    +
    +
    + + +
    Total: -
    + + +
    + Need some help? | Payments will be redirected to Payfast. +
    +
    + +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + diff --git a/campsites.php b/src/pages/bookings/campsites.php similarity index 95% rename from campsites.php rename to src/pages/bookings/campsites.php index 05440ae6..ce4926d6 100644 --- a/campsites.php +++ b/src/pages/bookings/campsites.php @@ -1,194 +1,195 @@ -prepare("SELECT * FROM campsites"); -$stmt->execute(); -$result = $stmt->get_result(); -$campsites = []; -while ($row = $result->fetch_assoc()) { - $campsites[] = $row; -} -?> - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    -
    - -
    - - -
    -
    -
    -
    - - - - - - - - \ No newline at end of file +prepare("SELECT * FROM campsites"); +$stmt->execute(); +$result = $stmt->get_result(); +$campsites = []; +while ($row = $result->fetch_assoc()) { + $campsites[] = $row; +} +?> + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + + + + + + + + diff --git a/course_details.php b/src/pages/bookings/course_details.php similarity index 97% rename from course_details.php rename to src/pages/bookings/course_details.php index d4963790..c1b73b08 100644 --- a/course_details.php +++ b/src/pages/bookings/course_details.php @@ -1,302 +1,303 @@ -prepare("SELECT course_id, date FROM courses WHERE course_type = ?"); -$course_type = 'driver_training'; -$stmt->bind_param("s", $course_type); -$stmt->execute(); -$result = $stmt->get_result(); -?> - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - - -
    -
    -
    -
    -
    -
    -
    - Perview -
    -
    - Perview -
    -
    - Perview -
    -
    - -
    -
    -
    -
    -
    -

    4X4 Driver Training

    -
    - - R 50,00/member - R 750,00/non-members -

    Our 4x4 Basic Training Course equips you with the essential skills and knowledge to confidently tackle off-road terrains. Learn vehicle mechanics, driving techniques, obstacle navigation, and recovery methods while promoting safe and responsible off-road practices. Perfect for beginners and new 4x4 owners!

    -
    -
    - - - - -
    -
    - Add to Wishlist -
    -
    -
    - -
    -
    -

    A 4x4 Basic Training Course is designed to equip participants with the foundational knowledge and practical skills necessary for safe and effective off-road driving. This course covers essential topics such as understanding the mechanics of 4x4 vehicles, selecting the appropriate gear, and engaging various drive modes to tackle different terrains. Participants will learn how to navigate obstacles like mud, sand, and rocky paths while maintaining vehicle control and ensuring safety for themselves and their passengers. The training also includes instruction on tire pressure management, vehicle recovery techniques, and the use of essential recovery equipment like tow straps and shackles.

    -

    In addition to practical driving exercises, the course emphasizes responsible off-road driving practices, including respecting the environment and adhering to trail etiquette. Whether you're a novice driver looking to explore off-road adventures or a new 4x4 owner seeking confidence behind the wheel, this training provides a comprehensive introduction to the world of off-roading. By the end of the course, participants will feel prepared to tackle basic off-road challenges with skill and assurance, making their next 4x4 outing a safe and enjoyable experience.

    -
    -
    -
    What this course includes
    -
      -
    • Basic Driver Training Manual.
    • -
    • Theory session and discussion.
    • -
    • Spend the afternoon on the track learning the basic practices of 4X4 driving.
    • -
    -
    -
    -
    - Product Details -
    -
    -
    -
    -
    - -
      -
    • Coffee and Welcome: Start the day with a warm cup of coffee, meet the instructors, and get an overview of the training schedule.
    • -
    • Theory Session: Learn the fundamentals of 4x4 vehicle mechanics, terrain types, recovery equipment, and off-road safety.
    • -
    • Practical Demonstrations: Observe demonstrations of essential techniques like gear selection, tire pressure adjustment, and recovery setups.
    • -
    • Lunch Break: Bring along a packed lunch or something to braai. Fires will be provided.
    • -
    • Track Driving and Practical Training: Put theory into action with hands-on driving exercises on a custom-designed off-road track.
    • -
    • Debrief and Certificates: Wrap up the day with a recap of key lessons, feedback from instructors, and certificates of completion.
    • -
    -
    - - - - -
    -
    -
    - - - - -
    -
    -
    -

    Other Courses

    -
    -
    -
    -
    - Product -
    -
    -
    - - - - - -
    -
    Airport Travel Suitcases
    - $188.00 -
    -
    -
    -
    - Product -
    -
    -
    - - - - - -
    -
    Travel Great blue hat
    - $188.00 -
    -
    -
    -
    - Product -
    -
    -
    - - - - - -
    -
    Waistband and Mesh Fashion
    - $188.00 -
    -
    -
    -
    - Product -
    -
    -
    - - - - - -
    -
    Sandals for Casual Techies
    - $188.00 -
    -
    -
    -
    - Product -
    -
    -
    - - - - - -
    -
    Children With Jute Soles
    - $188.00 -
    -
    -
    -
    -
    - - - - \ No newline at end of file +prepare("SELECT course_id, date FROM courses WHERE course_type = ?"); +$course_type = 'driver_training'; +$stmt->bind_param("s", $course_type); +$stmt->execute(); +$result = $stmt->get_result(); +?> + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + + +
    +
    +
    +
    +
    +
    +
    + Perview +
    +
    + Perview +
    +
    + Perview +
    +
    + +
    +
    +
    +
    +
    +

    4X4 Driver Training

    +
    + + R 50,00/member + R 750,00/non-members +

    Our 4x4 Basic Training Course equips you with the essential skills and knowledge to confidently tackle off-road terrains. Learn vehicle mechanics, driving techniques, obstacle navigation, and recovery methods while promoting safe and responsible off-road practices. Perfect for beginners and new 4x4 owners!

    +
    +
    + + + + +
    +
    + Add to Wishlist +
    +
    +
    + +
    +
    +

    A 4x4 Basic Training Course is designed to equip participants with the foundational knowledge and practical skills necessary for safe and effective off-road driving. This course covers essential topics such as understanding the mechanics of 4x4 vehicles, selecting the appropriate gear, and engaging various drive modes to tackle different terrains. Participants will learn how to navigate obstacles like mud, sand, and rocky paths while maintaining vehicle control and ensuring safety for themselves and their passengers. The training also includes instruction on tire pressure management, vehicle recovery techniques, and the use of essential recovery equipment like tow straps and shackles.

    +

    In addition to practical driving exercises, the course emphasizes responsible off-road driving practices, including respecting the environment and adhering to trail etiquette. Whether you're a novice driver looking to explore off-road adventures or a new 4x4 owner seeking confidence behind the wheel, this training provides a comprehensive introduction to the world of off-roading. By the end of the course, participants will feel prepared to tackle basic off-road challenges with skill and assurance, making their next 4x4 outing a safe and enjoyable experience.

    +
    +
    +
    What this course includes
    +
      +
    • Basic Driver Training Manual.
    • +
    • Theory session and discussion.
    • +
    • Spend the afternoon on the track learning the basic practices of 4X4 driving.
    • +
    +
    +
    +
    + Product Details +
    +
    +
    +
    +
    + +
      +
    • Coffee and Welcome: Start the day with a warm cup of coffee, meet the instructors, and get an overview of the training schedule.
    • +
    • Theory Session: Learn the fundamentals of 4x4 vehicle mechanics, terrain types, recovery equipment, and off-road safety.
    • +
    • Practical Demonstrations: Observe demonstrations of essential techniques like gear selection, tire pressure adjustment, and recovery setups.
    • +
    • Lunch Break: Bring along a packed lunch or something to braai. Fires will be provided.
    • +
    • Track Driving and Practical Training: Put theory into action with hands-on driving exercises on a custom-designed off-road track.
    • +
    • Debrief and Certificates: Wrap up the day with a recap of key lessons, feedback from instructors, and certificates of completion.
    • +
    +
    + + + + +
    +
    +
    + + + + +
    +
    +
    +

    Other Courses

    +
    +
    +
    +
    + Product +
    +
    +
    + + + + + +
    +
    Airport Travel Suitcases
    + $188.00 +
    +
    +
    +
    + Product +
    +
    +
    + + + + + +
    +
    Travel Great blue hat
    + $188.00 +
    +
    +
    +
    + Product +
    +
    +
    + + + + + +
    +
    Waistband and Mesh Fashion
    + $188.00 +
    +
    +
    +
    + Product +
    +
    +
    + + + + + +
    +
    Sandals for Casual Techies
    + $188.00 +
    +
    +
    +
    + Product +
    +
    +
    + + + + + +
    +
    Children With Jute Soles
    + $188.00 +
    +
    +
    +
    +
    + + + + diff --git a/driver_training.php b/src/pages/bookings/driver_training.php similarity index 97% rename from driver_training.php rename to src/pages/bookings/driver_training.php index 9470454f..9de4a244 100644 --- a/driver_training.php +++ b/src/pages/bookings/driver_training.php @@ -1,388 +1,389 @@ -prepare("SELECT course_id, date - FROM courses - WHERE course_type = ? - AND date >= CURDATE()"); -$course_type = 'driver_training'; -$stmt->bind_param("s", $course_type); -$stmt->execute(); -$result = $stmt->get_result(); -$page_id = 'driver_training'; - -?> - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    -
    -
    -
    -
    - Perview -
    -
    - Perview -
    -
    - Perview -
    -
    - -
    -
    -
    -
    -
    -

    4X4 Driver Training

    -
    - - R /member - R /non-members -

    Our 4x4 Basic Training Course equips you with the essential skills and knowledge to confidently tackle off-road terrains. Learn vehicle mechanics, driving techniques, obstacle navigation, and recovery methods while promoting safe and responsible off-road practices. Perfect for beginners and new 4x4 owners!

    -
    -
    -
    -
    -
      -
    • - Select Date - - -
    • - - Additional Members - - - '; - } ?> - -
    • - Additional Non-Members - -
    • - -
    -
    - -
    Total: -
    -
    -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    -
    - - -
    -
    - - num_rows == 0) { - $button_text = "No booking dates available"; - $button_disabled = "disabled"; - } - ?> - - -
    -
    - -
    - - -
    -
    -
    - -
    -
    -

    A 4x4 Basic Training Course is designed to equip participants with the foundational knowledge and practical skills necessary for safe and effective off-road driving. This course covers essential topics such as understanding the mechanics of 4x4 vehicles, selecting the appropriate gear, and engaging various drive modes to tackle different terrains. Participants will learn how to navigate obstacles like mud, sand, and rocky paths while maintaining vehicle control and ensuring safety for themselves and their passengers. The training also includes instruction on tire pressure management, vehicle recovery techniques, and the use of essential recovery equipment like tow straps and shackles.

    -

    In addition to practical driving exercises, the course emphasizes responsible off-road driving practices, including respecting the environment and adhering to trail etiquette. Whether you're a novice driver looking to explore off-road adventures or a new 4x4 owner seeking confidence behind the wheel, this training provides a comprehensive introduction to the world of off-roading. By the end of the course, participants will feel prepared to tackle basic off-road challenges with skill and assurance, making their next 4x4 outing a safe and enjoyable experience.

    -
    -
    -
    What this course includes
    -
      -
    • Basic Driver Training Manual.
    • -
    • Theory session and discussion.
    • -
    • Spend the afternoon on the track learning the basic practices of 4X4 driving.
    • -
    -
    -
    -
    - Product Details -
    -
    -
    -
    -
    - -
      -
    • Coffee and Welcome: Start the day with a warm cup of coffee, meet the instructors, and get an overview of the training schedule.
    • -
    • Theory Session: Learn the fundamentals of 4x4 vehicle mechanics, terrain types, recovery equipment, and off-road safety.
    • -
    • Practical Demonstrations: Observe demonstrations of essential techniques like gear selection, tire pressure adjustment, and recovery setups.
    • -
    • Lunch Break: Bring along a packed lunch or something to braai. Fires will be provided.
    • -
    • Track Driving and Practical Training: Put theory into action with hands-on driving exercises on a custom-designed off-road track.
    • -
    • Debrief and Certificates: Wrap up the day with a recap of key lessons, feedback from instructors, and certificates of completion.
    • -
    -
    -
    - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file +prepare("SELECT course_id, date + FROM courses + WHERE course_type = ? + AND date >= CURDATE()"); +$course_type = 'driver_training'; +$stmt->bind_param("s", $course_type); +$stmt->execute(); +$result = $stmt->get_result(); +$page_id = 'driver_training'; + +?> + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    +
    +
    +
    +
    + Perview +
    +
    + Perview +
    +
    + Perview +
    +
    + +
    +
    +
    +
    +
    +

    4X4 Driver Training

    +
    + + R /member + R /non-members +

    Our 4x4 Basic Training Course equips you with the essential skills and knowledge to confidently tackle off-road terrains. Learn vehicle mechanics, driving techniques, obstacle navigation, and recovery methods while promoting safe and responsible off-road practices. Perfect for beginners and new 4x4 owners!

    +
    +
    +
    +
    +
      +
    • + Select Date + + +
    • + + Additional Members + + + '; + } ?> + +
    • + Additional Non-Members + +
    • + +
    +
    + +
    Total: -
    +
    +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    +
    + + +
    +
    + + num_rows == 0) { + $button_text = "No booking dates available"; + $button_disabled = "disabled"; + } + ?> + + +
    +
    + +
    + + +
    +
    +
    + +
    +
    +

    A 4x4 Basic Training Course is designed to equip participants with the foundational knowledge and practical skills necessary for safe and effective off-road driving. This course covers essential topics such as understanding the mechanics of 4x4 vehicles, selecting the appropriate gear, and engaging various drive modes to tackle different terrains. Participants will learn how to navigate obstacles like mud, sand, and rocky paths while maintaining vehicle control and ensuring safety for themselves and their passengers. The training also includes instruction on tire pressure management, vehicle recovery techniques, and the use of essential recovery equipment like tow straps and shackles.

    +

    In addition to practical driving exercises, the course emphasizes responsible off-road driving practices, including respecting the environment and adhering to trail etiquette. Whether you're a novice driver looking to explore off-road adventures or a new 4x4 owner seeking confidence behind the wheel, this training provides a comprehensive introduction to the world of off-roading. By the end of the course, participants will feel prepared to tackle basic off-road challenges with skill and assurance, making their next 4x4 outing a safe and enjoyable experience.

    +
    +
    +
    What this course includes
    +
      +
    • Basic Driver Training Manual.
    • +
    • Theory session and discussion.
    • +
    • Spend the afternoon on the track learning the basic practices of 4X4 driving.
    • +
    +
    +
    +
    + Product Details +
    +
    +
    +
    +
    + +
      +
    • Coffee and Welcome: Start the day with a warm cup of coffee, meet the instructors, and get an overview of the training schedule.
    • +
    • Theory Session: Learn the fundamentals of 4x4 vehicle mechanics, terrain types, recovery equipment, and off-road safety.
    • +
    • Practical Demonstrations: Observe demonstrations of essential techniques like gear selection, tire pressure adjustment, and recovery setups.
    • +
    • Lunch Break: Bring along a packed lunch or something to braai. Fires will be provided.
    • +
    • Track Driving and Practical Training: Put theory into action with hands-on driving exercises on a custom-designed off-road track.
    • +
    • Debrief and Certificates: Wrap up the day with a recap of key lessons, feedback from instructors, and certificates of completion.
    • +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/trip-details.php b/src/pages/bookings/trip-details.php similarity index 97% rename from trip-details.php rename to src/pages/bookings/trip-details.php index 896158f1..03be922a 100644 --- a/trip-details.php +++ b/src/pages/bookings/trip-details.php @@ -1,676 +1,676 @@ prepare($sql); - -if ($stmt) { - // Bind the parameter - $stmt->bind_param("i", $trip_id); - - // Execute the query - $stmt->execute(); - - // Get the result - $result = $stmt->get_result(); - - // Check if the trip exists - if ($result->num_rows > 0) { - // Fetch the data - $row = $result->fetch_assoc(); - - // Populate the variables - $trip_id = $row['trip_id']; - $trip_name = $row['trip_name']; - $location = $row['location']; - $short_description = $row['short_description']; - $long_description = $row['long_description']; - $start_date = $row['start_date']; - $end_date = $row['end_date']; - $capacity = $row['vehicle_capacity']; - $cost_members = $row['cost_members']; - $cost_nonmembers = $row['cost_nonmembers']; - $cost_pensioner = $row['cost_pensioner']; - $cost_pensioner_member = $row['cost_pensioner_member']; - $member_discount = $cost_nonmembers - $cost_members; - $member_discount_pensioner = $cost_pensioner - $cost_pensioner_member; - $places_booked = $row['places_booked']; - $booking_fee = $row['booking_fee']; - $remaining_places = getAvailableSpaces($trip_id); - - // Determine the badge text based on the status - $badge_text = ($remaining_places > 0) ? $remaining_places . ' PLACES LEFT!!' : 'FULLY BOOKED'; - - // Convert newlines into
    tags to preserve line breaks - $formatted_description = nl2br($long_description); - - // Wrap the text in

    tags at the beginning and end - $formatted_description = '

    ' . $formatted_description . '

    '; - } else { - echo "No trip found with ID: $trip_id"; - } - - // Close the statement - $stmt->close(); -} else { - echo "Error preparing the statement: " . $conn->error; -} - -// Always close the database connection when done -$conn->close(); - -?> - +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +checkUserSession(); + +if (!isset($_GET['token']) || empty($_GET['token'])) { + die("Invalid request."); +} +$token = $_GET['token']; +// echo $token; + +// Sanitize the trip_id to prevent SQL injection +$trip_id = intval(decryptData($token, $salt)); // Ensures $trip_id is treated as an integer + +// Prepare the SQL query +$sql = "SELECT trip_id, trip_name, location, short_description, long_description, start_date, end_date, + vehicle_capacity, cost_members, cost_nonmembers, places_booked, booking_fee, cost_pensioner, cost_pensioner_member + FROM trips + WHERE trip_id = ?"; + +// Use prepared statements for added security +$stmt = $conn->prepare($sql); + +if ($stmt) { + // Bind the parameter + $stmt->bind_param("i", $trip_id); + + // Execute the query + $stmt->execute(); + + // Get the result + $result = $stmt->get_result(); + + // Check if the trip exists + if ($result->num_rows > 0) { + // Fetch the data + $row = $result->fetch_assoc(); + + // Populate the variables + $trip_id = $row['trip_id']; + $trip_name = $row['trip_name']; + $location = $row['location']; + $short_description = $row['short_description']; + $long_description = $row['long_description']; + $start_date = $row['start_date']; + $end_date = $row['end_date']; + $capacity = $row['vehicle_capacity']; + $cost_members = $row['cost_members']; + $cost_nonmembers = $row['cost_nonmembers']; + $cost_pensioner = $row['cost_pensioner']; + $cost_pensioner_member = $row['cost_pensioner_member']; + $member_discount = $cost_nonmembers - $cost_members; + $member_discount_pensioner = $cost_pensioner - $cost_pensioner_member; + $places_booked = $row['places_booked']; + $booking_fee = $row['booking_fee']; + $remaining_places = getAvailableSpaces($trip_id); + + // Determine the badge text based on the status + $badge_text = ($remaining_places > 0) ? $remaining_places . ' PLACES LEFT!!' : 'FULLY BOOKED'; + + // Convert newlines into
    tags to preserve line breaks + $formatted_description = nl2br($long_description); + + // Wrap the text in

    tags at the beginning and end + $formatted_description = '

    ' . $formatted_description . '

    '; + } else { + echo "No trip found with ID: $trip_id"; + } + + // Close the statement + $stmt->close(); +} else { + echo "Error preparing the statement: " . $conn->error; +} + +// Always close the database connection when done +$conn->close(); + +?> + - - - - -
    - -
    - -
    -
    - - - - - - - - - - -
    -
    -
    -
    -
    - -
    -

    -
    - - -
    - -
    - -
    -
    -
    -
    - - - - -
    -
    -
    -
    -
    -

    Trip Info

    -

    -
    -
    -

    R

    /per member -
    -
    -
    -
    -

    R

    /per non-member -
    -
    -
    -
    -
    -

    R

    /club fee per vehicle -
    -
    - -
    - - - - - - -
    - -
    - -
    -
    -
    -
    -
    Book your Trip
    -
    - -
      -
    • - -
    • -
    -
      -
    • - -
    • -
    - -
    -
      -
    • - Vehicles - -
    • -
    • - Adults - -
    • - -
    • - Children - -
    • -
    • - Pensioners - -
    • -
    - - - - -
    - - -
    -
    Discount:
    -
      -
    • - -
    • -
    -
    -
    - -
      -
    • - -
    • -
    -
    -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    -
    - - -
    -
    -
    Total: -
    - - - - - - - -
    - -
    - - - -
    -
    Need Help?
    - -
    - - - -
    -
    -
    -
    -
    - - - - - - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +?> + + + + +
    + +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +

    +
    + + +
    + +
    + +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +

    Trip Info

    +

    +
    +
    +

    R

    /per member +
    +
    +
    +
    +

    R

    /per non-member +
    +
    +
    +
    +
    +

    R

    /club fee per vehicle +
    +
    + +
    + + + + + + +
    + +
    + +
    +
    +
    +
    +
    Book your Trip
    +
    + +
      +
    • + +
    • +
    +
      +
    • + +
    • +
    + +
    +
      +
    • + Vehicles + +
    • +
    • + Adults + +
    • + +
    • + Children + +
    • +
    • + Pensioners + +
    • +
    + + + + +
    + + +
    +
    Discount:
    +
      +
    • + +
    • +
    +
    +
    + +
      +
    • + +
    • +
    +
    +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    +
    + + +
    +
    +
    Total: -
    + + + + + + + +
    + +
    + + + +
    +
    Need Help?
    + +
    + + + +
    +
    +
    +
    +
    + + + + + + + + + + + diff --git a/trips.php b/src/pages/bookings/trips.php similarity index 95% rename from trips.php rename to src/pages/bookings/trips.php index ea116ed8..6b1ea7a8 100644 --- a/trips.php +++ b/src/pages/bookings/trips.php @@ -1,139 +1,141 @@ - - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    - -
    -
    - -
    - Trips available -
    - -
    - CURDATE()"; - $result = $conn->query($sql); - - if ($result->num_rows > 0) { - // Loop through each row - while ($row = $result->fetch_assoc()) { - $trip_id = $row['trip_id']; - $trip_name = $row['trip_name']; - $location = $row['location']; - $short_description = $row['short_description']; - $start_date = $row['start_date']; - $end_date = $row['end_date']; - $capacity = $row['vehicle_capacity']; - $cost_members = $row['cost_members']; - $places_booked = $row['places_booked']; - $remaining_places = getAvailableSpaces($trip_id); - - // Determine the badge text based on the status - $badge_text = ($remaining_places > 0) ? $remaining_places.' PLACES LEFT!!' : 'FULLY BOOKED'; - - // Output the HTML structure with dynamic data - echo ' -
    -
    - ' . $badge_text . ' - ' . $trip_name . ' -
    -
    -
    - ' . $location . ' -
    - - - - - -
    -
    -
    ' . $trip_name . '
    -

    ' . $short_description . '

    -
      -
    • ' . convertDate($start_date) . ' - ' . convertDate($end_date) . '
    • -
    • '.calculateDaysAndNights($start_date, $end_date).'
    • -
    • ' . $capacity . ' vehicles max
    • -
    - -
    -
    '; - } - } - - // Close connection - $conn->close(); - ?> - - -
    -
    -
    -
    - - - - \ No newline at end of file + + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    + +
    +
    + +
    + Trips available +
    + +
    + CURDATE()"; + $result = $conn->query($sql); + + if ($result->num_rows > 0) { + // Loop through each row + while ($row = $result->fetch_assoc()) { + $trip_id = $row['trip_id']; + $trip_name = $row['trip_name']; + $location = $row['location']; + $short_description = $row['short_description']; + $start_date = $row['start_date']; + $end_date = $row['end_date']; + $capacity = $row['vehicle_capacity']; + $cost_members = $row['cost_members']; + $places_booked = $row['places_booked']; + $remaining_places = getAvailableSpaces($trip_id); + + // Determine the badge text based on the status + $badge_text = ($remaining_places > 0) ? $remaining_places.' PLACES LEFT!!' : 'FULLY BOOKED'; + + // Output the HTML structure with dynamic data + echo ' +
    +
    + ' . $badge_text . ' + ' . $trip_name . ' +
    +
    +
    + ' . $location . ' +
    + + + + + +
    +
    +
    ' . $trip_name . '
    +

    ' . $short_description . '

    +
      +
    • ' . convertDate($start_date) . ' - ' . convertDate($end_date) . '
    • +
    • '.calculateDaysAndNights($start_date, $end_date).'
    • +
    • ' . $capacity . ' vehicles max
    • +
    + +
    +
    '; + } + } + + // Close connection + $conn->close(); + ?> + + +
    +
    +
    +
    + + + + diff --git a/2025_agm_minutes.php b/src/pages/events/2025_agm_minutes.php similarity index 96% rename from 2025_agm_minutes.php rename to src/pages/events/2025_agm_minutes.php index 96ceca8e..1582b70f 100644 --- a/2025_agm_minutes.php +++ b/src/pages/events/2025_agm_minutes.php @@ -1,257 +1,258 @@ - - - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    -
    -
    - Report - -

    2025 AGM Minutes & Chairman's Report

    - - - -
    - -
    - -
    -
    -
    Tags
    -
    - Reports - -
    -
    - -
    - - - - - -
    -
    -
    - - - - - - - - - - - -
    -
    -
    -
    -
    - - - - \ No newline at end of file + + + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    +
    +
    + Report + +

    2025 AGM Minutes & Chairman's Report

    + + + +
    + +
    + +
    +
    +
    Tags
    +
    + Reports + +
    +
    + +
    + + + + + +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + diff --git a/agm_content.php b/src/pages/events/agm_content.php similarity index 98% rename from agm_content.php rename to src/pages/events/agm_content.php index 1f7e8775..be777951 100644 --- a/agm_content.php +++ b/src/pages/events/agm_content.php @@ -1,384 +1,384 @@ - - -

    DATE: 05 April 2025 at 10h00
    - VENUE: Base 4 -

    -

    -

    NOTICE CONVENING THE MEETING
    - - -

    -

    -

    WELCOME, APOLOGIES AND PROXIES
    - -

    -

    -

    ACCEPTANCE OF THE AGENDA WITH ANY ADDITIONAL ITEMS FROM THE FLOOR
    - -

    -

    -

    CONFIRMATION OF THE MINUTES OF THE PREVIOUS AGM OF 25 MARCH 2023
    - -

    -

    CHAIRMAN’S REPORT

    -

    I am honoured to be standing up here today to welcome you all to the 2025 AGM! We have a lot to cover so I won’t drag this out. - It makes me think of my father when he gave a talk at school or at scouts where he went on and on, and we said he did not need a watch, he needed a calendar!

    - -
    FIRE
    -

    - Base 4 Fire -

    The biggest event of last year, or in fact the biggest event in the history of the Club, was the devastating fire that swept through Base 4. It occurred on a very windy day when a veldfire swept through the area burning everything in its path including I believe 6 homesteads. At Base 4 the Clubhouse and all the contents burned to the ground. If you look at the hulk over there you can only imagine the heat and destruction! The lapa down in the camping area suffered the same loss, leaving smouldering thatch which took days to cool.

    -

    The only things left standing were the vehicle service structure and the container, the wooden ablution block down in the camping area, and the brick and mortar ablution block on the Northern side of Base 4. - Whereto from there? We are not an outdoor adventure club for nothing! Everyone got stuck in and assisted in clearing the rubble, reconnecting the water and restoring electricity to the pool. A huge thank you to all those that put their backs to the wheel!

    -

    Luckily, the vehicle service structure was still standing, so with a few adjustments and additions, we held the next open day there, a great success! I believe the turnout exceeded the standard turnout in the old Clubhouse.

    -

    - -
    SPECIAL GENERAL MEETING
    -

    Following the fire we had to negotiate the insurance claim. With good planning all the requirements as stipulated by the insurers were up to date and current, including the thatch upgrade earlier in the year and the recent issue of the Electrical Certificate of Compliance amongst other things ensured that there were no serious issues with the insurance value, and with the help of Geoff Joubert, the valuation of the insurance payout was submitted to the Club in record breaking time.

    -

    This valuation gave us an option: either get the Clubhouse rebuilt to its former glory or take the cash which amounted to about 70% of the rebuild tender (the Indemnity Value). Choosing one or the other was not a decision that could be made by the Committee, hence the calling of a Special General Meeting so that the decision could be made by the Membership.

    -

    There were really 2 decisions that needed to be made at that SGM: keep Base 4 or sell it, and when the decision was made to keep Base 4, whether to get the Clubhouse rebuilt or to take the money. The decision was to take the money and to reinvent the Club more in line with the current membership numbers and needs.

    -

    All Members were then invited to submit proposals for the future of the Club to be considered and voted for at this Annual General Meeting. I will deal with these proposals later as dictated by the Agenda.

    - -
    BASE 4 MAINTENANCE
    -

    Base 4 is a big piece of ground and needs continuous and on-going maintenance. As mentioned earlier, the fire destroyed much of the infrastructure especially water pipes and electrical cabling. Thank you to the generous members that donated time, money and product ensuring that the basic services were in place to allow Base 4 to operate.

    -

    The grass still needs cutting, the tracks maintained for driver training and for members to hone their skills. The ablution blocks require on-going upkeep and cleaning, fences repaired, water pumped and the myriad of jobs that need to be done but no one thinks about.

    - - -
    CLUB SECRETARY
    -

    Karl Hoffman’s name is synonymous with Base 4 and the Four Wheel Drive Club. He has been the go-to person for the Club for many years! This last year Karl stepped down from the position as Club Secretary due to ill-health: more about that later.

    -

    The Committee has appointed Jacqui Boshoff to the position of Secretary, and we welcome her with open arms; I ask you all support her going forward.

    -

    Please make a note regarding the Club contact details: -

    -

    - - -
    THANK YOU’S
    -

    I want to thank all those that have put in time and effort this past year

    - -

    The Committee -

    -

    -

    The Breakfast brigade -

    -

    -

    Event organisation -

    -

    -

    Base 4 maintenance -

    -

    -

    If I have left anyone out, please forgive me!

    -

    -

    OUTINGS
    -

    This has been a bumper year for outings, 11 in total. -

    -

    -

    -

    OPEN DAYS
    - -

    -

    -

    EVENTS
    - -

    -

    -

    DRIVER TRAINING
    -

    Another great perk of Club Membership is free driver training, make use of it!

    - -

    -

    ADDRESS

    -

    - A little later this morning we are going to make some decisions about the future of Base 4. - What I want to talk about is the future of The Four Wheel Club of Southern Africa, Gauteng region. -

    - -

    - The burning down of our Clubhouse and Lapa can be seen as a blessing. This gives us the opportunity of starting afresh: - new ideas, fresh thoughts. Historically we have spent our years worrying about money and funds and costs. - For now, we do not have that hanging over our heads and I want to promote fun, and outings, and camping, - and all the good things we associate with being a member of an Outdoor Adventure Club. -

    - -

    - The upswing in outings and events this last year show that we are moving in that direction! -

    - -
    Membership
    - -

    For members to get the full benefit of membership requires participation.

    - -

    Camping. We offer free camping; come and enjoy parking off under the trees and listen to the gurgling of the stream that is flowing so strongly at the moment. Anyone wanting to camp is not restricted to open weekends, Base 4 is open to you any day or days of the month; it just needs a bit of notice to organise the water and opening the gate etc.

    - -

    Driver training. Free to members. We run three different training subjects: basic driver training, rescue and recovery, and bush mechanics courses. We recently ran a very successful Ladies Driver Training and will be offering follow-up days.

    - -

    Open Days and Open Weekends. Committee members try very hard to get interesting guest speakers and events to make those days and weekends fun and exciting. Come and join in. Bring the family and friends for a picnic on the Sunday and relax under the trees or around the pool.

    - -

    Outings. As members you get preferential rates: day trips, weekend trips and extended trips. The Club does not make a vast profit on these outings, just enough to cover costs. Get out there and experience other places, other trails, other like-minded people.

    - -

    - These benefits only start there! Getting or giving advice from knowledgeable people. - Sharing adventures, enjoying new travel companions. - As I said, getting the benefit of your membership requires your participation. -

    - -
    Running the Club
    - -

    - We have 5 Members on the Committee at this AGM, and those 5 are suffering overload because they are shouldering all the work. - We are a voluntary organisation, and the Committee Members are starting to resent the fact that they are expected to carry on - regardless and rewardless. These Committee Members are there for the same reason you are there for, fun, education and excitement. - If no assistance and change of attitude comes to the fore, there will be no Committee next year and the Club will drown! -

    - -

    - Historically Committee Members had portfolios that they managed, Outings, Events, Estate management, Driver training and so on. - The idea was that these portfolios would be managed by those Members but what happened in reality is that the Member ended up having - to do all the work themselves. For example, Noelene found and organised 6 of the speakers at open days last year. - I organised 7 and led 5 of the outings last year, and I ran 5 of the 7 Driver Training courses. As I said, we cannot go on like this! -

    - -

    - Going forward, the Committee (or the Management Team) is mandated to run the Club along acceptable company practices, - including the financial administration, record keeping, advertising and marketing. Further, the Team will assist in coordinating - and organising outings, events etc. but the responsibility for organising and running of these portfolios will now lie with the Membership. -

    - -

    - Amongst yourselves volunteer or delegate Members to lead trips, find speakers, organise events. Organise workdays at Base 4. - Out of the membership of 80 (current paid up) people this load can be shared by having one person doing only one task a year. - Only one! Come on! We need to share the load. -

    - -

    - I will stick to my side of the bargain. I will organise and lead at least 1 extended outing this year, - and I will conduct driver training for the rest of the year. -

    - -

    Please get involved!

    - -

    GERALD O’BRIEN

    -

    I have pleasure in announcing that the Committee after due consideration has decided to bestow Honorary Life Membership on Gerald O’Brien.

    -

    Gerald has been a loyal member of our Club for 43 years (joining in 1981) and has made a significant contribution to driver training and offroad travel, all the while flying the flag for the Four Wheel Drive Club.

    -

    I ask Geoff Joubert to give a brief run down on his life and times.

    -

    Short presentation by Geoff Joubert

    - -

    TREASURER'S REPORT AND FINANCIAL STATEMENT FOR 2024 / 2025

    -

    FWDCSA February 2025 Financials

    -

    -

    -

    - - -

    NOMINATION AND ELECTION OF COMMITTEE FOR 2025

    -

    I sound like a stuck record, but all the committee members are volunteers that put aside any number of hours a month to ensure that the club runs smoothly, that there are interesting speakers, that trips are organised, that the grounds are maintained, and so on. This is more work than the 5 remaining members of the committee can effectively do. We need help!

    - -
    Standing members available for re-election
    -

    -

    -

    - -
    Members resigning from the Committee
    -

    -

    -

    - -
    New members to the Committee
    -

    No one proposed.

    - -

    TRIBUTE TO KARL HOFFMAN

    -

    Karl stood down from the position of Club Secretary which he has held for many years. I hand the microphone over the Geoff Joubert for more on this. - Short presentation by Geoff Joubert -

    - -

    MOTIONS FOR VOTING

    -

    As I said earlier, Members were given the opportunity to submit proposals for due consideration and have those proposals presented at the AGM. I have asked all the proposers to give a short motivation of their ideas and to answer any questions.

    -

    Before they take to the floor, I need to make one point very clear. Whichever proposal or mixture of proposal is adopted, the Membership needs to take on the responsibility to bring it to completion. The Committee will continue to run the Club but will not take on the responsibility of seeing that proposal through.

    -

    Each proposal was presented by the proposer.

    - -
    PROPOSAL 1 – Andrew Maier
    -

    -

    -

    -
    PROPOSAL 2 – John Runciman
    -

    -

    -

    -
    PROPOSAL 3 – John Runciman
    -

    -

    -

    -

    Proposals 2 and 3 presented together. Proposal 3 seen as a basis for future development.

    - -
    PROPOSAL 4 – Alan Exton
    -

    -

    -

    -
    PROPOSAL 5 – Dorota Maskowicz
    -

    -

    -

    -
    PROPOSAL 6 – Clive Murray
    -

    -

    -

    -
    DISCUSSION
    -

    -

    -

    -
    VOTING
    -

    -

    -

    -

    GENERAL

    -

    Nothing raised

    - -

    CLOSING OF MEETING

    + + +

    DATE: 05 April 2025 at 10h00
    + VENUE: Base 4 +

    +

    +

    NOTICE CONVENING THE MEETING
    + + +

    +

    +

    WELCOME, APOLOGIES AND PROXIES
    + +

    +

    +

    ACCEPTANCE OF THE AGENDA WITH ANY ADDITIONAL ITEMS FROM THE FLOOR
    + +

    +

    +

    CONFIRMATION OF THE MINUTES OF THE PREVIOUS AGM OF 25 MARCH 2023
    + +

    +

    CHAIRMAN’S REPORT

    +

    I am honoured to be standing up here today to welcome you all to the 2025 AGM! We have a lot to cover so I won’t drag this out. + It makes me think of my father when he gave a talk at school or at scouts where he went on and on, and we said he did not need a watch, he needed a calendar!

    + +
    FIRE
    +

    + Base 4 Fire +

    The biggest event of last year, or in fact the biggest event in the history of the Club, was the devastating fire that swept through Base 4. It occurred on a very windy day when a veldfire swept through the area burning everything in its path including I believe 6 homesteads. At Base 4 the Clubhouse and all the contents burned to the ground. If you look at the hulk over there you can only imagine the heat and destruction! The lapa down in the camping area suffered the same loss, leaving smouldering thatch which took days to cool.

    +

    The only things left standing were the vehicle service structure and the container, the wooden ablution block down in the camping area, and the brick and mortar ablution block on the Northern side of Base 4. + Whereto from there? We are not an outdoor adventure club for nothing! Everyone got stuck in and assisted in clearing the rubble, reconnecting the water and restoring electricity to the pool. A huge thank you to all those that put their backs to the wheel!

    +

    Luckily, the vehicle service structure was still standing, so with a few adjustments and additions, we held the next open day there, a great success! I believe the turnout exceeded the standard turnout in the old Clubhouse.

    +

    + +
    SPECIAL GENERAL MEETING
    +

    Following the fire we had to negotiate the insurance claim. With good planning all the requirements as stipulated by the insurers were up to date and current, including the thatch upgrade earlier in the year and the recent issue of the Electrical Certificate of Compliance amongst other things ensured that there were no serious issues with the insurance value, and with the help of Geoff Joubert, the valuation of the insurance payout was submitted to the Club in record breaking time.

    +

    This valuation gave us an option: either get the Clubhouse rebuilt to its former glory or take the cash which amounted to about 70% of the rebuild tender (the Indemnity Value). Choosing one or the other was not a decision that could be made by the Committee, hence the calling of a Special General Meeting so that the decision could be made by the Membership.

    +

    There were really 2 decisions that needed to be made at that SGM: keep Base 4 or sell it, and when the decision was made to keep Base 4, whether to get the Clubhouse rebuilt or to take the money. The decision was to take the money and to reinvent the Club more in line with the current membership numbers and needs.

    +

    All Members were then invited to submit proposals for the future of the Club to be considered and voted for at this Annual General Meeting. I will deal with these proposals later as dictated by the Agenda.

    + +
    BASE 4 MAINTENANCE
    +

    Base 4 is a big piece of ground and needs continuous and on-going maintenance. As mentioned earlier, the fire destroyed much of the infrastructure especially water pipes and electrical cabling. Thank you to the generous members that donated time, money and product ensuring that the basic services were in place to allow Base 4 to operate.

    +

    The grass still needs cutting, the tracks maintained for driver training and for members to hone their skills. The ablution blocks require on-going upkeep and cleaning, fences repaired, water pumped and the myriad of jobs that need to be done but no one thinks about.

    + + +
    CLUB SECRETARY
    +

    Karl Hoffman’s name is synonymous with Base 4 and the Four Wheel Drive Club. He has been the go-to person for the Club for many years! This last year Karl stepped down from the position as Club Secretary due to ill-health: more about that later.

    +

    The Committee has appointed Jacqui Boshoff to the position of Secretary, and we welcome her with open arms; I ask you all support her going forward.

    +

    Please make a note regarding the Club contact details: +

    +

    + + +
    THANK YOU’S
    +

    I want to thank all those that have put in time and effort this past year

    + +

    The Committee +

    +

    +

    The Breakfast brigade +

    +

    +

    Event organisation +

    +

    +

    Base 4 maintenance +

    +

    +

    If I have left anyone out, please forgive me!

    +

    +

    OUTINGS
    +

    This has been a bumper year for outings, 11 in total. +

    +

    +

    +

    OPEN DAYS
    + +

    +

    +

    EVENTS
    + +

    +

    +

    DRIVER TRAINING
    +

    Another great perk of Club Membership is free driver training, make use of it!

    + +

    +

    ADDRESS

    +

    + A little later this morning we are going to make some decisions about the future of Base 4. + What I want to talk about is the future of The Four Wheel Club of Southern Africa, Gauteng region. +

    + +

    + The burning down of our Clubhouse and Lapa can be seen as a blessing. This gives us the opportunity of starting afresh: + new ideas, fresh thoughts. Historically we have spent our years worrying about money and funds and costs. + For now, we do not have that hanging over our heads and I want to promote fun, and outings, and camping, + and all the good things we associate with being a member of an Outdoor Adventure Club. +

    + +

    + The upswing in outings and events this last year show that we are moving in that direction! +

    + +
    Membership
    + +

    For members to get the full benefit of membership requires participation.

    + +

    Camping. We offer free camping; come and enjoy parking off under the trees and listen to the gurgling of the stream that is flowing so strongly at the moment. Anyone wanting to camp is not restricted to open weekends, Base 4 is open to you any day or days of the month; it just needs a bit of notice to organise the water and opening the gate etc.

    + +

    Driver training. Free to members. We run three different training subjects: basic driver training, rescue and recovery, and bush mechanics courses. We recently ran a very successful Ladies Driver Training and will be offering follow-up days.

    + +

    Open Days and Open Weekends. Committee members try very hard to get interesting guest speakers and events to make those days and weekends fun and exciting. Come and join in. Bring the family and friends for a picnic on the Sunday and relax under the trees or around the pool.

    + +

    Outings. As members you get preferential rates: day trips, weekend trips and extended trips. The Club does not make a vast profit on these outings, just enough to cover costs. Get out there and experience other places, other trails, other like-minded people.

    + +

    + These benefits only start there! Getting or giving advice from knowledgeable people. + Sharing adventures, enjoying new travel companions. + As I said, getting the benefit of your membership requires your participation. +

    + +
    Running the Club
    + +

    + We have 5 Members on the Committee at this AGM, and those 5 are suffering overload because they are shouldering all the work. + We are a voluntary organisation, and the Committee Members are starting to resent the fact that they are expected to carry on + regardless and rewardless. These Committee Members are there for the same reason you are there for, fun, education and excitement. + If no assistance and change of attitude comes to the fore, there will be no Committee next year and the Club will drown! +

    + +

    + Historically Committee Members had portfolios that they managed, Outings, Events, Estate management, Driver training and so on. + The idea was that these portfolios would be managed by those Members but what happened in reality is that the Member ended up having + to do all the work themselves. For example, Noelene found and organised 6 of the speakers at open days last year. + I organised 7 and led 5 of the outings last year, and I ran 5 of the 7 Driver Training courses. As I said, we cannot go on like this! +

    + +

    + Going forward, the Committee (or the Management Team) is mandated to run the Club along acceptable company practices, + including the financial administration, record keeping, advertising and marketing. Further, the Team will assist in coordinating + and organising outings, events etc. but the responsibility for organising and running of these portfolios will now lie with the Membership. +

    + +

    + Amongst yourselves volunteer or delegate Members to lead trips, find speakers, organise events. Organise workdays at Base 4. + Out of the membership of 80 (current paid up) people this load can be shared by having one person doing only one task a year. + Only one! Come on! We need to share the load. +

    + +

    + I will stick to my side of the bargain. I will organise and lead at least 1 extended outing this year, + and I will conduct driver training for the rest of the year. +

    + +

    Please get involved!

    + +

    GERALD O’BRIEN

    +

    I have pleasure in announcing that the Committee after due consideration has decided to bestow Honorary Life Membership on Gerald O’Brien.

    +

    Gerald has been a loyal member of our Club for 43 years (joining in 1981) and has made a significant contribution to driver training and offroad travel, all the while flying the flag for the Four Wheel Drive Club.

    +

    I ask Geoff Joubert to give a brief run down on his life and times.

    +

    Short presentation by Geoff Joubert

    + +

    TREASURER'S REPORT AND FINANCIAL STATEMENT FOR 2024 / 2025

    +

    FWDCSA February 2025 Financials

    +

    +

    +

    + + +

    NOMINATION AND ELECTION OF COMMITTEE FOR 2025

    +

    I sound like a stuck record, but all the committee members are volunteers that put aside any number of hours a month to ensure that the club runs smoothly, that there are interesting speakers, that trips are organised, that the grounds are maintained, and so on. This is more work than the 5 remaining members of the committee can effectively do. We need help!

    + +
    Standing members available for re-election
    +

    +

    +

    + +
    Members resigning from the Committee
    +

    +

    +

    + +
    New members to the Committee
    +

    No one proposed.

    + +

    TRIBUTE TO KARL HOFFMAN

    +

    Karl stood down from the position of Club Secretary which he has held for many years. I hand the microphone over the Geoff Joubert for more on this. + Short presentation by Geoff Joubert +

    + +

    MOTIONS FOR VOTING

    +

    As I said earlier, Members were given the opportunity to submit proposals for due consideration and have those proposals presented at the AGM. I have asked all the proposers to give a short motivation of their ideas and to answer any questions.

    +

    Before they take to the floor, I need to make one point very clear. Whichever proposal or mixture of proposal is adopted, the Membership needs to take on the responsibility to bring it to completion. The Committee will continue to run the Club but will not take on the responsibility of seeing that proposal through.

    +

    Each proposal was presented by the proposer.

    + +
    PROPOSAL 1 – Andrew Maier
    +

    +

    +

    +
    PROPOSAL 2 – John Runciman
    +

    +

    +

    +
    PROPOSAL 3 – John Runciman
    +

    +

    +

    +

    Proposals 2 and 3 presented together. Proposal 3 seen as a basis for future development.

    + +
    PROPOSAL 4 – Alan Exton
    +

    +

    +

    +
    PROPOSAL 5 – Dorota Maskowicz
    +

    +

    +

    +
    PROPOSAL 6 – Clive Murray
    +

    +

    +

    +
    DISCUSSION
    +

    +

    +

    +
    VOTING
    +

    +

    +

    +

    GENERAL

    +

    Nothing raised

    + +

    CLOSING OF MEETING

    Time: 12h10

    \ No newline at end of file diff --git a/best_of_the_eastern_cape_2024.php b/src/pages/events/best_of_the_eastern_cape_2024.php similarity index 97% rename from best_of_the_eastern_cape_2024.php rename to src/pages/events/best_of_the_eastern_cape_2024.php index 374a7672..4d8bd059 100644 --- a/best_of_the_eastern_cape_2024.php +++ b/src/pages/events/best_of_the_eastern_cape_2024.php @@ -1,434 +1,435 @@ - - - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    -
    -
    - Travel - - -
    -

    Best of the Eastern Cape 2024

    -

    Every year, Noelene and I organise a trip through the Eastern Cape, with the highlight being traversing Baviaanskloof. Each trip has been slightly different to the previous one, with this trip, in my opinion, being the best one!

    -

    - Bushman's River - The idea was to meet up at the village at the mouth of the Bushman’s River, Boesmansriviermond, near Kenton-on-Sea. Mike and Clara arrived a few days early and we enjoyed a ride up the Bushman’s River in our little boat and walks on the beach.

    - The rest of the group—Roy and Naome, Doug and Santie, and Dave and Valery—arrived on the Friday, the day before the official departure. Doug and Dave booked a campsite at Cannon Rocks, 20 or so kilometres from Bushman’s. -

    -

    We arranged a braai for that evening, and I admit that I was shocked to my little toes when I saw that Doug and Dave had brought a caravan and camping trailer along. This is definitely not a caravan or trailer-friendly route and I voiced my hesitation.

    -

    The long and the short was that Doug decided to continue despite my fears, and Dave decided to withdraw from the trip. This was not entirely due to my warnings but also to Valery not feeling up to scratch. We also heard that Roger would not be able to make it because of personal problems at home.

    - -
    - -
    -
    Saturday: Bushman’s to Ocean View
    - -

    - Fish River Lighthouse -

    On Saturday morning, the remaining four vehicles met at Bushman’s River with our first destination set for Bathurst for breakfast. We drove via the "poor man’s game drive" (the old main road from Port Elizabeth to Port Alfred, now incorporated into the Sibuya Game Reserve) and the winding road through the spectacular Cowie River Valley.

    -

    After brunch (the trip took longer than expected due to the bad roads), we wandered along to the Fish River Lighthouse, a place worth a visit. This historic building was erected in the late 19th century with the light first shining on 1 July 1898. The warning light has a strength of 5,000,000 candelas and is 85 metres above the high water mark with a shine range of 32 sea miles. Wish I had that on the front of my Hilux!

    -

    The most unique feature about the light is that it has no bearings for the 2 ton light to spin on, but rather it floats in a bed of mercury, ingenious!

    -

    - -

    - Baviaanskloof -

    From there we drove back past the Bushman’s River, towards Boknes (small village on the sea shore), and onto the scenic gravel road going to Alexandria that services all the dairy farms in the area. We turned off the gravel onto a farm road and came out at a camping site, Ocean View, where we arranged to spend 2 nights in amongst the dense Eastern Cape bush on the edge of the sand dunes. This made for a snug campsite sheltered from the wind.

    -

    Interest. The location of this campsite is on the eastern edge of the area with the largest shifting dunes in the southern hemisphere. Truly spectacular!

    -

    - -
    - Blog Details -
    - -
    -
    - -
    - -
    Sunday: Beach Day
    - -

    The next day was spent exploring the beach—miles and miles of pristine beach where there is not another soul to be seen!

    -
    - -
    - -
    Monday: To Brakkeduine
    - -

    - Sand Dunes -

    Monday morning, bright and early, we set off towards Port Elizabeth where we planned to leave Max, our faithful hound, for the duration of the trip, then on to Humansdorp and finally to a resort called Brakkeduine.

    -

    Doug and Santie, pulling their caravan, suffered a puncture and stopped in the little town of Alexandria to have the tyre repaired and we decided that the remainder would go on in convoy through the thriving metropolis of Port Elizabeth and meet them there.

    -

    Once clear of Port Elizabeth, the three remaining vehicles followed the R102, down the old Van Staden’s pass, across the single lane bridge spanning the Gamtoos river and past Jefferey’s Bay. At Humansdorp we hit the gravel roads eventually reaching Brakkeduine in the late afternoon.

    -

    Doug and Santie were already there with Doug trying his hand at fishing in the dam. The campsites are to die for! Set along manicured grassy terraced ledges overlooking the dam, each site separated by neatly trimmed hedges.

    -
    -

    -
    - -
    - -
    Tuesday: Dune Adventure
    - -

    - Sand Dunes -

    The following morning we met Johan, our guide for the day. After airing down (0.6 bar!), we set off in convoy to attack the dunes. Before we reached the first dune, Doug pulled a tyre off the rim. We all got stuck in to repair the wheel and were on the road again fifteen minutes later. The airjack proved its usefulness!

    -

    We played in the sand for the next few hours, then Roy managed to pull one of his tyres off the rim—on a steep incline and in the boiling heat of the midday sun. This time the airjack did not do so well! We were eventually forced to use Mike’s trusty hi-lift jack. Eventually, we changed wheels and headed for camp, then back to Humansdorp to get the wheel repaired.

    -

    In the mean time, Doug had also picked up a problem with his Prado, and he and Santie decided to head to the Toyota garage in Joubertina further along the R62 with the plan that we would all meet up again in Kareedouw.

    -

    From there, we headed off north into the mountains. The road was not bad, just rocky and plenty of loose stones: I was concerned about the tyres on Doug’s Prado and caravan but I need not have worried and we arrived at our camp as the sun was setting.

    -

    Baviaans Lodge is situated in the Kouga Mountains at the start of the Rus en Vrede trail across the mountains to the Baviaanskloof. The campsite is cosy, set among the trees on the bank of a small stream. There is a hot water shower and toilets, all well maintained and clean.

    -

    We enjoyed an evening around the campfire and I must be honest and say that I went to bed concerned about Doug pulling his caravan over the mountains to Baviaanskloof.

    -

    - - - -
    -
    - -
    - -
    Wednesday: Rus en Vrede Trail
    - -

    The following morning, I cannot emphasise how important it is to be ready and waiting at the designated time. The day was going to be slow going and I was factoring in time for recovery and vehicle maintenance on the mountain. As it happened, there were no delays of problems whatsoever, just slow going over the rough track. In fact, the only casualty was the awning from Mike’s Cruiser which was shaken free and rescued by Roy.

    - -

    - Baviaanskloof -

    The Rus en Vrede trail was originally cut across the mountains by the woodcutters back in eighteen something. Now it crosses over three farms, and is a combination of gravel, loose rocks, mountain rocks and eroded farm tracks. There are also 13 gates that had to be opened and closed, thank you Noelene and Naome!

    -

    The views cover seven different mountain ranges giving one a panoramic view of the area. We were lucky with the weather, clear skies, no wind, and relatively cool conditions. The proteas were out in full bloom and the famous centuries-old cycads stand guard over the peaks and valleys

    -

    -

    - Sand Dunes -

    The trail ends at the Rus en Vrede farm where you pay the farmer per vehicle and per person(details below). Now, onto the main road through the Kloof and a little further we signed in at the entrance to the Baviaanskloof Nature Reserve.

    -

    The road twists and turns through the Park with many water crossings, deep ravines and high rugged mountains crossing Holgat’s Pass, Kombrink’s Pass, and the Grootrivier Pass. The roads have not been maintained and the going was slow but the scenery was spectacular. The concrete strip road over the mountain is especially rough with the concrete slabs broken and displaced. This was no problem for our vehicles, in fact this was our preferred route given that we were all driving seriously capable off-road vehicles.

    -

    - -

    Our destination was Kudu Kaya, a working citrus farm where we have stayed before, our chosen campsite up on a hill overlooking the farm. Doug had to do a few running repairs on the caravan and Santie worked a good hour cleaning the debris caused to the food supplies being shaken loose by the rough roads: custard and gunk everywhere!

    -

    Again, a great evening around the campfire!

    - - -
    -
    - -
    -
    Thursday: Into the Kloof
    - -

    Thursday morning saw us on the road to Steytlerville via Antonie’s Pass, a rugged rock and gravel road with many washaways which takes you down to Antoniesberg and the crossing of the Groot River. Again very slow and careful going.

    -

    We stopped at the Royal Hotel in Steytlerville for lunch before pushing on to Kaboega, a private farm in the mountains north of Addo Elephant Park, and sharing a boundary with the Park on the southern border. Here we set up camp at the big dam where we have stayed before. We were met and made welcome by the farm manager, Ian Ritchie and his wife Sandy.

    - -
    - Blog Details -
    -
    - -
    -
    Friday: To Kaboega
    -

    Friday morning Ian and Sandy arrived in camp in time for coffee and while we sipped, Sandy gave us an insight into the Bushman’s paintings in the area and a general history of rock paintings in Southern Africa: very interesting stuff! We had arranged for Ian to lead us around the farm, about 6 000 hectares, where he has an intimate knowledge of the plants, the animals, and the terrain. There are seven biodiversity’s present here and these diversities have been allowed to flourish with no human intervention for the past 30 to 40 years. We stopped every few kilometres for Ian to show us something, or to tell us a story, or to point out something interesting.

    -

    - Sand Dunes -

    Apart from a locked gate to the neighbours where we had to cut the chain, there were no hitches as we climbed the mountain, crossing stream after stream, over rocks and through the bushes to the summit of the mountain. Here, we had originally intended to walk to some bushman’s paintings in the rocks, but the sun was westering and the decision was made to move on and rather have Ian take us to a swimming hole deep in the mountains before heading for home.

    -

    All in all it was a great and informative day and left us all wanting for more. Thank you Ian!

    -

    -
    -
    - -
    -
    Saturday & Sunday: Mountain Zebra Park
    -

    Saturday, on the road again. I planned on taking the secondary gravel roads as far as possible en route to the Mountain Zebra Park via Somerset East and Cradock. We had a delicious breakfast in Somerset East, then followed the road through a giant conservancy before traversing the Swarthoek and Maraiskloof Passes eventually reaching Cradock where we all filled up with fuel.

    -

    West out of Cradock, it was a short hop to the Mountain Zebra Park where we booked in, found a campsite, and set up for the night. Originally we planned to spend one night here, allowing anyone that needed to return to Johannesburg for work on Monday morning to travel on the Sunday. Fortunately all decided to stay an extra night, allowing for extensive game drives on the Sunday.

    -

    - Baviaanskloof -

    The Reserve has a wide diversity of plains animals that were seen aplenty on the plateau areas, especially the rare and once nearly extinct mountain zebra, with other animals to be seen in the deep valley and gorges in the area. There are three 4X4 routes, none too challenging, but fun to drive.

    -

    We arranged a night drive for the Sunday evening. The weather was turning, cold winds and overcast, so we prepared ourselves with Old Brown Sherry and blankets. This was the middle (almost!) of summer, for goodness sake! The drive was great, buffalo, eland, kudu, you name it. Of great interest were the springhares bouncing along on their hind legs, and 6 porcupines. Sadly we saw no cats or aardwolves.

    -

    The drive that was to finish at 21h00 eventually got back to camp at 23h00: thank you to very knowledgeable and generous driver! By now we were frozen solid, back to our campsite for a whiskey and bed. In the morning the temperature gauge on my bakkie read 6 degrees!

    -
    - -
    -
    Monday: The End
    -

    Monday morning we packed up and went our separate ways. As I always say, sad to leave but happy to be on our way home.

    -

    Thank you all that enjoyed the trip with us for all your help, support, friendship and generosity. I am sad that Dave and Verinica, and Roger missed out on a great adventure. Next time!

    -
    -
    - -
    - -
    Trip Information
    -

    All the campsites have the basics of hot water, showers, ablutions etc.

    -
      - -
    • Cannon Rocks Caravan Park -
        -
      • Phone: 064 654 0043
      • -
      • 75 wind protected sites
      • -
      • Power to each site
      • -
      • Basic supply store
      • -
      • Rates: R370 (low season) to R620 (high season) for 2 people caravan or tent
      • -
      • Also offer pensioner rates and long-stay rates on request
      • -
      -
    • -
    • Oceanview Camping -
        -
      • Contact: David & Lynne Cordner
      • -
      • WhatsApp only: 082 573 3660
      • -
      • Power to some campsites
      • -
      • Rates on enquiry
      • -
      -
    • -
    • Brakkeduine camping and adventure park -
        -
      • Contact: Bennie & Tania van Niekerk
      • -
      • Phone: 083 657 0601
      • -
      • Email: bellakarmabt@gmail.com
      • -
      • Rates: R100 per person per night, Children R75 PPPN
      • -
      • Power to each campsite
      • -
      • Guided trips: R300 per vehicle (min 5 vehicles)
      • -
      -
    • -
    • Baviaans Lodge - -
    • -
    • Rus en Vrede 4X4 Trail - -
    • -
    • Kudu Kaya -
        -
      • Contact: Heloise & Unola
      • -
      • Phone: 087 700 8195
      • -
      • Email: info@kudukaya.co.za
      • -
      • Rates: Campsite per night R250 (2 people) plus additional adults R70 PPPN
      • -
      -
    • -
    • Kaboega - -
    • -
    • Mountain Zebra National Park - -
    • -
    - - -
    -
    - -
    - -
    -
    -
    Tags
    -
    - Travel - Hotel - Tour -
    -
    - -
    - - - - - -
    -
    -
    - - - - - - - - - - - -
    -
    -
    -
    -
    - - - - \ No newline at end of file + + + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    +
    +
    + Travel + + +
    +

    Best of the Eastern Cape 2024

    +

    Every year, Noelene and I organise a trip through the Eastern Cape, with the highlight being traversing Baviaanskloof. Each trip has been slightly different to the previous one, with this trip, in my opinion, being the best one!

    +

    + Bushman's River + The idea was to meet up at the village at the mouth of the Bushman’s River, Boesmansriviermond, near Kenton-on-Sea. Mike and Clara arrived a few days early and we enjoyed a ride up the Bushman’s River in our little boat and walks on the beach.

    + The rest of the group—Roy and Naome, Doug and Santie, and Dave and Valery—arrived on the Friday, the day before the official departure. Doug and Dave booked a campsite at Cannon Rocks, 20 or so kilometres from Bushman’s. +

    +

    We arranged a braai for that evening, and I admit that I was shocked to my little toes when I saw that Doug and Dave had brought a caravan and camping trailer along. This is definitely not a caravan or trailer-friendly route and I voiced my hesitation.

    +

    The long and the short was that Doug decided to continue despite my fears, and Dave decided to withdraw from the trip. This was not entirely due to my warnings but also to Valery not feeling up to scratch. We also heard that Roger would not be able to make it because of personal problems at home.

    + +
    + +
    +
    Saturday: Bushman’s to Ocean View
    + +

    + Fish River Lighthouse +

    On Saturday morning, the remaining four vehicles met at Bushman’s River with our first destination set for Bathurst for breakfast. We drove via the "poor man’s game drive" (the old main road from Port Elizabeth to Port Alfred, now incorporated into the Sibuya Game Reserve) and the winding road through the spectacular Cowie River Valley.

    +

    After brunch (the trip took longer than expected due to the bad roads), we wandered along to the Fish River Lighthouse, a place worth a visit. This historic building was erected in the late 19th century with the light first shining on 1 July 1898. The warning light has a strength of 5,000,000 candelas and is 85 metres above the high water mark with a shine range of 32 sea miles. Wish I had that on the front of my Hilux!

    +

    The most unique feature about the light is that it has no bearings for the 2 ton light to spin on, but rather it floats in a bed of mercury, ingenious!

    +

    + +

    + Baviaanskloof +

    From there we drove back past the Bushman’s River, towards Boknes (small village on the sea shore), and onto the scenic gravel road going to Alexandria that services all the dairy farms in the area. We turned off the gravel onto a farm road and came out at a camping site, Ocean View, where we arranged to spend 2 nights in amongst the dense Eastern Cape bush on the edge of the sand dunes. This made for a snug campsite sheltered from the wind.

    +

    Interest. The location of this campsite is on the eastern edge of the area with the largest shifting dunes in the southern hemisphere. Truly spectacular!

    +

    + +
    + Blog Details +
    + +
    +
    + +
    + +
    Sunday: Beach Day
    + +

    The next day was spent exploring the beach—miles and miles of pristine beach where there is not another soul to be seen!

    +
    + +
    + +
    Monday: To Brakkeduine
    + +

    + Sand Dunes +

    Monday morning, bright and early, we set off towards Port Elizabeth where we planned to leave Max, our faithful hound, for the duration of the trip, then on to Humansdorp and finally to a resort called Brakkeduine.

    +

    Doug and Santie, pulling their caravan, suffered a puncture and stopped in the little town of Alexandria to have the tyre repaired and we decided that the remainder would go on in convoy through the thriving metropolis of Port Elizabeth and meet them there.

    +

    Once clear of Port Elizabeth, the three remaining vehicles followed the R102, down the old Van Staden’s pass, across the single lane bridge spanning the Gamtoos river and past Jefferey’s Bay. At Humansdorp we hit the gravel roads eventually reaching Brakkeduine in the late afternoon.

    +

    Doug and Santie were already there with Doug trying his hand at fishing in the dam. The campsites are to die for! Set along manicured grassy terraced ledges overlooking the dam, each site separated by neatly trimmed hedges.

    +
    +

    +
    + +
    + +
    Tuesday: Dune Adventure
    + +

    + Sand Dunes +

    The following morning we met Johan, our guide for the day. After airing down (0.6 bar!), we set off in convoy to attack the dunes. Before we reached the first dune, Doug pulled a tyre off the rim. We all got stuck in to repair the wheel and were on the road again fifteen minutes later. The airjack proved its usefulness!

    +

    We played in the sand for the next few hours, then Roy managed to pull one of his tyres off the rim—on a steep incline and in the boiling heat of the midday sun. This time the airjack did not do so well! We were eventually forced to use Mike’s trusty hi-lift jack. Eventually, we changed wheels and headed for camp, then back to Humansdorp to get the wheel repaired.

    +

    In the mean time, Doug had also picked up a problem with his Prado, and he and Santie decided to head to the Toyota garage in Joubertina further along the R62 with the plan that we would all meet up again in Kareedouw.

    +

    From there, we headed off north into the mountains. The road was not bad, just rocky and plenty of loose stones: I was concerned about the tyres on Doug’s Prado and caravan but I need not have worried and we arrived at our camp as the sun was setting.

    +

    Baviaans Lodge is situated in the Kouga Mountains at the start of the Rus en Vrede trail across the mountains to the Baviaanskloof. The campsite is cosy, set among the trees on the bank of a small stream. There is a hot water shower and toilets, all well maintained and clean.

    +

    We enjoyed an evening around the campfire and I must be honest and say that I went to bed concerned about Doug pulling his caravan over the mountains to Baviaanskloof.

    +

    + + + +
    +
    + +
    + +
    Wednesday: Rus en Vrede Trail
    + +

    The following morning, I cannot emphasise how important it is to be ready and waiting at the designated time. The day was going to be slow going and I was factoring in time for recovery and vehicle maintenance on the mountain. As it happened, there were no delays of problems whatsoever, just slow going over the rough track. In fact, the only casualty was the awning from Mike’s Cruiser which was shaken free and rescued by Roy.

    + +

    + Baviaanskloof +

    The Rus en Vrede trail was originally cut across the mountains by the woodcutters back in eighteen something. Now it crosses over three farms, and is a combination of gravel, loose rocks, mountain rocks and eroded farm tracks. There are also 13 gates that had to be opened and closed, thank you Noelene and Naome!

    +

    The views cover seven different mountain ranges giving one a panoramic view of the area. We were lucky with the weather, clear skies, no wind, and relatively cool conditions. The proteas were out in full bloom and the famous centuries-old cycads stand guard over the peaks and valleys

    +

    +

    + Sand Dunes +

    The trail ends at the Rus en Vrede farm where you pay the farmer per vehicle and per person(details below). Now, onto the main road through the Kloof and a little further we signed in at the entrance to the Baviaanskloof Nature Reserve.

    +

    The road twists and turns through the Park with many water crossings, deep ravines and high rugged mountains crossing Holgat’s Pass, Kombrink’s Pass, and the Grootrivier Pass. The roads have not been maintained and the going was slow but the scenery was spectacular. The concrete strip road over the mountain is especially rough with the concrete slabs broken and displaced. This was no problem for our vehicles, in fact this was our preferred route given that we were all driving seriously capable off-road vehicles.

    +

    + +

    Our destination was Kudu Kaya, a working citrus farm where we have stayed before, our chosen campsite up on a hill overlooking the farm. Doug had to do a few running repairs on the caravan and Santie worked a good hour cleaning the debris caused to the food supplies being shaken loose by the rough roads: custard and gunk everywhere!

    +

    Again, a great evening around the campfire!

    + + +
    +
    + +
    +
    Thursday: Into the Kloof
    + +

    Thursday morning saw us on the road to Steytlerville via Antonie’s Pass, a rugged rock and gravel road with many washaways which takes you down to Antoniesberg and the crossing of the Groot River. Again very slow and careful going.

    +

    We stopped at the Royal Hotel in Steytlerville for lunch before pushing on to Kaboega, a private farm in the mountains north of Addo Elephant Park, and sharing a boundary with the Park on the southern border. Here we set up camp at the big dam where we have stayed before. We were met and made welcome by the farm manager, Ian Ritchie and his wife Sandy.

    + +
    + Blog Details +
    +
    + +
    +
    Friday: To Kaboega
    +

    Friday morning Ian and Sandy arrived in camp in time for coffee and while we sipped, Sandy gave us an insight into the Bushman’s paintings in the area and a general history of rock paintings in Southern Africa: very interesting stuff! We had arranged for Ian to lead us around the farm, about 6 000 hectares, where he has an intimate knowledge of the plants, the animals, and the terrain. There are seven biodiversity’s present here and these diversities have been allowed to flourish with no human intervention for the past 30 to 40 years. We stopped every few kilometres for Ian to show us something, or to tell us a story, or to point out something interesting.

    +

    + Sand Dunes +

    Apart from a locked gate to the neighbours where we had to cut the chain, there were no hitches as we climbed the mountain, crossing stream after stream, over rocks and through the bushes to the summit of the mountain. Here, we had originally intended to walk to some bushman’s paintings in the rocks, but the sun was westering and the decision was made to move on and rather have Ian take us to a swimming hole deep in the mountains before heading for home.

    +

    All in all it was a great and informative day and left us all wanting for more. Thank you Ian!

    +

    +
    +
    + +
    +
    Saturday & Sunday: Mountain Zebra Park
    +

    Saturday, on the road again. I planned on taking the secondary gravel roads as far as possible en route to the Mountain Zebra Park via Somerset East and Cradock. We had a delicious breakfast in Somerset East, then followed the road through a giant conservancy before traversing the Swarthoek and Maraiskloof Passes eventually reaching Cradock where we all filled up with fuel.

    +

    West out of Cradock, it was a short hop to the Mountain Zebra Park where we booked in, found a campsite, and set up for the night. Originally we planned to spend one night here, allowing anyone that needed to return to Johannesburg for work on Monday morning to travel on the Sunday. Fortunately all decided to stay an extra night, allowing for extensive game drives on the Sunday.

    +

    + Baviaanskloof +

    The Reserve has a wide diversity of plains animals that were seen aplenty on the plateau areas, especially the rare and once nearly extinct mountain zebra, with other animals to be seen in the deep valley and gorges in the area. There are three 4X4 routes, none too challenging, but fun to drive.

    +

    We arranged a night drive for the Sunday evening. The weather was turning, cold winds and overcast, so we prepared ourselves with Old Brown Sherry and blankets. This was the middle (almost!) of summer, for goodness sake! The drive was great, buffalo, eland, kudu, you name it. Of great interest were the springhares bouncing along on their hind legs, and 6 porcupines. Sadly we saw no cats or aardwolves.

    +

    The drive that was to finish at 21h00 eventually got back to camp at 23h00: thank you to very knowledgeable and generous driver! By now we were frozen solid, back to our campsite for a whiskey and bed. In the morning the temperature gauge on my bakkie read 6 degrees!

    +
    + +
    +
    Monday: The End
    +

    Monday morning we packed up and went our separate ways. As I always say, sad to leave but happy to be on our way home.

    +

    Thank you all that enjoyed the trip with us for all your help, support, friendship and generosity. I am sad that Dave and Verinica, and Roger missed out on a great adventure. Next time!

    +
    +
    + +
    + +
    Trip Information
    +

    All the campsites have the basics of hot water, showers, ablutions etc.

    +
      + +
    • Cannon Rocks Caravan Park +
        +
      • Phone: 064 654 0043
      • +
      • 75 wind protected sites
      • +
      • Power to each site
      • +
      • Basic supply store
      • +
      • Rates: R370 (low season) to R620 (high season) for 2 people caravan or tent
      • +
      • Also offer pensioner rates and long-stay rates on request
      • +
      +
    • +
    • Oceanview Camping +
        +
      • Contact: David & Lynne Cordner
      • +
      • WhatsApp only: 082 573 3660
      • +
      • Power to some campsites
      • +
      • Rates on enquiry
      • +
      +
    • +
    • Brakkeduine camping and adventure park +
        +
      • Contact: Bennie & Tania van Niekerk
      • +
      • Phone: 083 657 0601
      • +
      • Email: bellakarmabt@gmail.com
      • +
      • Rates: R100 per person per night, Children R75 PPPN
      • +
      • Power to each campsite
      • +
      • Guided trips: R300 per vehicle (min 5 vehicles)
      • +
      +
    • +
    • Baviaans Lodge + +
    • +
    • Rus en Vrede 4X4 Trail + +
    • +
    • Kudu Kaya +
        +
      • Contact: Heloise & Unola
      • +
      • Phone: 087 700 8195
      • +
      • Email: info@kudukaya.co.za
      • +
      • Rates: Campsite per night R250 (2 people) plus additional adults R70 PPPN
      • +
      +
    • +
    • Kaboega + +
    • +
    • Mountain Zebra National Park + +
    • +
    + + +
    +
    + +
    + +
    +
    +
    Tags
    +
    + Travel + Hotel + Tour +
    +
    + +
    + + + + + +
    +
    +
    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + diff --git a/blog.php b/src/pages/events/blog.php similarity index 95% rename from blog.php rename to src/pages/events/blog.php index ef5bfe76..854af81b 100644 --- a/blog.php +++ b/src/pages/events/blog.php @@ -1,226 +1,228 @@ - - - 'index.php']]; - require_once('components/banner.php'); -?> - - - -
    -
    -
    -
    - prepare("SELECT blog_id, title, date, category, image, description, author, members_only, link FROM blogs WHERE status = ? ORDER BY date DESC"); - $stmt->bind_param("s", $status); - $stmt->execute(); - $result = $stmt->get_result(); - - if ($result->num_rows > 0) { - // Loop through each row - while ($row = $result->fetch_assoc()) { - $blog_id = $row['blog_id']; - $title = $row['title']; - $date = $row['date']; - $category = $row['category']; - $image = $row['image']; - $description = $row['description']; - $author = $row['author']; - $blog_author = $row['author']; - $members_only = $row['members_only']; - if ($members_only) { - if (!isset($_SESSION['user_id'])) { - $blog_link = "login.php"; - $button_hover = "Members Only"; - $icon = "fa-lock"; - } else { - if (getUserMemberStatus($_SESSION['user_id'])) { - $blog_link = $row['link']; - $button_hover = "Read More"; - $icon = "fa-arrow-right"; - } else { - $blog_link = "#"; - $button_hover = "Members Only"; - $icon = "fa-lock"; - } - } - } else { - $blog_link = $row['link']; - $button_hover = "Read More"; - $icon = "fa-arrow-right"; - } - - // Output the HTML structure with dynamic data - echo ' -
    -
    - Blog List -
    -
    - ' . $category . ' -
    ' . $title . '
    - -

    ' . $description . '

    - - Read More - - -
    -
    - - '; - } - } ?> - - - -
    -
    -
    - - - - - - - - - -
    -
    - Explore The World -

    Become a Member

    - - Join Now - - -
    -
    - CTA -
    -
    Shape
    -
    - -
    - -
    -
    -
    -
    - - - - \ No newline at end of file + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + + +
    +
    +
    +
    + prepare("SELECT blog_id, title, date, category, image, description, author, members_only, link FROM blogs WHERE status = ? ORDER BY date DESC"); + $stmt->bind_param("s", $status); + $stmt->execute(); + $result = $stmt->get_result(); + + if ($result->num_rows > 0) { + // Loop through each row + while ($row = $result->fetch_assoc()) { + $blog_id = $row['blog_id']; + $title = $row['title']; + $date = $row['date']; + $category = $row['category']; + $image = $row['image']; + $description = $row['description']; + $author = $row['author']; + $blog_author = $row['author']; + $members_only = $row['members_only']; + if ($members_only) { + if (!isset($_SESSION['user_id'])) { + $blog_link = "login.php"; + $button_hover = "Members Only"; + $icon = "fa-lock"; + } else { + if (getUserMemberStatus($_SESSION['user_id'])) { + $blog_link = $row['link']; + $button_hover = "Read More"; + $icon = "fa-arrow-right"; + } else { + $blog_link = "#"; + $button_hover = "Members Only"; + $icon = "fa-lock"; + } + } + } else { + $blog_link = $row['link']; + $button_hover = "Read More"; + $icon = "fa-arrow-right"; + } + + // Output the HTML structure with dynamic data + echo ' +
    +
    + Blog List +
    +
    + ' . $category . ' +
    ' . $title . '
    + +

    ' . $description . '

    + + Read More + + +
    +
    + + '; + } + } ?> + + + +
    +
    +
    + + + + + + + + + +
    +
    + Explore The World +

    Become a Member

    + + Join Now + + +
    +
    + CTA +
    +
    Shape
    +
    + +
    + +
    +
    +
    +
    + + + + diff --git a/blog_details.php b/src/pages/events/blog_details.php similarity index 97% rename from blog_details.php rename to src/pages/events/blog_details.php index 488de786..f829c07d 100644 --- a/blog_details.php +++ b/src/pages/events/blog_details.php @@ -1,531 +1,533 @@ - - - - - - - - 'index.php'], ['Blogs' => 'blog.php']]; - require_once('components/banner.php'); -?> - - - -
    -
    -
    -
    -
    - Travel - - -

    Every year, Noelene and I organise a trip through the Eastern Cape, with the highlight being traversing Baviaanskloof. Each trip has been slightly different to the previous one, with this trip, in my opinion, being the best one!

    - -

    The idea was to meet up at the village at the mouth of the Bushman’s River, Boesmansriviermond, near Kenton-on-Sea. Mike and Clara arrived a few days early and we enjoyed a ride up the Bushman’s River in our little boat and walks on the beach.

    - -

    The rest of the group—Roy and Naome, Doug and Santie, and Dave and Valery—arrived on the Friday, the day before the official departure. Doug and Dave booked a campsite at Cannon Rocks, 20 or so kilometres from Bushman’s. We arranged a braai for that evening, and I admit that I was shocked to my little toes when I saw that Doug and Dave had brought a caravan and camping trailer along. This is definitely not a caravan or trailer-friendly route and I voiced my hesitation.

    - -

    The long and the short was that Doug decided to continue despite my fears, and Dave decided to withdraw from the trip. This was not entirely due to my warnings but also to Valery not feeling up to scratch. We also heard that Roger would not be able to make it because of personal problems at home.

    - -
    Saturday: Bushman’s to Ocean View
    - -

    On Saturday morning, the remaining four vehicles met at Bushman’s River with our first destination set for Bathurst for breakfast. We drove via the "poor man’s game drive" (the old main road from Port Elizabeth to Port Alfred, now incorporated into the Sibuya Game Reserve) and the winding road through the spectacular Cowie River Valley.

    - -

    After brunch (the trip took longer than expected due to the bad roads), we wandered along to the Fish River Lighthouse, a place worth a visit. This historic building was erected in the late 19th century with the light first shining on 1 July 1898. The warning light has a strength of 5,000,000 candelas and is 85 metres above the high water mark with a shine range of 32 sea miles. Wish I had that on the front of my Hilux!

    - -

    The most unique feature about the light is that it has no bearings for the 2-ton light to spin on, but rather it floats in a bed of mercury—ingenious!

    - -

    From there, we drove back past the Bushman’s River, towards Boknes, and onto the scenic gravel road going to Alexandria that services all the dairy farms in the area. We turned off the gravel onto a farm road and came out at a camping site, Ocean View, where we arranged to spend 2 nights amongst the dense Eastern Cape bush on the edge of the sand dunes. This made for a snug campsite sheltered from the wind.

    - -

    Interest: The location of this campsite is on the eastern edge of the area with the largest shifting dunes in the southern hemisphere—truly spectacular!

    - -
    Sunday: Beach Day
    - -

    The next day was spent exploring the beach—miles and miles of pristine beach where there is not another soul to be seen!

    - -
    Monday: To Brakkeduine
    - -

    Monday morning, bright and early, we set off towards Port Elizabeth where we planned to leave Max, our faithful hound, for the duration of the trip, then on to Humansdorp and finally to a resort called Brakkeduine. Doug and Santie, pulling their caravan, suffered a puncture and stopped in the little town of Alexandria to have the tyre repaired. We decided that the remainder would go on in convoy through Port Elizabeth and meet them there.

    - -

    Once clear of Port Elizabeth, the three remaining vehicles followed the R102, down the old Van Staden’s Pass, across the single lane bridge spanning the Gamtoos River, and past Jefferey’s Bay. At Humansdorp, we hit the gravel roads and eventually reached Brakkeduine in the late afternoon. Doug and Santie were already there, with Doug trying his hand at fishing in the dam. The campsites are to die for—set along manicured grassy terraced ledges overlooking the dam, each site separated by neatly trimmed hedges.

    - -
    Tuesday: Dune Adventure
    - -

    The following morning we met Johan, our guide for the day. After airing down (0.6 bar!), we set off in convoy to attack the dunes. Before we reached the first dune, Doug pulled a tyre off the rim. We all got stuck in to repair the wheel and were on the road again fifteen minutes later. The airjack proved its usefulness!

    - -

    We played in the sand for the next few hours, then Roy managed to pull one of his tyres off the rim—on a steep incline and in the boiling heat of the midday sun. This time the airjack did not do so well! We were eventually forced to use Mike’s trusty hi-lift jack. Eventually, we changed wheels and headed for camp, then back to Humansdorp to get the wheel repaired.

    - -

    Doug had also picked up a problem with his Prado, and he and Santie decided to head to the Toyota garage in Joubertina, further along the R62, with the plan that we would all meet up again in Kareedouw.

    - -
    Wednesday: Rus en Vrede Trail
    - -

    From Kareedouw, we headed off north into the mountains. The road was rocky and full of loose stones. I was concerned about the tyres on Doug’s Prado and caravan, but we arrived at our camp as the sun was setting. Baviaans Lodge is situated in the Kouga Mountains at the start of the Rus en Vrede trail across the mountains to the Baviaanskloof. The campsite is cosy, set among the trees on the bank of a small stream. There is a hot water shower and toilets, all well maintained and clean.

    - -

    We enjoyed an evening around the campfire, though I went to bed concerned about Doug pulling his caravan over the mountains.

    - -

    On Wednesday morning, everyone was packed and ready to go by 08:00. The day was slow going but with no delays or problems. The only casualty was the awning from Mike’s Cruiser, which was shaken free and rescued by Roy.

    - -

    The Rus en Vrede trail, originally cut by woodcutters in the 1800s, now crosses three farms. It consists of gravel, loose rocks, eroded farm tracks, and mountain terrain. There are 13 gates that had to be opened and closed—thank you Noelene and Naome!

    - -

    The views are breathtaking, covering seven different mountain ranges. We were lucky with the weather—clear skies, no wind, and cool temperatures. The proteas were in bloom and the centuries-old cycads stood tall over the peaks.

    - -
    Thursday: Into the Kloof
    - -

    The trail ends at Rus en Vrede farm, where you pay the farmer per vehicle and person. We entered the Baviaanskloof Nature Reserve, crossing Holgat’s Pass, Kombrink’s Pass, and the Grootrivier Pass. The roads were rough and slow-going but scenic.

    - -

    Our destination was Kudu Kaya, a working citrus farm. We camped on a hill overlooking the farm. Doug did some repairs to the caravan and Santie spent time cleaning up food shaken loose—custard and gunk everywhere!

    - -
    Friday: To Kaboega
    - -

    Thursday morning, we drove to Steytlerville via Antonie’s Pass—a rugged rock and gravel road. After lunch at the Royal Hotel in Steytlerville, we continued to Kaboega, a private farm near Addo Elephant Park. We camped at a big dam and were warmly welcomed by Ian Ritchie and his wife Sandy.

    - -

    Friday morning, Ian and Sandy joined us for coffee. Sandy shared insights into Bushman’s paintings and local history. Ian then led us around the 6,000-hectare farm, sharing his deep knowledge of biodiversity, plants, and terrain. Apart from a locked gate we had to cut open, the day was smooth. We ended with a swim in a mountain pool instead of visiting more rock art sites due to the time.

    - -
    Saturday: Mountain Zebra Park
    - -

    On Saturday, we took scenic gravel roads to the Mountain Zebra Park via Somerset East and Cradock. After breakfast in Somerset East, we passed through Swarthoek and Maraiskloof Passes to Cradock for fuel, then entered the Park and set up camp.

    - -

    Though we originally planned to stay one night, everyone decided to stay an extra day for game drives. The reserve is home to a wide range of plains animals, especially the rare mountain zebra, and other wildlife found in the gorges and valleys.

    -
    - Blog Details -
    -
    Services Offered by a Tour and Travel Agency
    -

    Agency plays a pivotal role in crafting memorable experiences for travelers by offering wide range services tailored to individual preferences. Whether it's a family vacation, an adventure trip, or luxury getaway well-established travel agency can handle everything from flight bookings and accommodation to guided tours .

    -
      -
    • Assisting customers in booking domestic and international flights.
    • -
    • Organizing adventure activities such as trekking, diving, safaris, or extreme sports.
    • -
    • Tailoring travel plans to meet the specific needs and preferences of the customer.
    • -
    • Providing professional guides for city tours, cultural experiences, adventure activities, etc.
    • -
    • Arranging local transportation such as car rentals, airport transfers, or bus tours.
    • -
    • Helping customers navigate the visa application process for international travel.
    • -
    -
    -
    -
    - Blog -
    -
    -
    -
    - Blog -
    -
    -
    -
    How to Start a Tour and Travel Agency
    -

    Agency plays a pivotal role in crafting memorable experiences for travelers by offering wide range services tailored to individual preferences. Whether it's a family vacation, an adventure trip, or luxury getaway well-established travel agency can handle everything from flight bookings and accommodation to guided tours .

    -
    - -
    "In the world of tours and travel, every journey is an invitation to explore the unknown, connect with cultures, and create memories that last lifetime It's not just about the destination,extraordinary adventures." -
    - -
    -
      -
    • Understand the demand in your area, competition, and potential customers.
    • -
    • Register your business, obtain necessary licenses, and ensure compliance with local regulations.
    • -
    • Build relationships with hotels, airlines, transport companies, and other service providers.
    • -
    -
    - -
    - -
    -
    -
    Tags
    -
    - Travel - Hotel - Tour -
    -
    -
    -
    Share
    - -
    -
    - -
    -
    -
    - Author -
    -
    -

    Richard M. Fudge

    -

    The world is a book, and those who do not travel read only one page. Every journey we undertake is a chapter filled with lessons, experiences, and stories.

    - -
    -
    -
    - -
    -
    -
    - News -
    - -
    -
    -
    - News -
    - -
    -
    - -
    -
    Leave A Comments
    -

    Your email address will not be published. Required fields are marked *

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
      -
    • - - -
    • -
    - -
    -
    -
    -
    - -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + 'index.php'], ['Blogs' => 'blog.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + + +
    +
    +
    +
    +
    + Travel + + +

    Every year, Noelene and I organise a trip through the Eastern Cape, with the highlight being traversing Baviaanskloof. Each trip has been slightly different to the previous one, with this trip, in my opinion, being the best one!

    + +

    The idea was to meet up at the village at the mouth of the Bushman’s River, Boesmansriviermond, near Kenton-on-Sea. Mike and Clara arrived a few days early and we enjoyed a ride up the Bushman’s River in our little boat and walks on the beach.

    + +

    The rest of the group—Roy and Naome, Doug and Santie, and Dave and Valery—arrived on the Friday, the day before the official departure. Doug and Dave booked a campsite at Cannon Rocks, 20 or so kilometres from Bushman’s. We arranged a braai for that evening, and I admit that I was shocked to my little toes when I saw that Doug and Dave had brought a caravan and camping trailer along. This is definitely not a caravan or trailer-friendly route and I voiced my hesitation.

    + +

    The long and the short was that Doug decided to continue despite my fears, and Dave decided to withdraw from the trip. This was not entirely due to my warnings but also to Valery not feeling up to scratch. We also heard that Roger would not be able to make it because of personal problems at home.

    + +
    Saturday: Bushman’s to Ocean View
    + +

    On Saturday morning, the remaining four vehicles met at Bushman’s River with our first destination set for Bathurst for breakfast. We drove via the "poor man’s game drive" (the old main road from Port Elizabeth to Port Alfred, now incorporated into the Sibuya Game Reserve) and the winding road through the spectacular Cowie River Valley.

    + +

    After brunch (the trip took longer than expected due to the bad roads), we wandered along to the Fish River Lighthouse, a place worth a visit. This historic building was erected in the late 19th century with the light first shining on 1 July 1898. The warning light has a strength of 5,000,000 candelas and is 85 metres above the high water mark with a shine range of 32 sea miles. Wish I had that on the front of my Hilux!

    + +

    The most unique feature about the light is that it has no bearings for the 2-ton light to spin on, but rather it floats in a bed of mercury—ingenious!

    + +

    From there, we drove back past the Bushman’s River, towards Boknes, and onto the scenic gravel road going to Alexandria that services all the dairy farms in the area. We turned off the gravel onto a farm road and came out at a camping site, Ocean View, where we arranged to spend 2 nights amongst the dense Eastern Cape bush on the edge of the sand dunes. This made for a snug campsite sheltered from the wind.

    + +

    Interest: The location of this campsite is on the eastern edge of the area with the largest shifting dunes in the southern hemisphere—truly spectacular!

    + +
    Sunday: Beach Day
    + +

    The next day was spent exploring the beach—miles and miles of pristine beach where there is not another soul to be seen!

    + +
    Monday: To Brakkeduine
    + +

    Monday morning, bright and early, we set off towards Port Elizabeth where we planned to leave Max, our faithful hound, for the duration of the trip, then on to Humansdorp and finally to a resort called Brakkeduine. Doug and Santie, pulling their caravan, suffered a puncture and stopped in the little town of Alexandria to have the tyre repaired. We decided that the remainder would go on in convoy through Port Elizabeth and meet them there.

    + +

    Once clear of Port Elizabeth, the three remaining vehicles followed the R102, down the old Van Staden’s Pass, across the single lane bridge spanning the Gamtoos River, and past Jefferey’s Bay. At Humansdorp, we hit the gravel roads and eventually reached Brakkeduine in the late afternoon. Doug and Santie were already there, with Doug trying his hand at fishing in the dam. The campsites are to die for—set along manicured grassy terraced ledges overlooking the dam, each site separated by neatly trimmed hedges.

    + +
    Tuesday: Dune Adventure
    + +

    The following morning we met Johan, our guide for the day. After airing down (0.6 bar!), we set off in convoy to attack the dunes. Before we reached the first dune, Doug pulled a tyre off the rim. We all got stuck in to repair the wheel and were on the road again fifteen minutes later. The airjack proved its usefulness!

    + +

    We played in the sand for the next few hours, then Roy managed to pull one of his tyres off the rim—on a steep incline and in the boiling heat of the midday sun. This time the airjack did not do so well! We were eventually forced to use Mike’s trusty hi-lift jack. Eventually, we changed wheels and headed for camp, then back to Humansdorp to get the wheel repaired.

    + +

    Doug had also picked up a problem with his Prado, and he and Santie decided to head to the Toyota garage in Joubertina, further along the R62, with the plan that we would all meet up again in Kareedouw.

    + +
    Wednesday: Rus en Vrede Trail
    + +

    From Kareedouw, we headed off north into the mountains. The road was rocky and full of loose stones. I was concerned about the tyres on Doug’s Prado and caravan, but we arrived at our camp as the sun was setting. Baviaans Lodge is situated in the Kouga Mountains at the start of the Rus en Vrede trail across the mountains to the Baviaanskloof. The campsite is cosy, set among the trees on the bank of a small stream. There is a hot water shower and toilets, all well maintained and clean.

    + +

    We enjoyed an evening around the campfire, though I went to bed concerned about Doug pulling his caravan over the mountains.

    + +

    On Wednesday morning, everyone was packed and ready to go by 08:00. The day was slow going but with no delays or problems. The only casualty was the awning from Mike’s Cruiser, which was shaken free and rescued by Roy.

    + +

    The Rus en Vrede trail, originally cut by woodcutters in the 1800s, now crosses three farms. It consists of gravel, loose rocks, eroded farm tracks, and mountain terrain. There are 13 gates that had to be opened and closed—thank you Noelene and Naome!

    + +

    The views are breathtaking, covering seven different mountain ranges. We were lucky with the weather—clear skies, no wind, and cool temperatures. The proteas were in bloom and the centuries-old cycads stood tall over the peaks.

    + +
    Thursday: Into the Kloof
    + +

    The trail ends at Rus en Vrede farm, where you pay the farmer per vehicle and person. We entered the Baviaanskloof Nature Reserve, crossing Holgat’s Pass, Kombrink’s Pass, and the Grootrivier Pass. The roads were rough and slow-going but scenic.

    + +

    Our destination was Kudu Kaya, a working citrus farm. We camped on a hill overlooking the farm. Doug did some repairs to the caravan and Santie spent time cleaning up food shaken loose—custard and gunk everywhere!

    + +
    Friday: To Kaboega
    + +

    Thursday morning, we drove to Steytlerville via Antonie’s Pass—a rugged rock and gravel road. After lunch at the Royal Hotel in Steytlerville, we continued to Kaboega, a private farm near Addo Elephant Park. We camped at a big dam and were warmly welcomed by Ian Ritchie and his wife Sandy.

    + +

    Friday morning, Ian and Sandy joined us for coffee. Sandy shared insights into Bushman’s paintings and local history. Ian then led us around the 6,000-hectare farm, sharing his deep knowledge of biodiversity, plants, and terrain. Apart from a locked gate we had to cut open, the day was smooth. We ended with a swim in a mountain pool instead of visiting more rock art sites due to the time.

    + +
    Saturday: Mountain Zebra Park
    + +

    On Saturday, we took scenic gravel roads to the Mountain Zebra Park via Somerset East and Cradock. After breakfast in Somerset East, we passed through Swarthoek and Maraiskloof Passes to Cradock for fuel, then entered the Park and set up camp.

    + +

    Though we originally planned to stay one night, everyone decided to stay an extra day for game drives. The reserve is home to a wide range of plains animals, especially the rare mountain zebra, and other wildlife found in the gorges and valleys.

    +
    + Blog Details +
    +
    Services Offered by a Tour and Travel Agency
    +

    Agency plays a pivotal role in crafting memorable experiences for travelers by offering wide range services tailored to individual preferences. Whether it's a family vacation, an adventure trip, or luxury getaway well-established travel agency can handle everything from flight bookings and accommodation to guided tours .

    +
      +
    • Assisting customers in booking domestic and international flights.
    • +
    • Organizing adventure activities such as trekking, diving, safaris, or extreme sports.
    • +
    • Tailoring travel plans to meet the specific needs and preferences of the customer.
    • +
    • Providing professional guides for city tours, cultural experiences, adventure activities, etc.
    • +
    • Arranging local transportation such as car rentals, airport transfers, or bus tours.
    • +
    • Helping customers navigate the visa application process for international travel.
    • +
    +
    +
    +
    + Blog +
    +
    +
    +
    + Blog +
    +
    +
    +
    How to Start a Tour and Travel Agency
    +

    Agency plays a pivotal role in crafting memorable experiences for travelers by offering wide range services tailored to individual preferences. Whether it's a family vacation, an adventure trip, or luxury getaway well-established travel agency can handle everything from flight bookings and accommodation to guided tours .

    +
    + +
    "In the world of tours and travel, every journey is an invitation to explore the unknown, connect with cultures, and create memories that last lifetime It's not just about the destination,extraordinary adventures." +
    + +
    +
      +
    • Understand the demand in your area, competition, and potential customers.
    • +
    • Register your business, obtain necessary licenses, and ensure compliance with local regulations.
    • +
    • Build relationships with hotels, airlines, transport companies, and other service providers.
    • +
    +
    + +
    + +
    +
    +
    Tags
    +
    + Travel + Hotel + Tour +
    +
    +
    +
    Share
    + +
    +
    + +
    +
    +
    + Author +
    +
    +

    Richard M. Fudge

    +

    The world is a book, and those who do not travel read only one page. Every journey we undertake is a chapter filled with lessons, experiences, and stories.

    + +
    +
    +
    + +
    +
    +
    + News +
    + +
    +
    +
    + News +
    + +
    +
    + +
    +
    Leave A Comments
    +

    Your email address will not be published. Required fields are marked *

    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
      +
    • + + +
    • +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/events.php b/src/pages/events/events.php similarity index 95% rename from events.php rename to src/pages/events/events.php index 435ab845..950c85eb 100644 --- a/events.php +++ b/src/pages/events/events.php @@ -1,194 +1,196 @@ - - - - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    - -
    -
    - -
    - Sort By -
    - -
    - - prepare("SELECT event_id, date, time, name, image, description, feature, location, type, promo FROM events WHERE date > CURDATE() ORDER BY date ASC"); - $stmt->execute(); - $result = $stmt->get_result(); - - if ($result->num_rows > 0) { - // Loop through each row - while ($row = $result->fetch_assoc()) { - $event_id = $row['event_id']; - $date = $row['date']; - $time = $row['time']; - $name = $row['name']; - $image = $row['image']; - $description = $row['description']; - $feature = $row['feature']; - $location = $row['location']; - $type = $row['type']; - $promo = $row['promo']; - - // Determine the badge text based on the status - $badge_text = 'OPEN DAY'; - - // Output the HTML structure with dynamic data - echo ' -
    -
    - ' . $name . ' -
    -
    -
    - ' . $location . ' -
    -
    ' . $name . '
    -

    ' . $feature . '

    -

    ' . $description . '

    -
      -
    • ' . convertDate($date) . '
    • -
    • ' . $time . '
    • -
    - - -
    -
    '; - } - } else { - echo "No events available."; - } - - // Close connection - $conn->close(); - ?> - - -
    -
    -
    -
    - - -
    -
    - × -
    - -
    -
    - - - - \ No newline at end of file + + + + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    + +
    +
    + +
    + Sort By +
    + +
    + + prepare("SELECT event_id, date, time, name, image, description, feature, location, type, promo FROM events WHERE date > CURDATE() ORDER BY date ASC"); + $stmt->execute(); + $result = $stmt->get_result(); + + if ($result->num_rows > 0) { + // Loop through each row + while ($row = $result->fetch_assoc()) { + $event_id = $row['event_id']; + $date = $row['date']; + $time = $row['time']; + $name = $row['name']; + $image = $row['image']; + $description = $row['description']; + $feature = $row['feature']; + $location = $row['location']; + $type = $row['type']; + $promo = $row['promo']; + + // Determine the badge text based on the status + $badge_text = 'OPEN DAY'; + + // Output the HTML structure with dynamic data + echo ' +
    +
    + ' . $name . ' +
    +
    +
    + ' . $location . ' +
    +
    ' . $name . '
    +

    ' . $feature . '

    +

    ' . $description . '

    +
      +
    • ' . convertDate($date) . '
    • +
    • ' . $time . '
    • +
    + + +
    +
    '; + } + } else { + echo "No events available."; + } + + // Close connection + $conn->close(); + ?> + + +
    +
    +
    +
    + + +
    +
    + × +
    + +
    +
    + + + + diff --git a/instapage.php b/src/pages/events/instapage.php similarity index 96% rename from instapage.php rename to src/pages/events/instapage.php index 5c61aae6..c8cb5674 100644 --- a/instapage.php +++ b/src/pages/events/instapage.php @@ -1,55 +1,55 @@ - - - -
    - -
    + + + +
    + +
    diff --git a/member_info.php b/src/pages/memberships/member_info.php similarity index 98% rename from member_info.php rename to src/pages/memberships/member_info.php index 9b5af842..a45a2a63 100644 --- a/member_info.php +++ b/src/pages/memberships/member_info.php @@ -1,5 +1,6 @@ close(); - \ No newline at end of file + diff --git a/membership.php b/src/pages/memberships/membership.php similarity index 79% rename from membership.php rename to src/pages/memberships/membership.php index fcc67c1a..d58d0b2c 100644 --- a/membership.php +++ b/src/pages/memberships/membership.php @@ -1,73 +1,73 @@ prepare($sql); -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$result = $stmt->get_result(); -$user = $result->fetch_assoc(); +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); + +// Assuming you have the user ID stored in the session +if (isset($_SESSION['user_id']) && isset($conn) && $conn !== null) { + $user_id = $_SESSION['user_id']; + // Fetch user data from the database + $sql = "SELECT * FROM users WHERE user_id = ?"; + $stmt = $conn->prepare($sql); + $stmt->bind_param("i", $user_id); + $stmt->execute(); + $result = $stmt->get_result(); + $user = $result->fetch_assoc(); +} else { + $user = null; +} ?> 'index.php']]; - require_once('components/banner.php'); -?> - -
    -
    -
    -
    -
    -
    -

    Become a member of 4WDCSA

    - -

    Sign up for an annual membership and receive:

    -
      -
    • Year round access to BASE4
    • -
    • FREE Camping at BASE4
    • -
    • Up to 95% Discount on Training Courses
    • -
    • Exclusive Member discounts for all trips and events
    • -
    • ... and many more!
    • -
    -
    -

    R 2,500/year

    -

    We go above and beyond to make your travel dreams reality hidden gems and must-see - attractions

    - - Start Application - - - -
    -
    -
    -
    - - About -
    -
    -
    -
    -
    - - - - - - - \ No newline at end of file + require_once(dirname(dirname(dirname(__DIR__))) . '/components/banner.php'); +?> + +
    +
    +
    +
    +
    +
    +

    Become a member of 4WDCSA

    + +

    Sign up for an annual membership and receive:

    +
      +
    • Year round access to BASE4
    • +
    • FREE Camping at BASE4
    • +
    • Up to 95% Discount on Training Courses
    • +
    • Exclusive Member discounts for all trips and events
    • +
    • ... and many more!
    • +
    +
    +

    R 2,500/year

    +

    We go above and beyond to make your travel dreams reality hidden gems and must-see + attractions

    + + Start Application + + + +
    +
    +
    +
    + + About +
    +
    +
    +
    +
    + + + + + + + \ No newline at end of file diff --git a/membership_application.php b/src/pages/memberships/membership_application.php similarity index 96% rename from membership_application.php rename to src/pages/memberships/membership_application.php index 612c5339..a0703cee 100644 --- a/membership_application.php +++ b/src/pages/memberships/membership_application.php @@ -1,283 +1,284 @@ prepare($sql); -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$result = $stmt->get_result(); -$user = $result->fetch_assoc(); +$rootPath = dirname(dirname(dirname(__DIR__))); +include_once($rootPath . '/header.php'); +checkUserSession(); + +// Assuming you have the user ID stored in the session +if (isset($_SESSION['user_id'])) { + $user_id = $_SESSION['user_id']; +}else{ + header('Location: login.php'); + exit(); // Stop further script execution +} + +checkMembershipApplication($user_id); +// Fetch user data from the database + +$sql = "SELECT * FROM users WHERE user_id = ?"; +$stmt = $conn->prepare($sql); +$stmt->bind_param("i", $user_id); +$stmt->execute(); +$result = $stmt->get_result(); +$user = $result->fetch_assoc(); ?> 'index.php'], ['Membership' => 'membership.php']]; - require_once('components/banner.php'); -?> - - - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - -

    Main Member

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -

    Spouse / Life Partner / Other Details

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -

    Children's Names

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    - - -

    Address

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -

    Interests and Hobbies

    -
    -
    -
    - -
    -
    -
    - - -

    Primary Vehicle

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -

    Secondary Vehicle

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    - -
    - - - - - - \ No newline at end of file + require_once($rootPath . '/components/banner.php'); +?> + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +

    Main Member

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    Spouse / Life Partner / Other Details

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    Children's Names

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    + + +

    Address

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    Interests and Hobbies

    +
    +
    +
    + +
    +
    +
    + + +

    Primary Vehicle

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +

    Secondary Vehicle

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + + + + + + diff --git a/membership_details.php b/src/pages/memberships/membership_details.php similarity index 95% rename from membership_details.php rename to src/pages/memberships/membership_details.php index f83b4bcf..c17cd7e6 100644 --- a/membership_details.php +++ b/src/pages/memberships/membership_details.php @@ -1,561 +1,562 @@ -prepare($sql); -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$result = $stmt->get_result(); - -// Fetch single record -$membership = $result->fetch_assoc(); - -// Fetch membership application data using mysqli -$query = "SELECT * FROM membership_application WHERE user_id = ?"; -$stmt = $conn->prepare($query); -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$result = $stmt->get_result(); -$application = $result->fetch_assoc(); - -// Close statement -$stmt->close(); - -if (empty($application['id_number'])) { - $_SESSION['message'] = 'Please update your details below to complete your application.'; -} -?> - - - -
    -
    -
    -
    -
    -
    -

    Membership Details

    -
    - -
    - - × -
    - - -
    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Start DateRenewal DateIndemnityAmountPayment ReferencePayment StatusMembership Status
    VIEW INDEMNITYSIGN INDEMNITYAWAITING PAYMENT
    No membership records found.
    -
    - - strtotime($membership_end_date)) { - echo ' - - Renew Membership - - '; - } - ?> -
    -
    -
    -
    - -

    Main Member

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -

    Spouse / Life Partner / Other Details

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -

    Children's Names

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    - - -

    Address

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -

    Interests and Hobbies

    -
    -
    -
    - -
    -
    -
    - - -

    Primary Vehicle

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -

    Secondary Vehicle

    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - -
    - - -
    -
    - -
    -
    - -
    -
    - -
    - -
    - - - - - - \ No newline at end of file +prepare($sql); +$stmt->bind_param("i", $user_id); +$stmt->execute(); +$result = $stmt->get_result(); + +// Fetch single record +$membership = $result->fetch_assoc(); + +// Fetch membership application data using mysqli +$query = "SELECT * FROM membership_application WHERE user_id = ?"; +$stmt = $conn->prepare($query); +$stmt->bind_param("i", $user_id); +$stmt->execute(); +$result = $stmt->get_result(); +$application = $result->fetch_assoc(); + +// Close statement +$stmt->close(); + +if (empty($application['id_number'])) { + $_SESSION['message'] = 'Please update your details below to complete your application.'; +} +?> + + + +
    +
    +
    +
    +
    +
    +

    Membership Details

    +
    + +
    + + × +
    + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Start DateRenewal DateIndemnityAmountPayment ReferencePayment StatusMembership Status
    VIEW INDEMNITYSIGN INDEMNITYAWAITING PAYMENT
    No membership records found.
    +
    + + strtotime($membership_end_date)) { + echo ' + + Renew Membership + + '; + } + ?> +
    +
    +
    +
    + +

    Main Member

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    Spouse / Life Partner / Other Details

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    Children's Names

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    + + +

    Address

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + + +

    Interests and Hobbies

    +
    +
    +
    + +
    +
    +
    + + +

    Primary Vehicle

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +

    Secondary Vehicle

    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    + +
    + + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + + + + + + diff --git a/membership_payment.php b/src/pages/memberships/membership_payment.php similarity index 91% rename from membership_payment.php rename to src/pages/memberships/membership_payment.php index 8e3492d0..bb4bb9ff 100644 --- a/membership_payment.php +++ b/src/pages/memberships/membership_payment.php @@ -1,104 +1,105 @@ prepare($query)) { - // Bind the user_id parameter to the query - $stmt->bind_param("i", $user_id); - - // Execute the query - $stmt->execute(); - - // Bind the results to variables - $stmt->bind_result($payment_amount, $membership_start_date, $membership_end_date, $eft_id); - - // Fetch the data - if ($stmt->fetch()) { - // Values are now assigned to $payment_amount, $membership_start_date, and $membership_end_date - } else { - // Handle case where no records are found - $error_message = "No records found for the given user ID."; - } - - // Close the statement - $stmt->close(); - } else { - // Handle query preparation failure - $error_message = "Query preparation failed: " . $conn->error; - } -} else { - // Handle case where user_id is not found in session - $error_message = "User ID not found in session."; -} - -// Get user's email -$sql = "SELECT email FROM users WHERE user_id = ?"; -$stmt = $conn->prepare($sql); - -if (!$stmt) { - die("Prepare failed: " . $conn->error); -} - -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$stmt->bind_result($user_email); -$stmt->fetch(); -$stmt->close(); - -$conn->close(); +$rootPath = dirname(dirname(dirname(__DIR__))); +include_once($rootPath . '/header.php'); +// Assuming you have the user ID stored in the session +if (isset($_SESSION['user_id'])) { + $user_id = $_SESSION['user_id']; +} else { + header('Location: login.php'); + exit(); // Stop further script execution +} + +// Initialize variables +$payment_amount = null; +$membership_start_date = null; +$membership_end_date = null; + +// Get the user_id from the session +$user_id = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : null; + +if ($user_id) { + // Prepare the SQL query to fetch data + $query = "SELECT payment_amount, membership_start_date, membership_end_date, payment_id + FROM membership_fees + WHERE user_id = ?"; + + if ($stmt = $conn->prepare($query)) { + // Bind the user_id parameter to the query + $stmt->bind_param("i", $user_id); + + // Execute the query + $stmt->execute(); + + // Bind the results to variables + $stmt->bind_result($payment_amount, $membership_start_date, $membership_end_date, $eft_id); + + // Fetch the data + if ($stmt->fetch()) { + // Values are now assigned to $payment_amount, $membership_start_date, and $membership_end_date + } else { + // Handle case where no records are found + $error_message = "No records found for the given user ID."; + } + + // Close the statement + $stmt->close(); + } else { + // Handle query preparation failure + $error_message = "Query preparation failed: " . $conn->error; + } +} else { + // Handle case where user_id is not found in session + $error_message = "User ID not found in session."; +} + +// Get user's email +$sql = "SELECT email FROM users WHERE user_id = ?"; +$stmt = $conn->prepare($sql); + +if (!$stmt) { + die("Prepare failed: " . $conn->error); +} + +$stmt->bind_param("i", $user_id); +$stmt->execute(); +$stmt->bind_result($user_email); +$stmt->fetch(); +$stmt->close(); + +$conn->close(); ?> 'index.php'], ['Membership' => 'membership.php']]; - require_once('components/banner.php'); -?> - -
    -
    -
    -
    -
    - New Membership Payment: - Membership Start Date: ' . $membership_start_date . '
    Membership Renewal Date: ' . $membership_end_date . ''; ?> -
    -

    Your invoice has been sent to . Please upload your proof of payment below.

    -
    Payment Details:
    -

    The Four Wheel Drive Club of Southern Africa
    FNB
    Account Number: 58810022334
    Branch code: 250655
    Reference:
    Amount: R

    - - Submit Proof of Payment - - -
    - -
    -
    - About -
    -
    - -
    -
    -
    - - \ No newline at end of file + require_once($rootPath . '/components/banner.php'); +?> + +
    +
    +
    +
    +
    + New Membership Payment: + Membership Start Date: ' . $membership_start_date . '
    Membership Renewal Date: ' . $membership_end_date . ''; ?> +
    +

    Your invoice has been sent to . Please upload your proof of payment below.

    +
    Payment Details:
    +

    The Four Wheel Drive Club of Southern Africa
    FNB
    Account Number: 58810022334
    Branch code: 250655
    Reference:
    Amount: R

    + + Submit Proof of Payment + + +
    + +
    +
    + About +
    +
    + +
    +
    +
    + + diff --git a/renew_membership.php b/src/pages/memberships/renew_membership.php similarity index 97% rename from renew_membership.php rename to src/pages/memberships/renew_membership.php index 66e35c08..58286c27 100644 --- a/renew_membership.php +++ b/src/pages/memberships/renew_membership.php @@ -1,32 +1,32 @@ -prepare("UPDATE membership_fees SET payment_amount = ?, payment_date = ?, membership_start_date = ?, membership_end_date = ?, payment_status = 'PENDING', payment_id = ? WHERE user_id = ?"); -$stmt->bind_param("dssssi", $payment_amount, $payment_date, $membership_start_date, $membership_end_date, $eft_id, $user_id); - -if ($stmt->execute()) { - // Commit the transaction - $conn->commit(); - addSubsEFT($eft_id, $user_id, $status, $payment_amount, $description); - header("Location:membership_payment.php"); - // Success message - $response = [ - 'status' => 'success', - 'message' => 'Your membership application has been updated successfully!' - ]; -} else { - throw new Exception("Failed to update membership fee. SQL error: " . $conn->error); -} +prepare("UPDATE membership_fees SET payment_amount = ?, payment_date = ?, membership_start_date = ?, membership_end_date = ?, payment_status = 'PENDING', payment_id = ? WHERE user_id = ?"); +$stmt->bind_param("dssssi", $payment_amount, $payment_date, $membership_start_date, $membership_end_date, $eft_id, $user_id); + +if ($stmt->execute()) { + // Commit the transaction + $conn->commit(); + addSubsEFT($eft_id, $user_id, $status, $payment_amount, $description); + header("Location:membership_payment.php"); + // Success message + $response = [ + 'status' => 'success', + 'message' => 'Your membership application has been updated successfully!' + ]; +} else { + throw new Exception("Failed to update membership fee. SQL error: " . $conn->error); +} diff --git a/404.php b/src/pages/other/404.php similarity index 93% rename from 404.php rename to src/pages/other/404.php index 60941583..15dd698d 100644 --- a/404.php +++ b/src/pages/other/404.php @@ -1,46 +1,46 @@ - - - -
    -
    -
    -
    -
    -

    OOPS!

    -
    -

    This Page Can’t be Found

    -
    - - -
    -
    -
    -
    - 404 Error -
    -
    -
    -
    -
    - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +?> + + + +
    +
    +
    +
    +
    +

    OOPS!

    +
    +

    This Page Can’t be Found

    +
    + + +
    +
    +
    +
    + 404 Error +
    +
    +
    +
    +
    + + + diff --git a/src/pages/other/about.php b/src/pages/other/about.php new file mode 100644 index 00000000..59d8a450 --- /dev/null +++ b/src/pages/other/about.php @@ -0,0 +1,284 @@ + + + + 'index.php']]; +require_once($rootPath . '/components/banner.php'); +?> + +
    +
    +
    +
    +
    +
    +

    Welcome to the Four Wheel Drive Club of Southern Africa!

    +
    +

    + We're a family-friendly outdoor adventure club passionate about exploring the great outdoors through off-road driving, camping, overlanding, cross-border trips, day trips, and unforgettable events. Whether you're new to 4x4 adventures or a seasoned explorer, our community is all about camaraderie, responsible adventure, and creating lasting memories—on and off the road. +

    +
      +
    • Overlanding
    • +
    • Camping
    • +
    • Day Trips
    • +
    • 4x4 Driver Training
    • +
    • Family Events
    • +
    • Monthly Open Days
    • +
    • Guest Speakers
    • +
    • 4x4 Driving Track
    • +
    + +
    +
    +
    +
    +
    + Benefit +
    +
    + Benefit +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +

    BASE4 Open Days

    +

    Whether you're a member or just curious, everyone's welcome at our monthly open events. Come camp with us, enjoy guest speakers, take your rig for a spin on the 4x4 track, or just relax by the swimming pool. Saturday’s Open Day includes breakfast and lunch for sale, plus braai fires ready to go—just bring your tongs! It’s the perfect way to experience the spirit of the club and connect with fellow adventurers.

    +
    +
    +
    + '; + } + ?> +
    + + + +
    + + + + +
    +
    +
    +
    +
    +
    +

    Want to get involved?JOIN THE COMMITTEE!

    +

    Want to be more involved in the adventure? Join our committee and help shape the future of the club! Whether it’s planning epic trips, organizing fun events, or assisting with training, your energy and ideas make all the difference. The club runs on the passion of its members—get stuck in, meet awesome people, and be part of what makes it all happen!

    +
    + Hotel +
    +
    +
    +
    +
    +
    +
    +

    4WDCSA Committee and Other Office Bearers

    +
    +

    Committee

    +
  • Chairman - John Runciman
  • +
  • National Liaison - Peter Hutchison
  • +
  • Treasurer - Doug Timm
  • +
  • Outings - John Runciman
  • +
  • Events - Noelene Runciman
  • +
  • Driver Training - John Runciman
  • +
  • Digital Media - Christopher Pinto
  • + +
    +
    +

    Administration

    +
  • Secretary - Jacqui Boshoff
  • + +
    +

    + All portfolio holders/committee members of the 4WDCSA are volunteers and are not paid for their services.
    The secretary is paid for administrative duties only.

    +
    +
    +
    + +
    +
    +
    + + + + +
    +
    +
    +
    +
    +

    4x4 Memories

    + +
    +
    +
    + '; + } + ?> +
    + + + +
    + + + +
    +
    +
    +
    +
    + Extended Trips +

    Come and Explore Africa and beyond

    + + Explore Trips + + +
    +
    +
    +
    + Driver Training +

    Level up your 4x4 Driving Skills

    + + Explore Training + + +
    +
    +
    +
    + Events +

    See whats cooking at BASE4!

    + + Explore Events + + +
    +
    +
    +
    +
    + + + + +
    +
    +
    + +
    +
    +
    + + + + diff --git a/account_settings.php b/src/pages/other/account_settings.php similarity index 95% rename from account_settings.php rename to src/pages/other/account_settings.php index aad7da7a..2fad3432 100644 --- a/account_settings.php +++ b/src/pages/other/account_settings.php @@ -1,248 +1,249 @@ -prepare($sql); -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$result = $stmt->get_result(); -$user = $result->fetch_assoc(); -?> - - - - -
    -
    -
    -
    -
    -
    -
    -

    Account Settings

    -
    -
    - - -
    - Profile Picture - - -
    - - -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - -
    -
    - -
    -
    -
    -
    - - - - -
    - -
    -

    Change Password

    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    -
    - - - - - - \ No newline at end of file +prepare($sql); +$stmt->bind_param("i", $user_id); +$stmt->execute(); +$result = $stmt->get_result(); +$user = $result->fetch_assoc(); +?> + + + + +
    +
    +
    +
    +
    +
    +
    +

    Account Settings

    +
    +
    + + +
    + Profile Picture + + +
    + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + +
    + +
    +

    Change Password

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    + + + + + + diff --git a/ad_banner.php b/src/pages/other/ad_banner.php similarity index 98% rename from ad_banner.php rename to src/pages/other/ad_banner.php index 31b8f40e..9e9a0409 100644 --- a/ad_banner.php +++ b/src/pages/other/ad_banner.php @@ -1,29 +1,29 @@ - - - + + + diff --git a/basic_indemnity.php b/src/pages/other/basic_indemnity.php similarity index 95% rename from basic_indemnity.php rename to src/pages/other/basic_indemnity.php index 470759f1..b23d7611 100644 --- a/basic_indemnity.php +++ b/src/pages/other/basic_indemnity.php @@ -1,132 +1,133 @@ - - - +$rootPath = dirname(dirname(dirname(__DIR__))); +include_once($rootPath . '/header.php'); +// Assuming you have the user ID stored in the session +if (isset($_SESSION['user_id'])) { + $user_id = $_SESSION['user_id']; +} else { + header('Location: login.php'); + exit(); // Stop further script execution +} +?> + + + 'index.php']]; - require_once('components/banner.php'); -?> - - - -
    - -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    - -
    -
    -

    Signature

    -
    - - -
    -
    - - - - - - - \ No newline at end of file + require_once($rootPath . '/components/banner.php'); +?> + + + +
    + +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    + +
    +
    +

    Signature

    +
    + + +
    +
    + + + + + + + diff --git a/bush_mechanics.php b/src/pages/other/bush_mechanics.php similarity index 97% rename from bush_mechanics.php rename to src/pages/other/bush_mechanics.php index 2eed177b..1f467372 100644 --- a/bush_mechanics.php +++ b/src/pages/other/bush_mechanics.php @@ -1,384 +1,385 @@ -prepare("SELECT course_id, date FROM courses WHERE course_type = ? AND date >= CURDATE()"); -$course_type = 'bush_mechanics'; -$stmt->bind_param("s", $course_type); -$stmt->execute(); -$result = $stmt->get_result(); -$page_id = 'bush_mechanics'; -?> - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    -
    -
    -
    -
    - Perview -
    -
    - Perview -
    -
    - Perview -
    -
    - -
    -
    -
    -
    -
    -

    Bush Mechanics

    -
    - - R /member - R /non-members -

    This Bush Mechanics Course is tailored to help you develop the essential skills for managing vehicle repairs and maintenance in remote, off-grid locations. Learn practical techniques for diagnosing and fixing mechanical issues using limited resources, from tire repairs to engine troubleshooting. The course covers the use of basic tools, improvising solutions in the field, and ensuring your vehicle remains operational even in the most challenging environments. Perfect for off-road adventurers, 4x4 owners, and those who want to be prepared for any mechanical situation while exploring remote areas.

    -
    -
    -
    -
    -
      -
    • - Select Date - -
    • - - Additional Members - - - '; - } ?> - -
    • - Additional Non-Members - -
    • -
    -
    - -
    Total: -
    -
    -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    -
    - - -
    -
    - - num_rows == 0) { - $button_text = "No booking dates available"; - $button_disabled = "disabled"; - } - ?> - - -
    -
    - -
    - - -
    -
    -
    - -
    -
    -

    This Bush Mechanics Course is designed to provide participants with practical, hands-on skills and knowledge for conducting essential repairs and maintenance in remote and off-road environments. Participants will learn how to assess mechanical issues and apply bush-friendly repair techniques, ensuring they can keep their 4x4 running smoothly in the field. The course covers a wide range of topics, from tire repairs and fixing fuel systems to electrical troubleshooting and engine repairs, all using minimal tools and available resources.

    -

    Emphasis is placed on the use of basic tools, improvising with available materials, and maintaining the vehicle’s functionality in harsh conditions. The course also prioritizes safety, teaching participants how to perform repairs while minimizing risk and ensuring they can safely handle mechanical breakdowns during off-road adventures. With a focus on resourcefulness and problem-solving, this course equips off-road enthusiasts and 4x4 owners with the confidence to tackle mechanical challenges and keep their vehicles in top shape while exploring remote locations.

    -
    -
    -
    What this course includes
    -
      -
    • Bush Mechanics Manual.
    • -
    • Theory session and discussion.
    • -
    • Spend the afternoon practicing common bush mechanics techniques.
    • -
    -
    -
    -
    - Product Details -
    -
    -
    -
    -
    - -
      -
    • Coffee and Welcome: Kick off the day with a warm coffee, meet your instructors, and receive an overview of the course schedule
    • -
    • Theory Session: Dive into the key principles of off-road driving, including vehicle mechanics, terrain navigation, recovery methods, and safety protocols.
    • -
    • Practical Demonstrations: Watch live demonstrations covering vital techniques like gear selection, adjusting tire pressure, and setting up recovery equipment.
    • -
    • Lunch Break: Enjoy a packed lunch or bring something to braai. Fires will be provided for an authentic outdoor experience.
    • -
    • Practical Bush Mechanics Techniques: Learn hands-on techniques like rebeading a tire, fixing punctures, and performing basic vehicle repairs in the field.
    • -
    • Debrief and Certificates: Conclude the day with a review of your progress, feedback from the instructors, and certificates of completion for your off-road training.
    • - -
    -
    -
    - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file +prepare("SELECT course_id, date FROM courses WHERE course_type = ? AND date >= CURDATE()"); +$course_type = 'bush_mechanics'; +$stmt->bind_param("s", $course_type); +$stmt->execute(); +$result = $stmt->get_result(); +$page_id = 'bush_mechanics'; +?> + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    +
    +
    +
    +
    + Perview +
    +
    + Perview +
    +
    + Perview +
    +
    + +
    +
    +
    +
    +
    +

    Bush Mechanics

    +
    + + R /member + R /non-members +

    This Bush Mechanics Course is tailored to help you develop the essential skills for managing vehicle repairs and maintenance in remote, off-grid locations. Learn practical techniques for diagnosing and fixing mechanical issues using limited resources, from tire repairs to engine troubleshooting. The course covers the use of basic tools, improvising solutions in the field, and ensuring your vehicle remains operational even in the most challenging environments. Perfect for off-road adventurers, 4x4 owners, and those who want to be prepared for any mechanical situation while exploring remote areas.

    +
    +
    +
    +
    +
      +
    • + Select Date + +
    • + + Additional Members + + + '; + } ?> + +
    • + Additional Non-Members + +
    • +
    +
    + +
    Total: -
    +
    +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    +
    + + +
    +
    + + num_rows == 0) { + $button_text = "No booking dates available"; + $button_disabled = "disabled"; + } + ?> + + +
    +
    + +
    + + +
    +
    +
    + +
    +
    +

    This Bush Mechanics Course is designed to provide participants with practical, hands-on skills and knowledge for conducting essential repairs and maintenance in remote and off-road environments. Participants will learn how to assess mechanical issues and apply bush-friendly repair techniques, ensuring they can keep their 4x4 running smoothly in the field. The course covers a wide range of topics, from tire repairs and fixing fuel systems to electrical troubleshooting and engine repairs, all using minimal tools and available resources.

    +

    Emphasis is placed on the use of basic tools, improvising with available materials, and maintaining the vehicle’s functionality in harsh conditions. The course also prioritizes safety, teaching participants how to perform repairs while minimizing risk and ensuring they can safely handle mechanical breakdowns during off-road adventures. With a focus on resourcefulness and problem-solving, this course equips off-road enthusiasts and 4x4 owners with the confidence to tackle mechanical challenges and keep their vehicles in top shape while exploring remote locations.

    +
    +
    +
    What this course includes
    +
      +
    • Bush Mechanics Manual.
    • +
    • Theory session and discussion.
    • +
    • Spend the afternoon practicing common bush mechanics techniques.
    • +
    +
    +
    +
    + Product Details +
    +
    +
    +
    +
    + +
      +
    • Coffee and Welcome: Kick off the day with a warm coffee, meet your instructors, and receive an overview of the course schedule
    • +
    • Theory Session: Dive into the key principles of off-road driving, including vehicle mechanics, terrain navigation, recovery methods, and safety protocols.
    • +
    • Practical Demonstrations: Watch live demonstrations covering vital techniques like gear selection, adjusting tire pressure, and setting up recovery equipment.
    • +
    • Lunch Break: Enjoy a packed lunch or bring something to braai. Fires will be provided for an authentic outdoor experience.
    • +
    • Practical Bush Mechanics Techniques: Learn hands-on techniques like rebeading a tire, fixing punctures, and performing basic vehicle repairs in the field.
    • +
    • Debrief and Certificates: Conclude the day with a review of your progress, feedback from the instructors, and certificates of completion for your off-road training.
    • + +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/comment_box.php b/src/pages/other/comment_box.php similarity index 96% rename from comment_box.php rename to src/pages/other/comment_box.php index c9fb7975..16ce2a47 100644 --- a/comment_box.php +++ b/src/pages/other/comment_box.php @@ -1,159 +1,159 @@ -prepare("INSERT INTO comments (page_id, user_id, comment) VALUES (?, ?, ?)"); - $stmt->bind_param("sss", $page_id, $user_id, $comment); - if ($stmt->execute()) { - header("Location: " . $_SERVER['REQUEST_URI']); - exit; - } - } -} - -// Fetch comments -$stmt = $conn->prepare("SELECT user_id, comment, created_at FROM comments WHERE page_id = ? ORDER BY created_at DESC"); -$stmt->bind_param("s", $page_id); -$stmt->execute(); -$result = $stmt->get_result(); -?> - -
    -
    Comments
    -
    - fetch_assoc()): ?> -
    -
    - Author -
    -
    -
    - MEMBER
    '; - } - ?> - - - -

    - -
    -
    - - - - -
    - -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/contact.php b/src/pages/other/contact.php similarity index 95% rename from contact.php rename to src/pages/other/contact.php index a78b81fa..aae7b14e 100644 --- a/contact.php +++ b/src/pages/other/contact.php @@ -1,111 +1,113 @@ - - 'index.php']]; - require_once('components/banner.php'); -?> - - - -
    -
    -
    -
    -
    -
    -

    For any queries, please don't hesitate to contact us:

    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    Need Help & Support
    - -
    -
    -
    -
    -
    -
    -
    -
    Need Anything Urgent
    - -
    -
    -
    -
    -
    -
    -
    -
    BASE 4
    -
    Plot 50, Gemstone Rd, Doornrandje, Centurion, 0157
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - -
    - -
    - - - - \ No newline at end of file + require_once($rootPath . '/components/banner.php'); +?> + + + +
    +
    +
    +
    +
    +
    +

    For any queries, please don't hesitate to contact us:

    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Need Help & Support
    + +
    +
    +
    +
    +
    +
    +
    +
    Need Anything Urgent
    + +
    +
    +
    +
    +
    +
    +
    +
    BASE 4
    +
    Plot 50, Gemstone Rd, Doornrandje, Centurion, 0157
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + +
    + +
    + + + + diff --git a/indemnity.php b/src/pages/other/indemnity.php similarity index 95% rename from indemnity.php rename to src/pages/other/indemnity.php index e028ee0c..c6f1c43e 100644 --- a/indemnity.php +++ b/src/pages/other/indemnity.php @@ -1,132 +1,133 @@ - - - +$rootPath = dirname(dirname(dirname(__DIR__))); +include_once($rootPath . '/header.php'); +// Assuming you have the user ID stored in the session +if (isset($_SESSION['user_id'])) { + $user_id = $_SESSION['user_id']; +} else { + header('Location: login.php'); + exit(); // Stop further script execution +} +?> + + + 'index.php']]; - require_once('components/banner.php'); -?> - - - -
    - -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    - -
    -
    -

    Signature

    -
    - - -
    -
    - - - - - - - \ No newline at end of file + require_once($rootPath . '/components/banner.php'); +?> + + + +
    + +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    + +
    +
    +

    Signature

    +
    + + +
    +
    + + + + + + + diff --git a/indemnity_waiver.php b/src/pages/other/indemnity_waiver.php similarity index 99% rename from indemnity_waiver.php rename to src/pages/other/indemnity_waiver.php index 39ff5a41..b3db52bc 100644 --- a/indemnity_waiver.php +++ b/src/pages/other/indemnity_waiver.php @@ -1,20 +1,20 @@ -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    \ No newline at end of file diff --git a/index2.php b/src/pages/other/index2.php similarity index 95% rename from index2.php rename to src/pages/other/index2.php index 2cf8f3fd..f92c630b 100644 --- a/index2.php +++ b/src/pages/other/index2.php @@ -1,804 +1,804 @@ prepare("SELECT user_id FROM membership_application WHERE user_id = ? AND accept_indemnity = 0 LIMIT 1"); - $stmt->bind_param("i", $userId); - $stmt->execute(); - $stmt->store_result(); - - if ($stmt->num_rows > 0) { - $indemnityPending = true; - } - - $stmt->close(); -} - -?> - - -
    -
    -
    -
    - Logo -

    - Welcome to
    the Four Wheel Drive Club
    of Southern Africa -

    - - Become a Member - - -
    -
    -
    -
    - - - - - 0) { ?> -
    -
    -
    -
    -
    -

    Discover Africa's Treasures with 4WDCSA

    -

    Join us on the following trips:

    -
    -
    -
    -
    - query($sql); - - if ($result->num_rows > 0) { - // Loop through each row - while ($row = $result->fetch_assoc()) { - $trip_id = $row['trip_id']; - $trip_name = $row['trip_name']; - $location = $row['location']; - $short_description = $row['short_description']; - $start_date = $row['start_date']; - $end_date = $row['end_date']; - $capacity = $row['vehicle_capacity']; - $cost_members = $row['cost_members']; - $places_booked = $row['places_booked']; - $remaining_places = $capacity - $places_booked; - - // Determine the badge text based on the status - $badge_text = ($remaining_places > 0) ? $remaining_places . ' PLACES LEFT!!' : 'FULLY BOOKED'; - echo ' -
    -
    -
    - ' . $trip_name . ' -
    -
    - ' . $location . ' -
    ' . $trip_name . '
    - ' . convertDate($start_date) . ' - ' . convertDate($end_date) . '
    - ' . calculateDaysAndNights($start_date, $end_date) . ' -
    - -
    -
    '; - } - } else { - echo "No trips available."; - } - ?> - -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    -

    Become a member of 4WDCSA

    -

    Sign up for an annual membership and receive:

    -
      -
    • Year round access to BASE4
    • -
    • FREE Camping at BASE4
    • -
    • Up to 95% Discount on Training Courses
    • -
    • Exclusive Member discounts for all trips and events
    • -
    • ... and many more!
    • -
    -
    -

    We go above and beyond to make your travel dreams reality hidden gems and must-see - attractions

    - - - Become A Member - - -
    -
    -
    -
    - - About -
    -
    -
    -
    -
    - - -
    -
    -

    Loading countdown...

    - - Find out more! - - -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    -

    BASE 4: The home of 4WDCSA.

    -

    Situated near the Hennops river, in Doornrandjie, Centurion.

    -
    - Hotel -
    - -
    - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    Club House
    -

    We are currently in the process of building a new club house since the previous club house tragically burnt down in November of 2024. -

    -
    -
    -
    -
    -
    -
    4x4 Training Track
    -

    Test your offroad driving skills on our training track with many obstacles - from rocky climbs, daring axle twisters, log bridge, side slopes and more! -

    -
    -
    -
    -
    -
    -
    -
    -
    24/7 Camping
    -

    Pristene Camping grounds situated next to a stream, with ablutions, lapa and - communal fire pits.

    - -
    -
    -
    -
    -
    -
    Swimming pool & Braai areas
    -

    Unwind with a refreshing dip in our crystal-clear swimming pool or gather around the braai area for good food and great company

    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - -
    -
    -
    -
    -
    -

    Driver Training Courses

    -

    Discover the in's and out's of your Four Wheel Drive with one of our dedicated training - courses:

    -
    -
    -
    -
    -
    -
    -
    - - - Hotel -
    -
    - BASE4, Hennops -
    Basic 4X4 Driver Training
    -
      -
    • Master Off-Road Confidence
    • -
    • Hands-On Training
    • -
    • Safety First
    • - -
    - -
    -
    -
    -
    -
    -
    - - - Hotel -
    -
    - BASE4, Hennops -
    Bush Mechanics Course
    -
      -
    • Fix Your Vehicle in the Wild
    • -
    • Survival Skills for Off-Roaders
    • -
    • Hands-On Experience
    • - -
    - -
    -
    -
    -
    -
    -
    - BASE4, Hennops -
    Rescue & Recovery Course
    -
      -
    • Master Advanced Recovery Techniques
    • -
    • Gain Confidence in High-Stress Situations
    • -
    • Teamwork and Communication
    • - -
    - -
    -
    - - - Hotel -
    -
    -
    - -
    -
    - - -
    - - - - - - - - -
    -
    -
    -
    -
    -

    Read about our past trips and events

    -
    -
    -
    -
    - query($sql); - - if ($result->num_rows > 0) { - // Loop through each row - while ($row = $result->fetch_assoc()) { - $blog_id = $row['blog_id']; - $blog_title = $row['title']; - $blog_date = $row['date']; - $blog_category = $row['category']; - $blog_image = $row['image']; - $blog_description = $row['description']; - $blog_author = $row['author']; - $members_only = $row['members_only']; - if ($members_only) { - if (!isset($_SESSION['user_id'])) { - $blog_link = "login.php"; - $button_hover = "Members Only"; - $icon = "fa-lock"; - } else { - if (getUserMemberStatus($_SESSION['user_id'])) { - $blog_link = $row['link']; - $button_hover = "Read More"; - $icon = "fa-arrow-right"; - } else { - $blog_link = "membership.php"; - $button_hover = "Members Only"; - $icon = "fa-lock"; - } - } - } else { - $blog_link = $row['link']; - $button_hover = "Read More"; - $icon = "fa-arrow-right"; - } - - - - echo ' -
    -
    -
    - ' . $blog_category . ' -
    ' . $blog_title . '
    - -
    -
    - Blog List -
    - - Read More - - -
    -
    '; - } - // Close connection - $conn->close(); - } ?> -
    -
    -
    - - -
    - - - -
    -
    - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +$indemnityPending = false; + +if (isset($_SESSION['user_id'])) { + $userId = $_SESSION['user_id']; + $stmt = $conn->prepare("SELECT user_id FROM membership_application WHERE user_id = ? AND accept_indemnity = 0 LIMIT 1"); + $stmt->bind_param("i", $userId); + $stmt->execute(); + $stmt->store_result(); + + if ($stmt->num_rows > 0) { + $indemnityPending = true; + } + + $stmt->close(); +} + +?> + + +
    +
    +
    +
    + Logo +

    + Welcome to
    the Four Wheel Drive Club
    of Southern Africa +

    + + Become a Member + + +
    +
    +
    +
    + + + + + 0) { ?> +
    +
    +
    +
    +
    +

    Discover Africa's Treasures with 4WDCSA

    +

    Join us on the following trips:

    +
    +
    +
    +
    + query($sql); + + if ($result->num_rows > 0) { + // Loop through each row + while ($row = $result->fetch_assoc()) { + $trip_id = $row['trip_id']; + $trip_name = $row['trip_name']; + $location = $row['location']; + $short_description = $row['short_description']; + $start_date = $row['start_date']; + $end_date = $row['end_date']; + $capacity = $row['vehicle_capacity']; + $cost_members = $row['cost_members']; + $places_booked = $row['places_booked']; + $remaining_places = $capacity - $places_booked; + + // Determine the badge text based on the status + $badge_text = ($remaining_places > 0) ? $remaining_places . ' PLACES LEFT!!' : 'FULLY BOOKED'; + echo ' +
    +
    +
    + ' . $trip_name . ' +
    +
    + ' . $location . ' +
    ' . $trip_name . '
    + ' . convertDate($start_date) . ' - ' . convertDate($end_date) . '
    + ' . calculateDaysAndNights($start_date, $end_date) . ' +
    + +
    +
    '; + } + } else { + echo "No trips available."; + } + ?> + +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +

    Become a member of 4WDCSA

    +

    Sign up for an annual membership and receive:

    +
      +
    • Year round access to BASE4
    • +
    • FREE Camping at BASE4
    • +
    • Up to 95% Discount on Training Courses
    • +
    • Exclusive Member discounts for all trips and events
    • +
    • ... and many more!
    • +
    +
    +

    We go above and beyond to make your travel dreams reality hidden gems and must-see + attractions

    + + + Become A Member + + +
    +
    +
    +
    + + About +
    +
    +
    +
    +
    + + +
    +
    +

    Loading countdown...

    + + Find out more! + + +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +

    BASE 4: The home of 4WDCSA.

    +

    Situated near the Hennops river, in Doornrandjie, Centurion.

    +
    + Hotel +
    + +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    Club House
    +

    We are currently in the process of building a new club house since the previous club house tragically burnt down in November of 2024. +

    +
    +
    +
    +
    +
    +
    4x4 Training Track
    +

    Test your offroad driving skills on our training track with many obstacles + from rocky climbs, daring axle twisters, log bridge, side slopes and more! +

    +
    +
    +
    +
    +
    +
    +
    +
    24/7 Camping
    +

    Pristene Camping grounds situated next to a stream, with ablutions, lapa and + communal fire pits.

    + +
    +
    +
    +
    +
    +
    Swimming pool & Braai areas
    +

    Unwind with a refreshing dip in our crystal-clear swimming pool or gather around the braai area for good food and great company

    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    +
    +
    +
    +
    +

    Driver Training Courses

    +

    Discover the in's and out's of your Four Wheel Drive with one of our dedicated training + courses:

    +
    +
    +
    +
    +
    +
    +
    + + + Hotel +
    +
    + BASE4, Hennops +
    Basic 4X4 Driver Training
    +
      +
    • Master Off-Road Confidence
    • +
    • Hands-On Training
    • +
    • Safety First
    • + +
    + +
    +
    +
    +
    +
    +
    + + + Hotel +
    +
    + BASE4, Hennops +
    Bush Mechanics Course
    +
      +
    • Fix Your Vehicle in the Wild
    • +
    • Survival Skills for Off-Roaders
    • +
    • Hands-On Experience
    • + +
    + +
    +
    +
    +
    +
    +
    + BASE4, Hennops +
    Rescue & Recovery Course
    +
      +
    • Master Advanced Recovery Techniques
    • +
    • Gain Confidence in High-Stress Situations
    • +
    • Teamwork and Communication
    • + +
    + +
    +
    + + + Hotel +
    +
    +
    + +
    +
    + + +
    + + + + + + + + +
    +
    +
    +
    +
    +

    Read about our past trips and events

    +
    +
    +
    +
    + query($sql); + + if ($result->num_rows > 0) { + // Loop through each row + while ($row = $result->fetch_assoc()) { + $blog_id = $row['blog_id']; + $blog_title = $row['title']; + $blog_date = $row['date']; + $blog_category = $row['category']; + $blog_image = $row['image']; + $blog_description = $row['description']; + $blog_author = $row['author']; + $members_only = $row['members_only']; + if ($members_only) { + if (!isset($_SESSION['user_id'])) { + $blog_link = "login.php"; + $button_hover = "Members Only"; + $icon = "fa-lock"; + } else { + if (getUserMemberStatus($_SESSION['user_id'])) { + $blog_link = $row['link']; + $button_hover = "Read More"; + $icon = "fa-arrow-right"; + } else { + $blog_link = "membership.php"; + $button_hover = "Members Only"; + $icon = "fa-lock"; + } + } + } else { + $blog_link = $row['link']; + $button_hover = "Read More"; + $icon = "fa-arrow-right"; + } + + + + echo ' +
    +
    +
    + ' . $blog_category . ' +
    ' . $blog_title . '
    + +
    +
    + Blog List +
    + + Read More + + +
    +
    '; + } + // Close connection + $conn->close(); + } ?> +
    +
    +
    + + +
    + + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/logos.php b/src/pages/other/logos.php similarity index 97% rename from logos.php rename to src/pages/other/logos.php index 1304cab8..70d1cbac 100644 --- a/logos.php +++ b/src/pages/other/logos.php @@ -1,14 +1,14 @@ -
    -
    - - Sponsor logo -
    "; - } - ?> -
    +
    +
    + + Sponsor logo +
    "; + } + ?> +
    \ No newline at end of file diff --git a/modal.php b/src/pages/other/modal.php similarity index 94% rename from modal.php rename to src/pages/other/modal.php index 22047748..f2d16d56 100644 --- a/modal.php +++ b/src/pages/other/modal.php @@ -1,91 +1,91 @@ - - - - - - - - Modal with AJAX Dropdown - - - - - - -
    - - -
    - - - - - - - - + + + + + + + + Modal with AJAX Dropdown + + + + + + +
    + + +
    + + + + + + + + diff --git a/privacy_policy.php b/src/pages/other/privacy_policy.php similarity index 99% rename from privacy_policy.php rename to src/pages/other/privacy_policy.php index 400e7e7d..4a655144 100644 --- a/privacy_policy.php +++ b/src/pages/other/privacy_policy.php @@ -1,831 +1,831 @@ - - - - - - -
    -
    -
    - - -
    - - - -
    -
    - - -

    PRIVACY POLICY

    -
    - -
    -
    Last updated April 10, 2025
    -

    -

    -

    -
    This Privacy Notice for The Four Wheel Drive Club of Southern Africa - ('we', 'us', or 'our'), describes how and why we might access, collect, store, use, and/or share ('process') your personal information when you use our services ('Services'), including when you: - -
    -
      -
    • Visit our website at - http://www.4wdcsa.co.za - - , or any website of ours that links to this Privacy Notice -
    • -
    -
    - - - - -
    - - - -
    - -
    -
      -
    • Engage with us in other related ways, including any sales, marketing, or events - -
    • -
    -
    Questions or concerns? Reading this Privacy Notice will help you understand your privacy rights and choices. We are responsible for making decisions about how your personal information is processed. If you do not agree with our policies and practices, please do not use our Services. If you still have any questions or concerns, please contact us at info@4wdcsa.co.za.
    -

    -

    -
    -

    SUMMARY OF KEY POINTS

    -
    -
    This summary provides key points from our Privacy Notice, but you can find out more details about any of these topics by clicking the link following each key point or by using our table of contents below to find the section you are looking for.
    -

    -
    What personal information do we process? When you visit, use, or navigate our Services, we may process personal information depending on how you interact with us and the Services, the choices you make, and the products and features you use. Learn more about personal information you disclose to us.
    -

    -
    Do we process any sensitive personal information? Some of the information may be considered 'special' or 'sensitive' in certain jurisdictions, for example your racial or ethnic origins, sexual orientation, and religious beliefs. We do not process sensitive personal information.
    -

    -
    Do we collect any information from third parties? - We do not collect any information from third parties. -
    -

    -
    How do we process your information? We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent. We process your information only when we have a valid legal reason to do so. Learn more about how we process your information.
    -

    -
    In what situations and with which parties do we share personal information? We may share information in specific situations and with specific third parties. Learn more about when and with whom we share your personal information.
    -

    -
    How do we keep your information safe? We have adequate organisational and technical processes and procedures in place to protect your personal information. However, no electronic transmission over the internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorised third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Learn more about how we keep your information safe. - -
    -

    -
    What are your rights? Depending on where you are located geographically, the applicable privacy law may mean you have certain rights regarding your personal information. Learn more about your privacy rights.
    -

    -
    How do you exercise your rights? The easiest way to exercise your rights is by submitting a data subject access request - , or by contacting us. We will consider and act upon any request in accordance with applicable data protection laws. -
    -

    -
    Want to learn more about what we do with any information we collect? Review the Privacy Notice in full.
    -

    -

    -
    -

    TABLE OF CONTENTS

    -
    - - - - -
    - -
    - - - - - - - -
    - - - - - - - - - - -
    - - - -

    -

    -
    -

    1. WHAT INFORMATION DO WE COLLECT?

    -
    -

    Personal information you disclose to us

    -
    In Short: We collect personal information that you provide to us.
    -

    -
    We collect personal information that you voluntarily provide to us when you - - register on the Services,  - - express an interest in obtaining information about us or our products and Services, when you participate in activities on the Services, or otherwise when you contact us.
    -

    -
    - -
    -
    Personal Information Provided by You. The personal information that we collect depends on the context of your interactions with us and the Services, the choices you make, and the products and features you use. The personal information we collect may include the following: - -
    -
      -
    • - names -
    • -
    -
    - -
    -
      -
    • - phone numbers -
    • -
    -
    - -
    -
      -
    • - email addresses -
    • -
    -
    - -
    -
      -
    • - mailing addresses -
    • -
    -
    - -
    -
      -
    • - usernames -
    • -
    -
    - -
    -
      -
    • - passwords -
    • -
    -
    - -
    -
      -
    • - job titles -
    • -
    -
    - -
    -
      -
    • - contact preferences -
    • -
    -
    - -
    -
      -
    • - contact or authentication data -
    • -
    -
    - - - -
    -
    Sensitive Information. - We do not process sensitive information. -
    -

    -
    - - - - - -
    -
    Social Media Login Data. We may provide you with the option to register with us using your existing social media account details, like your Facebook, X, or other social media account. If you choose to register in this way, we will collect certain profile information about you from the social media provider, as described in the section called 'HOW DO WE HANDLE YOUR SOCIAL LOGINS? - ' below. -
    -

    -
    - - - - - -
    -
    All personal information that you provide to us must be true, complete, and accurate, and you must notify us of any changes to such personal information.
    -
    - - - - -
    -
    -

    Google API

    -
    Our use of information received from Google APIs will adhere to 
    Google API Services User Data Policy, including the Limited Use requirements.
    -

    -
    - - - - - - - -
    -

    -
    -

    2. HOW DO WE PROCESS YOUR INFORMATION?

    -
    In Short: We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent.
    -

    -
    We process your personal information for a variety of reasons, depending on how you interact with our Services, including: - -
    -
      -
    • To facilitate account creation and authentication and otherwise manage user accounts. We may process your information so you can create and log in to your account, as well as keep your account in working order. - -
    • -
    -
    - -
    -
      -
    • To deliver and facilitate delivery of services to the user. We may process your information to provide you with the requested service. - -
    • -
    -
    - - - -
    - -
    -
      -
    • To respond to user inquiries/offer support to users. We may process your information to respond to your inquiries and solve any potential issues you might have with the requested service. - -
    • -
    -
    - - - -
    - -
    -
      -
    • To send administrative information to you. We may process your information to send you details about our products and services, changes to our terms and policies, and other similar information. - -
    • -
    -
    - - -
    - -
    -
      -
    • To fulfil and manage your orders. We may process your information to fulfil and manage your orders, payments, returns, and exchanges made through the Services. - -
    • -
    -
    - - - -

    - - -

    - - -

    - - -

    - - -

    - -
    -
      -
    • To send you marketing and promotional communications. We may process the personal information you send to us for our marketing purposes, if this is in accordance with your marketing preferences. You can opt out of our marketing emails at any time. For more information, see 'WHAT ARE YOUR PRIVACY RIGHTS? - ' below. - - -
    • -
    -
    - - -
    - - -
    - - - -
    - - -
    - - - -
    - - - -
    - - - -
    - - - -
    - - - -
    - - - -
    - - -
    - - -
    - -
    -
      -
    • To comply with our legal obligations. We may process your information to comply with our legal obligations, respond to legal requests, and exercise, establish, or defend our legal rights.
    • -
    -
    - - - -
    - - - - -
    -

    -
    -

    3. WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?

    -
    In Short: We may share information in specific situations described in this section and/or with the following third parties.
    -
    - -
    -

    -
    We may need to share your personal information in the following situations:
    -
      -
    • Business Transfers. We may share or transfer your information in connection with, or during negotiations of, any merger, sale of company assets, financing, or acquisition of all or a portion of our business to another company.
    • -
    -
    - -
    -
      -
    • When we use Google Maps Platform APIs. We may share your information with certain Google Maps Platform APIs (e.g. Google Maps API, Places API). - Google Maps uses GPS, Wi-Fi, and cell towers to estimate your location. GPS is accurate to about 20 meters, while Wi-Fi and cell towers help improve accuracy when GPS signals are weak, like indoors. This data helps Google Maps provide directions, but it is not always perfectly precise. - - -
    • -
    -
    - - - -
    - - - -
    - - -
    - - - -
    - - - - - -
    -

    -
    -

    4. DO WE USE COOKIES AND OTHER TRACKING TECHNOLOGIES?

    -
    In Short: We may use cookies and other tracking technologies to collect and store your information.
    -

    -
    We may use cookies and similar tracking technologies (like web beacons and pixels) to gather information when you interact with our Services. Some online tracking technologies help us maintain the security of our Services and your account, prevent crashes, fix bugs, save your preferences, and assist with basic site functions.
    -

    -
    We also permit third parties and service providers to use online tracking technologies on our Services for analytics and advertising, including to help manage and display advertisements, to tailor advertisements to your interests, or to send abandoned shopping cart reminders (depending on your communication preferences). The third parties and service providers use their technology to provide advertising about products and services tailored to your interests which may appear either on our Services or on other websites. - -
    -

    -
    Specific information about how we use such technologies and how you can refuse certain cookies is set out in our Cookie Notice - . - - - - - - - - -
    -

    -
    -

    5. HOW DO WE HANDLE YOUR SOCIAL LOGINS?

    -
    In Short: If you choose to register or log in to our Services using a social media account, we may have access to certain information about you.
    -

    -
    Our Services offer you the ability to register and log in using your third-party social media account details (like your Facebook or X logins). Where you choose to do this, we will receive certain profile information about you from your social media provider. The profile information we receive may vary depending on the social media provider concerned, but will often include your name, email address, friends list, and profile picture, as well as other information you choose to make public on such a social media platform. - -
    -

    -
    We will use the information we receive only for the purposes that are described in this Privacy Notice or that are otherwise made clear to you on the relevant Services. Please note that we do not control, and are not responsible for, other uses of your personal information by your third-party social media provider. We recommend that you review their privacy notice to understand how they collect, use, and share your personal information, and how you can set your privacy preferences on their sites and apps. - - - - - -
    -

    -
    -

    6. HOW LONG DO WE KEEP YOUR INFORMATION?

    -
    In Short: We keep your information for as long as necessary to fulfil the purposes outlined in this Privacy Notice unless otherwise required by law.
    -

    -
    We will only keep your personal information for as long as it is necessary for the purposes set out in this Privacy Notice, unless a longer retention period is required or permitted by law (such as tax, accounting, or other legal requirements). No purpose in this notice will require us keeping your personal information for longer than - - - the period of time in which users have an account with us - - . -
    -

    -
    When we have no ongoing legitimate business need to process your personal information, we will either delete or anonymise such information, or, if this is not possible (for example, because your personal information has been stored in backup archives), then we will securely store your personal information and isolate it from any further processing until deletion is possible. - -
    -

    -
    -

    7. HOW DO WE KEEP YOUR INFORMATION SAFE?

    -
    In Short: We aim to protect your personal information through a system of organisational and technical security measures.
    -

    -
    We have implemented appropriate and reasonable technical and organisational security measures designed to protect the security of any personal information we process. However, despite our safeguards and efforts to secure your information, no electronic transmission over the Internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorised third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Although we will do our best to protect your personal information, transmission of personal information to and from our Services is at your own risk. You should only access the Services within a secure environment. - - - -
    -

    -
    -

    8. DO WE COLLECT INFORMATION FROM MINORS?

    -
    In Short: We do not knowingly collect data from or market to children under 18 years of age. - -
    -

    -
    We do not knowingly collect, solicit data from, or market to children under 18 years of age, nor do we knowingly sell such personal information. By using the Services, you represent that you are at least 18 or that you are the parent or guardian of such a minor and consent to such minor dependent’s use of the Services. If we learn that personal information from users less than 18 years of age has been collected, we will deactivate the account and take reasonable measures to promptly delete such data from our records. If you become aware of any data we may have collected from children under age 18, please contact us at - - info@4wdcsa.co.za - - . - - -
    -

    -
    -

    9. WHAT ARE YOUR PRIVACY RIGHTS?

    -
    In Short:  - -  You may review, change, or terminate your account at any time, depending on your country, province, or state of residence. - - -
    -

    -
    Withdrawing your consent: If we are relying on your consent to process your personal information, which may be express and/or implied consent depending on the applicable law, you have the right to withdraw your consent at any time. You can withdraw your consent at any time by contacting us by using the contact details provided in the section 'HOW CAN YOU CONTACT US ABOUT THIS NOTICE? - ' below. -
    -

    -
    However, please note that this will not affect the lawfulness of the processing before its withdrawal nor, when applicable law allows, will it affect the processing of your personal information conducted in reliance on lawful processing grounds other than consent.
    -

    -
    Opting out of marketing and promotional communications: You can unsubscribe from our marketing and promotional communications at any time by clicking on the unsubscribe link in the emails that we send, - - or by contacting us using the details provided in the section ' - HOW CAN YOU CONTACT US ABOUT THIS NOTICE? - ' below. You will then be removed from the marketing lists. However, we may still communicate with you — for example, to send you service-related messages that are necessary for the administration and use of your account, to respond to service requests, or for other non-marketing purposes. - - - - - -

    Account Information

    -
    If you would at any time like to review or change the information in your account or terminate your account, you can: -
    -
      -
    • - Log in to your account settings and update your user account. -
    • -
    -
    - -
    -
      -
    • - Contact us using the contact information provided. -
    • -
    -
    - -
    -
    Upon your request to terminate your account, we will deactivate or delete your account and information from our active databases. However, we may retain some information in our files to prevent fraud, troubleshoot problems, assist with any investigations, enforce our legal terms and/or comply with applicable legal requirements. - - - -
    -

    -
    Cookies and similar technologies: Most Web browsers are set to accept cookies by default. If you prefer, you can usually choose to set your browser to remove cookies and to reject cookies. If you choose to remove cookies or reject cookies, this could affect certain features or services of our Services. - - - - - -
    -

    -
    If you have questions or comments about your privacy rights, you may email us at info@4wdcsa.co.za. - -
    -

    -
    -

    10. CONTROLS FOR DO-NOT-TRACK FEATURES

    -
    Most web browsers and some mobile operating systems and mobile applications include a Do-Not-Track ('DNT') feature or setting you can activate to signal your privacy preference not to have data about your online browsing activities monitored and collected. At this stage, no uniform technology standard for recognising and implementing DNT signals has been finalised. As such, we do not currently respond to DNT browser signals or any other mechanism that automatically communicates your choice not to be tracked online. If a standard for online tracking is adopted that we must follow in the future, we will inform you about that practice in a revised version of this Privacy Notice. - -
    -
    - - - - -
    -

    -
    -

    11. DO OTHER REGIONS HAVE SPECIFIC PRIVACY RIGHTS?

    -
    In Short: You may have additional rights based on the country you reside in. - - - -

    Republic of South Africa

    -
    At any time, you have the right to request access to or correction of your personal information. You can make such a request by contacting us by using the contact details provided in the section '
    HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU? - ' - -
    -

    -
    If you are unsatisfied with the manner in which we address any complaint with regard to our processing of personal information, you can contact the office of the regulator, the details of which are:
    -

    - -
    General enquiries: enquiries@inforegulator.org.za
    -
    Complaints (complete POPIA/PAIA form 5): PAIAComplaints@inforegulator.org.za & POPIAComplaints@inforegulator.org.za - - - - -
    -

    -
    -

    12. DO WE MAKE UPDATES TO THIS NOTICE?

    -
    In Short: Yes, we will update this notice as necessary to stay compliant with relevant laws.
    -

    -
    We may update this Privacy Notice from time to time. The updated version will be indicated by an updated 'Revised' date at the top of this Privacy Notice. If we make material changes to this Privacy Notice, we may notify you either by prominently posting a notice of such changes or by directly sending you a notification. We encourage you to review this Privacy Notice frequently to be informed of how we are protecting your information.
    -

    -
    -

    13. HOW CAN YOU CONTACT US ABOUT THIS NOTICE?

    -
    If you have questions or comments about this notice, you may - - contact our Data Protection Officer (DPO) by email at  - info@4wdcsa.co.za - , by phone at 079 065 2795, - - - or - - contact us by post at: -
    -

    -
    - The Four Wheel Drive Club of Southern Africa - - -
    -
    Data Protection Officer - - - -
    -
    - Plot 50 Gemstone Rd, Doornrandje - - -
    -
    - Centurion - , Gauteng - - - - 0157 - - - - - -
    -
    - - - South Africa - - - - - - - - - - - - - - - - - -
    -

    -
    -

    14. HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU?

    -
    - Based on the applicable laws of your country, you may - have the right to request access to the personal information we collect from you, details about how we have processed it, correct inaccuracies, or delete your personal information. You may also have the right to withdraw your consent to our processing of your personal information. These rights may be limited in some circumstances by applicable law. To request to review, update, or delete your personal information, please fill out and submit a  - data subject access request - - .
    - -
    - -
    - - -
    -
    -
    -
    - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +?> + + + + + + +
    +
    +
    + + +
    + + + +
    +
    + + +

    PRIVACY POLICY

    +
    + +
    +
    Last updated April 10, 2025
    +

    +

    +

    +
    This Privacy Notice for The Four Wheel Drive Club of Southern Africa + ('we', 'us', or 'our'), describes how and why we might access, collect, store, use, and/or share ('process') your personal information when you use our services ('Services'), including when you: + +
    +
      +
    • Visit our website at + http://www.4wdcsa.co.za + + , or any website of ours that links to this Privacy Notice +
    • +
    +
    + + + + +
    + + + +
    + +
    +
      +
    • Engage with us in other related ways, including any sales, marketing, or events + +
    • +
    +
    Questions or concerns? Reading this Privacy Notice will help you understand your privacy rights and choices. We are responsible for making decisions about how your personal information is processed. If you do not agree with our policies and practices, please do not use our Services. If you still have any questions or concerns, please contact us at info@4wdcsa.co.za.
    +

    +

    +
    +

    SUMMARY OF KEY POINTS

    +
    +
    This summary provides key points from our Privacy Notice, but you can find out more details about any of these topics by clicking the link following each key point or by using our table of contents below to find the section you are looking for.
    +

    +
    What personal information do we process? When you visit, use, or navigate our Services, we may process personal information depending on how you interact with us and the Services, the choices you make, and the products and features you use. Learn more about personal information you disclose to us.
    +

    +
    Do we process any sensitive personal information? Some of the information may be considered 'special' or 'sensitive' in certain jurisdictions, for example your racial or ethnic origins, sexual orientation, and religious beliefs. We do not process sensitive personal information.
    +

    +
    Do we collect any information from third parties? + We do not collect any information from third parties. +
    +

    +
    How do we process your information? We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent. We process your information only when we have a valid legal reason to do so. Learn more about how we process your information.
    +

    +
    In what situations and with which parties do we share personal information? We may share information in specific situations and with specific third parties. Learn more about when and with whom we share your personal information.
    +

    +
    How do we keep your information safe? We have adequate organisational and technical processes and procedures in place to protect your personal information. However, no electronic transmission over the internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorised third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Learn more about how we keep your information safe. + +
    +

    +
    What are your rights? Depending on where you are located geographically, the applicable privacy law may mean you have certain rights regarding your personal information. Learn more about your privacy rights.
    +

    +
    How do you exercise your rights? The easiest way to exercise your rights is by submitting a data subject access request + , or by contacting us. We will consider and act upon any request in accordance with applicable data protection laws. +
    +

    +
    Want to learn more about what we do with any information we collect? Review the Privacy Notice in full.
    +

    +

    +
    +

    TABLE OF CONTENTS

    +
    + + + + +
    + +
    + + + + + + + +
    + + + + + + + + + + +
    + + + +

    +

    +
    +

    1. WHAT INFORMATION DO WE COLLECT?

    +
    +

    Personal information you disclose to us

    +
    In Short: We collect personal information that you provide to us.
    +

    +
    We collect personal information that you voluntarily provide to us when you + + register on the Services,  + + express an interest in obtaining information about us or our products and Services, when you participate in activities on the Services, or otherwise when you contact us.
    +

    +
    + +
    +
    Personal Information Provided by You. The personal information that we collect depends on the context of your interactions with us and the Services, the choices you make, and the products and features you use. The personal information we collect may include the following: + +
    +
      +
    • + names +
    • +
    +
    + +
    +
      +
    • + phone numbers +
    • +
    +
    + +
    +
      +
    • + email addresses +
    • +
    +
    + +
    +
      +
    • + mailing addresses +
    • +
    +
    + +
    +
      +
    • + usernames +
    • +
    +
    + +
    +
      +
    • + passwords +
    • +
    +
    + +
    +
      +
    • + job titles +
    • +
    +
    + +
    +
      +
    • + contact preferences +
    • +
    +
    + +
    +
      +
    • + contact or authentication data +
    • +
    +
    + + + +
    +
    Sensitive Information. + We do not process sensitive information. +
    +

    +
    + + + + + +
    +
    Social Media Login Data. We may provide you with the option to register with us using your existing social media account details, like your Facebook, X, or other social media account. If you choose to register in this way, we will collect certain profile information about you from the social media provider, as described in the section called 'HOW DO WE HANDLE YOUR SOCIAL LOGINS? + ' below. +
    +

    +
    + + + + + +
    +
    All personal information that you provide to us must be true, complete, and accurate, and you must notify us of any changes to such personal information.
    +
    + + + + +
    +
    +

    Google API

    +
    Our use of information received from Google APIs will adhere to 
    Google API Services User Data Policy, including the Limited Use requirements.
    +

    +
    + + + + + + + +
    +

    +
    +

    2. HOW DO WE PROCESS YOUR INFORMATION?

    +
    In Short: We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent.
    +

    +
    We process your personal information for a variety of reasons, depending on how you interact with our Services, including: + +
    +
      +
    • To facilitate account creation and authentication and otherwise manage user accounts. We may process your information so you can create and log in to your account, as well as keep your account in working order. + +
    • +
    +
    + +
    +
      +
    • To deliver and facilitate delivery of services to the user. We may process your information to provide you with the requested service. + +
    • +
    +
    + + + +
    + +
    +
      +
    • To respond to user inquiries/offer support to users. We may process your information to respond to your inquiries and solve any potential issues you might have with the requested service. + +
    • +
    +
    + + + +
    + +
    +
      +
    • To send administrative information to you. We may process your information to send you details about our products and services, changes to our terms and policies, and other similar information. + +
    • +
    +
    + + +
    + +
    +
      +
    • To fulfil and manage your orders. We may process your information to fulfil and manage your orders, payments, returns, and exchanges made through the Services. + +
    • +
    +
    + + + +

    + + +

    + + +

    + + +

    + + +

    + +
    +
      +
    • To send you marketing and promotional communications. We may process the personal information you send to us for our marketing purposes, if this is in accordance with your marketing preferences. You can opt out of our marketing emails at any time. For more information, see 'WHAT ARE YOUR PRIVACY RIGHTS? + ' below. + + +
    • +
    +
    + + +
    + + +
    + + + +
    + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + +
    + + +
    + +
    +
      +
    • To comply with our legal obligations. We may process your information to comply with our legal obligations, respond to legal requests, and exercise, establish, or defend our legal rights.
    • +
    +
    + + + +
    + + + + +
    +

    +
    +

    3. WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?

    +
    In Short: We may share information in specific situations described in this section and/or with the following third parties.
    +
    + +
    +

    +
    We may need to share your personal information in the following situations:
    +
      +
    • Business Transfers. We may share or transfer your information in connection with, or during negotiations of, any merger, sale of company assets, financing, or acquisition of all or a portion of our business to another company.
    • +
    +
    + +
    +
      +
    • When we use Google Maps Platform APIs. We may share your information with certain Google Maps Platform APIs (e.g. Google Maps API, Places API). + Google Maps uses GPS, Wi-Fi, and cell towers to estimate your location. GPS is accurate to about 20 meters, while Wi-Fi and cell towers help improve accuracy when GPS signals are weak, like indoors. This data helps Google Maps provide directions, but it is not always perfectly precise. + + +
    • +
    +
    + + + +
    + + + +
    + + +
    + + + +
    + + + + + +
    +

    +
    +

    4. DO WE USE COOKIES AND OTHER TRACKING TECHNOLOGIES?

    +
    In Short: We may use cookies and other tracking technologies to collect and store your information.
    +

    +
    We may use cookies and similar tracking technologies (like web beacons and pixels) to gather information when you interact with our Services. Some online tracking technologies help us maintain the security of our Services and your account, prevent crashes, fix bugs, save your preferences, and assist with basic site functions.
    +

    +
    We also permit third parties and service providers to use online tracking technologies on our Services for analytics and advertising, including to help manage and display advertisements, to tailor advertisements to your interests, or to send abandoned shopping cart reminders (depending on your communication preferences). The third parties and service providers use their technology to provide advertising about products and services tailored to your interests which may appear either on our Services or on other websites. + +
    +

    +
    Specific information about how we use such technologies and how you can refuse certain cookies is set out in our Cookie Notice + . + + + + + + + + +
    +

    +
    +

    5. HOW DO WE HANDLE YOUR SOCIAL LOGINS?

    +
    In Short: If you choose to register or log in to our Services using a social media account, we may have access to certain information about you.
    +

    +
    Our Services offer you the ability to register and log in using your third-party social media account details (like your Facebook or X logins). Where you choose to do this, we will receive certain profile information about you from your social media provider. The profile information we receive may vary depending on the social media provider concerned, but will often include your name, email address, friends list, and profile picture, as well as other information you choose to make public on such a social media platform. + +
    +

    +
    We will use the information we receive only for the purposes that are described in this Privacy Notice or that are otherwise made clear to you on the relevant Services. Please note that we do not control, and are not responsible for, other uses of your personal information by your third-party social media provider. We recommend that you review their privacy notice to understand how they collect, use, and share your personal information, and how you can set your privacy preferences on their sites and apps. + + + + + +
    +

    +
    +

    6. HOW LONG DO WE KEEP YOUR INFORMATION?

    +
    In Short: We keep your information for as long as necessary to fulfil the purposes outlined in this Privacy Notice unless otherwise required by law.
    +

    +
    We will only keep your personal information for as long as it is necessary for the purposes set out in this Privacy Notice, unless a longer retention period is required or permitted by law (such as tax, accounting, or other legal requirements). No purpose in this notice will require us keeping your personal information for longer than + + + the period of time in which users have an account with us + + . +
    +

    +
    When we have no ongoing legitimate business need to process your personal information, we will either delete or anonymise such information, or, if this is not possible (for example, because your personal information has been stored in backup archives), then we will securely store your personal information and isolate it from any further processing until deletion is possible. + +
    +

    +
    +

    7. HOW DO WE KEEP YOUR INFORMATION SAFE?

    +
    In Short: We aim to protect your personal information through a system of organisational and technical security measures.
    +

    +
    We have implemented appropriate and reasonable technical and organisational security measures designed to protect the security of any personal information we process. However, despite our safeguards and efforts to secure your information, no electronic transmission over the Internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorised third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Although we will do our best to protect your personal information, transmission of personal information to and from our Services is at your own risk. You should only access the Services within a secure environment. + + + +
    +

    +
    +

    8. DO WE COLLECT INFORMATION FROM MINORS?

    +
    In Short: We do not knowingly collect data from or market to children under 18 years of age. + +
    +

    +
    We do not knowingly collect, solicit data from, or market to children under 18 years of age, nor do we knowingly sell such personal information. By using the Services, you represent that you are at least 18 or that you are the parent or guardian of such a minor and consent to such minor dependent’s use of the Services. If we learn that personal information from users less than 18 years of age has been collected, we will deactivate the account and take reasonable measures to promptly delete such data from our records. If you become aware of any data we may have collected from children under age 18, please contact us at + + info@4wdcsa.co.za + + . + + +
    +

    +
    +

    9. WHAT ARE YOUR PRIVACY RIGHTS?

    +
    In Short:  + +  You may review, change, or terminate your account at any time, depending on your country, province, or state of residence. + + +
    +

    +
    Withdrawing your consent: If we are relying on your consent to process your personal information, which may be express and/or implied consent depending on the applicable law, you have the right to withdraw your consent at any time. You can withdraw your consent at any time by contacting us by using the contact details provided in the section 'HOW CAN YOU CONTACT US ABOUT THIS NOTICE? + ' below. +
    +

    +
    However, please note that this will not affect the lawfulness of the processing before its withdrawal nor, when applicable law allows, will it affect the processing of your personal information conducted in reliance on lawful processing grounds other than consent.
    +

    +
    Opting out of marketing and promotional communications: You can unsubscribe from our marketing and promotional communications at any time by clicking on the unsubscribe link in the emails that we send, + + or by contacting us using the details provided in the section ' + HOW CAN YOU CONTACT US ABOUT THIS NOTICE? + ' below. You will then be removed from the marketing lists. However, we may still communicate with you — for example, to send you service-related messages that are necessary for the administration and use of your account, to respond to service requests, or for other non-marketing purposes. + + + + + +

    Account Information

    +
    If you would at any time like to review or change the information in your account or terminate your account, you can: +
    +
      +
    • + Log in to your account settings and update your user account. +
    • +
    +
    + +
    +
      +
    • + Contact us using the contact information provided. +
    • +
    +
    + +
    +
    Upon your request to terminate your account, we will deactivate or delete your account and information from our active databases. However, we may retain some information in our files to prevent fraud, troubleshoot problems, assist with any investigations, enforce our legal terms and/or comply with applicable legal requirements. + + + +
    +

    +
    Cookies and similar technologies: Most Web browsers are set to accept cookies by default. If you prefer, you can usually choose to set your browser to remove cookies and to reject cookies. If you choose to remove cookies or reject cookies, this could affect certain features or services of our Services. + + + + + +
    +

    +
    If you have questions or comments about your privacy rights, you may email us at info@4wdcsa.co.za. + +
    +

    +
    +

    10. CONTROLS FOR DO-NOT-TRACK FEATURES

    +
    Most web browsers and some mobile operating systems and mobile applications include a Do-Not-Track ('DNT') feature or setting you can activate to signal your privacy preference not to have data about your online browsing activities monitored and collected. At this stage, no uniform technology standard for recognising and implementing DNT signals has been finalised. As such, we do not currently respond to DNT browser signals or any other mechanism that automatically communicates your choice not to be tracked online. If a standard for online tracking is adopted that we must follow in the future, we will inform you about that practice in a revised version of this Privacy Notice. + +
    +
    + + + + +
    +

    +
    +

    11. DO OTHER REGIONS HAVE SPECIFIC PRIVACY RIGHTS?

    +
    In Short: You may have additional rights based on the country you reside in. + + + +

    Republic of South Africa

    +
    At any time, you have the right to request access to or correction of your personal information. You can make such a request by contacting us by using the contact details provided in the section '
    HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU? + ' + +
    +

    +
    If you are unsatisfied with the manner in which we address any complaint with regard to our processing of personal information, you can contact the office of the regulator, the details of which are:
    +

    + +
    General enquiries: enquiries@inforegulator.org.za
    +
    Complaints (complete POPIA/PAIA form 5): PAIAComplaints@inforegulator.org.za & POPIAComplaints@inforegulator.org.za + + + + +
    +

    +
    +

    12. DO WE MAKE UPDATES TO THIS NOTICE?

    +
    In Short: Yes, we will update this notice as necessary to stay compliant with relevant laws.
    +

    +
    We may update this Privacy Notice from time to time. The updated version will be indicated by an updated 'Revised' date at the top of this Privacy Notice. If we make material changes to this Privacy Notice, we may notify you either by prominently posting a notice of such changes or by directly sending you a notification. We encourage you to review this Privacy Notice frequently to be informed of how we are protecting your information.
    +

    +
    +

    13. HOW CAN YOU CONTACT US ABOUT THIS NOTICE?

    +
    If you have questions or comments about this notice, you may + + contact our Data Protection Officer (DPO) by email at  + info@4wdcsa.co.za + , by phone at 079 065 2795, + + + or + + contact us by post at: +
    +

    +
    + The Four Wheel Drive Club of Southern Africa + + +
    +
    Data Protection Officer + + + +
    +
    + Plot 50 Gemstone Rd, Doornrandje + + +
    +
    + Centurion + , Gauteng + + + + 0157 + + + + + +
    +
    + + + South Africa + + + + + + + + + + + + + + + + + +
    +

    +
    +

    14. HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU?

    +
    + Based on the applicable laws of your country, you may + have the right to request access to the personal information we collect from you, details about how we have processed it, correct inaccuracies, or delete your personal information. You may also have the right to withdraw your consent to our processing of your personal information. These rights may be limited in some circumstances by applicable law. To request to review, update, or delete your personal information, please fill out and submit a  + data subject access request + + .
    + +
    + +
    + + +
    +
    +
    +
    + + + + + + diff --git a/rescue_recovery.php b/src/pages/other/rescue_recovery.php similarity index 97% rename from rescue_recovery.php rename to src/pages/other/rescue_recovery.php index 0bbee5d9..4ec650ac 100644 --- a/rescue_recovery.php +++ b/src/pages/other/rescue_recovery.php @@ -1,316 +1,317 @@ -prepare("SELECT course_id, date FROM courses WHERE course_type = ? AND date >= CURDATE()"); -$course_type = 'rescue_recovery'; -$stmt->bind_param("s", $course_type); -$stmt->execute(); -$result = $stmt->get_result(); -$page_id = 'rescue_recovery'; -?> - - 'index.php']]; - require_once('components/banner.php'); -?> - - -
    -
    -
    -
    -
    -
    -
    - Perview -
    -
    - Perview -
    -
    - Perview -
    -
    - -
    -
    -
    -
    -
    -

    Rescue & Recovery

    -
    - - R /member - R /non-members -

    This is an enjoyable, educational, and informative day. This one-day course is a natural follow-on from our 4x4 driving course and introduces drivers to safe off-road recovery procedures, equipment and also their responsibilities in regards to caring for the environment.

    -
    -
    -
    -
    -
      -
    • - Select Date - -
    • - - Additional Members - - - '; - } ?> - -
    • - Additional Non-Members - -
    • -
    -
    - -
    Total: -
    -
    -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    -
    - - -
    -
    - num_rows == 0) { - $button_text = "No booking dates available"; - $button_disabled = "disabled"; - } - ?> - - -
    -
    - -
    - - -
    -
    -
    - -
    -
    -
    -
    The course introduces and guides participants in the following:
    -
      -
    • Correct selection, size and purchase of equipment such as Shackles, Slings, Chains and Snatch Blocks.
    • -
    • Correct selection of Pull Straps and Kinetic Straps.
    • -
    • Importance of Safety Slings, Safety Blankets and the correct use of Bridles.
    • -
    • - Importance of secondary equipment such as:
    • -
        -
      • Puncture Repair Kits
      • -
      • Tyre Pressure Gauges
      • -
      • Compressors
      • -
      • Fire Extinguishers
      • -
      - -
    - -
    The day also covers the practical instruction in the following:
    -
      -
    • Use of Pull straps and Kinetic Straps
    • -
    • Recovery Points and their importance.
    • -
    • Jacking of vehicles – OEM, High Lift, Bottle Jacks and Scissor Jacks.
    • -
    • Correct use of Winches including the accessories.
    • -
    -
    The day culminates with an impressive demonstration of a kinetic strap failure and the repercussion.
    -

    PLEASE NOTE - Recovery equipment is provided for use by participants during the course. If you already have your own equipment, you are welcome to make use of it during training.

    -

    Please bring your own lunch and refreshments, sun hats and sunblock.

    -
    - -
    -
    -
    What this course includes
    -
      -
    • Rescue & Recovery Manual.
    • -
    • Theory session and discussion.
    • -
    • Spend the afternoon practicing common techniques of advanced rescue and recovery.
    • -
    -
    -
    -
    - Product Details -
    -
    -
    -
    -
    - -
      -
    • Coffee and Welcome: Kick off the day with a warm coffee, meet your instructors, and receive an overview of the course schedule
    • -
    • Theory Session: Dive into the key principles of off-road driving, including vehicle mechanics, terrain navigation, recovery methods, and safety protocols.
    • -
    • Practical Demonstrations: Watch live demonstrations covering vital techniques like gear selection, adjusting tire pressure, and setting up recovery equipment.
    • -
    • Lunch Break: Enjoy a packed lunch or bring something to braai. Fires will be provided for an authentic outdoor experience.
    • -
    • Track Driving and Practical Training: Test your skills with hands-on driving exercises on a custom-built off-road track, learning how to tackle different obstacles and terrain challenges.
    • -
    • Debrief and Certificates: Conclude the day with a review of your progress, feedback from the instructors, and certificates of completion for your off-road training.
    • -
    -
    -
    - -
    -
    -
    -
    - - - - - - - - \ No newline at end of file +prepare("SELECT course_id, date FROM courses WHERE course_type = ? AND date >= CURDATE()"); +$course_type = 'rescue_recovery'; +$stmt->bind_param("s", $course_type); +$stmt->execute(); +$result = $stmt->get_result(); +$page_id = 'rescue_recovery'; +?> + + 'index.php']]; + require_once($rootPath . '/components/banner.php'); +?> + + +
    +
    +
    +
    +
    +
    +
    + Perview +
    +
    + Perview +
    +
    + Perview +
    +
    + +
    +
    +
    +
    +
    +

    Rescue & Recovery

    +
    + + R /member + R /non-members +

    This is an enjoyable, educational, and informative day. This one-day course is a natural follow-on from our 4x4 driving course and introduces drivers to safe off-road recovery procedures, equipment and also their responsibilities in regards to caring for the environment.

    +
    +
    +
    +
    +
      +
    • + Select Date + +
    • + + Additional Members + + + '; + } ?> + +
    • + Additional Non-Members + +
    • +
    +
    + +
    Total: -
    +
    +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    +
    + + +
    +
    + num_rows == 0) { + $button_text = "No booking dates available"; + $button_disabled = "disabled"; + } + ?> + + +
    +
    + +
    + + +
    +
    +
    + +
    +
    +
    +
    The course introduces and guides participants in the following:
    +
      +
    • Correct selection, size and purchase of equipment such as Shackles, Slings, Chains and Snatch Blocks.
    • +
    • Correct selection of Pull Straps and Kinetic Straps.
    • +
    • Importance of Safety Slings, Safety Blankets and the correct use of Bridles.
    • +
    • + Importance of secondary equipment such as:
    • +
        +
      • Puncture Repair Kits
      • +
      • Tyre Pressure Gauges
      • +
      • Compressors
      • +
      • Fire Extinguishers
      • +
      + +
    + +
    The day also covers the practical instruction in the following:
    +
      +
    • Use of Pull straps and Kinetic Straps
    • +
    • Recovery Points and their importance.
    • +
    • Jacking of vehicles – OEM, High Lift, Bottle Jacks and Scissor Jacks.
    • +
    • Correct use of Winches including the accessories.
    • +
    +
    The day culminates with an impressive demonstration of a kinetic strap failure and the repercussion.
    +

    PLEASE NOTE - Recovery equipment is provided for use by participants during the course. If you already have your own equipment, you are welcome to make use of it during training.

    +

    Please bring your own lunch and refreshments, sun hats and sunblock.

    +
    + +
    +
    +
    What this course includes
    +
      +
    • Rescue & Recovery Manual.
    • +
    • Theory session and discussion.
    • +
    • Spend the afternoon practicing common techniques of advanced rescue and recovery.
    • +
    +
    +
    +
    + Product Details +
    +
    +
    +
    +
    + +
      +
    • Coffee and Welcome: Kick off the day with a warm coffee, meet your instructors, and receive an overview of the course schedule
    • +
    • Theory Session: Dive into the key principles of off-road driving, including vehicle mechanics, terrain navigation, recovery methods, and safety protocols.
    • +
    • Practical Demonstrations: Watch live demonstrations covering vital techniques like gear selection, adjusting tire pressure, and setting up recovery equipment.
    • +
    • Lunch Break: Enjoy a packed lunch or bring something to braai. Fires will be provided for an authentic outdoor experience.
    • +
    • Track Driving and Practical Training: Test your skills with hands-on driving exercises on a custom-built off-road track, learning how to tackle different obstacles and terrain challenges.
    • +
    • Debrief and Certificates: Conclude the day with a review of your progress, feedback from the instructors, and certificates of completion for your off-road training.
    • +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + diff --git a/review_box.php b/src/pages/other/review_box.php similarity index 96% rename from review_box.php rename to src/pages/other/review_box.php index 6b01606e..2d1843b3 100644 --- a/review_box.php +++ b/src/pages/other/review_box.php @@ -1,152 +1,152 @@ -real_escape_string(trim($_POST['comment'])); - - if (!empty($comment)) { - $stmt = $conn->prepare("INSERT INTO comments (page_id, user_id, comment) VALUES (?, ?, ?)"); - $stmt->bind_param("sss", $page_id, $user_id, $comment); - if ($stmt->execute()) { - header("Location: " . $_SERVER['REQUEST_URI']); - exit; - } - } -} - -// Fetch comments -$stmt = $conn->prepare("SELECT user_id, comment, created_at FROM comments WHERE page_id = ? ORDER BY created_at DESC"); -$stmt->bind_param("s", $page_id); -$stmt->execute(); -$result = $stmt->get_result(); -?> - -
    -
    Reviews
    -
    - fetch_assoc()): ?> -
    -
    - Author -
    -
    -
    - MEMBER
    '; - } - ?> - - - -

    - -
    -
    - - -
    -
    Add A Review
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/view_indemnity.php b/src/pages/other/view_indemnity.php similarity index 95% rename from view_indemnity.php rename to src/pages/other/view_indemnity.php index 04ee7e49..a0b36927 100644 --- a/view_indemnity.php +++ b/src/pages/other/view_indemnity.php @@ -1,104 +1,104 @@ - - - - - -
    -
    - -
    -
    - - - -
    - -
    -

    INDEMNITY AND WAIVER

    -

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    -

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    -

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    -

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    -

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    -

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    -

    BASE 4 CODE OF CONDUCT

    -

    1. No motorbikes or quadbikes.

    -

    2. No loud music (unless authorised by the Committee or its representatives).

    -

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    -

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    -

    5. No person in the rear of open vehicles when driving on obstacles.

    -

    6. When driving the obstacles stay on the tracks.

    -

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    -

    8. No alcohol to be consumed while driving the track.

    -

    9. No littering (please pick up cigarette butts etc.)

    -

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    -

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    -

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    -
    - -
    -
    -

    Signature

    - Signature -
    -
    - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +// Assuming you have the user ID stored in the session +if (isset($_SESSION['user_id'])) { + $user_id = $_SESSION['user_id']; +} else { + header('Location: login.php'); + exit(); // Stop further script execution +} +?> + + + + + +
    +
    + +
    +
    + + + +
    + +
    +

    INDEMNITY AND WAIVER

    +

    1. I agree to abide by the Code of Conduct as listed below, as well as any reasonable instructions given by any Member of the Committee of the Club, or any person appointed by the Club to organise or control any event (Club Officer).

    +

    2. I acknowledge that driving the off-road track is inherently dangerous, and that I am fully aware of the dangers thereof. I warrant that I will make all members of my party aware of such dangers prior to driving the track.

    +

    3. While I, or any member of my party, enjoy the facilities at Base 4 including overnight camping, picnicking, driving the track, using the swimming pool facility or activity or any other activity while at Base 4, I agree that under no circumstances shall the Club be liable for any loss or damage of any kind whatsoever (including consequential loss) which I or any of my party may suffer, regardless of how such loss or damage may have been caused or sustained, and whether or not as a result of the negligence or breach of contract (whether fundamental or otherwise) or other wrongful act of the Club, or any Club Officer, or any of the Club’s agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.

    +

    4. The expression, ‘member of my party’, means all persons who accompany me or attending any event at my specific invitation, request or suggestion, and includes without limitation, members of family, guests and invitees.

    +

    5. I understand that I am responsible for ensuring my vehicle and equipment and that all members of my party have adequate health and medical insurance to cover any and all likely occurrences.

    +

    6. This indemnity is irrevocable and shall apply to me and the members of my party for any Club events in which I may participate or attend.

    +

    BASE 4 CODE OF CONDUCT

    +

    1. No motorbikes or quadbikes.

    +

    2. No loud music (unless authorised by the Committee or its representatives).

    +

    3. Dogs to be controlled by their owners who take full responsibility for the animal’s behaviour.

    +

    4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.

    +

    5. No person in the rear of open vehicles when driving on obstacles.

    +

    6. When driving the obstacles stay on the tracks.

    +

    7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.

    +

    8. No alcohol to be consumed while driving the track.

    +

    9. No littering (please pick up cigarette butts etc.)

    +

    10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.

    +

    11. Use water sparingly. Please bring your own water and a little extra for the Club.

    +

    I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.

    +
    + +
    +
    +

    Signature

    + Signature +
    +
    + + + + + + diff --git a/add_to_cart.php b/src/pages/shop/add_to_cart.php similarity index 97% rename from add_to_cart.php rename to src/pages/shop/add_to_cart.php index a1b87cac..be1334c4 100644 --- a/add_to_cart.php +++ b/src/pages/shop/add_to_cart.php @@ -1,36 +1,36 @@ - - $item_id, - 'item_name' => $item_name, - 'item_price' => $item_price, - 'user_id' => $user_id - ]; - - echo json_encode(['status' => 'success', 'cart' => $_SESSION['cart']]); -} else { - echo json_encode(['status' => 'error', 'message' => 'Missing required parameters.']); -} -?> + + $item_id, + 'item_name' => $item_name, + 'item_price' => $item_price, + 'user_id' => $user_id + ]; + + echo json_encode(['status' => 'success', 'cart' => $_SESSION['cart']]); +} else { + echo json_encode(['status' => 'error', 'message' => 'Missing required parameters.']); +} +?> diff --git a/bar_tabs.php b/src/pages/shop/bar_tabs.php similarity index 95% rename from bar_tabs.php rename to src/pages/shop/bar_tabs.php index 009712e6..fe3e7a92 100644 --- a/bar_tabs.php +++ b/src/pages/shop/bar_tabs.php @@ -1,485 +1,485 @@ - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - BAR TABS -
    - -
    - - -
    - -
    - - -
    -
    - -
    -
    -
    -
    - - - - -
    -
    - - -
    - -
    - - - - -
    -
    -
    -
    -
    - - - - - - - - \ No newline at end of file +include_once(dirname(dirname(dirname(__DIR__))) . '/header.php'); +checkUserSession(); +$user_id = $_SESSION['user_id']; +unset($_SESSION['cart']); +?> + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    + BAR TABS +
    + +
    + + +
    + +
    + + +
    +
    + +
    +
    +
    +
    + + + + +
    +
    + + +
    + +
    + + + + +
    +
    +
    +
    +
    + + + + + + + + diff --git a/confirm.php b/src/pages/shop/confirm.php similarity index 96% rename from confirm.php rename to src/pages/shop/confirm.php index f1803071..4be2e499 100644 --- a/confirm.php +++ b/src/pages/shop/confirm.php @@ -1,326 +1,326 @@ -prepare($sql); - - if ($stmt) { - // Bind the parameter - $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) - - // Execute the statement - $stmt->execute(); - - // Get the result - $result = $stmt->get_result(); - - // Fetch the order total - if ($row = $result->fetch_assoc()) { - return $row['amount']; - } else { - return 9999.00; // Order not found - } - - // Close the statement - $stmt->close(); - } else { - // Handle the error (you might want to log this or throw an exception) - return null; - } -} - -function getOrderDesc($conn, $payment_id) -{ - // Prepare the SQL statement - $sql = "SELECT description FROM payments WHERE payment_id = ?"; - $stmt = $conn->prepare($sql); - - if ($stmt) { - // Bind the parameter - $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) - - // Execute the statement - $stmt->execute(); - - // Get the result - $result = $stmt->get_result(); - - // Fetch the order total - if ($row = $result->fetch_assoc()) { - return $row['description']; - } else { - return null; // Order not found - } - - // Close the statement - $stmt->close(); - } else { - // Handle the error (you might want to log this or throw an exception) - return null; - } -} - -function getUserIdByPaymentId($payment_id, $conn) -{ - // Prepare the SQL query to fetch user_id from payments table - $query = "SELECT user_id FROM payments WHERE payment_id = ?"; - $user_id = "0"; - // Prepare the statement - if ($stmt = $conn->prepare($query)) { - // Bind the payment_id parameter to the query - $stmt->bind_param("s", $payment_id); - - // Execute the query - $stmt->execute(); - - // Bind the result to a variable - $stmt->bind_result($user_id); - - // Fetch the result - if ($stmt->fetch()) { - // Return the user_id - return $user_id; - } else { - // Return null if no user is found - return null; - } - - // Close the statement - $stmt->close(); - } else { - // Handle query preparation failure - throw new Exception("Query preparation failed: " . $conn->error); - } -} - -function setMemberStatus($user_id, $conn) -{ - // Prepare the SQL query to update the member status - $query = "UPDATE users SET member = 1 WHERE user_id = ?"; - - // Prepare the statement - if ($stmt = $conn->prepare($query)) { - // Bind the user_id parameter to the query - $stmt->bind_param("i", $user_id); - - // Execute the query - if ($stmt->execute()) { - // Check if any rows were affected - if ($stmt->affected_rows > 0) { - return true; // Success - } else { - return false; // No rows updated, possibly no such user_id - } - } else { - // Handle query execution failure - throw new Exception("Failed to execute the query: " . $stmt->error); - } - - // Close the statement - $stmt->close(); - } else { - // Handle query preparation failure - throw new Exception("Query preparation failed: " . $conn->error); - } -} - -function pfValidSignature($pfData, $pfParamString, $pfPassphrase = 'SheSells7Shells') -{ - $tempParamString = $pfPassphrase === null ? $pfParamString : $pfParamString . '&passphrase=' . urlencode($pfPassphrase); - $signature = md5($tempParamString); - return ($pfData['signature'] === $signature); -} - -function pfValidIP() -{ - $validHosts = [ - 'www.payfast.co.za', - 'sandbox.payfast.co.za', - 'w1w.payfast.co.za', - 'w2w.payfast.co.za', - ]; - - $validIps = []; - foreach ($validHosts as $pfHostname) { - $ips = gethostbynamel($pfHostname); - if ($ips !== false) { - $validIps = array_merge($validIps, $ips); - } - } - - $validIps = array_unique($validIps); - $referrerIp = gethostbyname(parse_url($_SERVER['HTTP_REFERER'])['host']); - return in_array($referrerIp, $validIps, true); -} - -function pfValidPaymentData($cartTotal, $pfData) -{ - return !(abs((float)$cartTotal - (float)$pfData['amount_gross']) > 0.01); -} - -function pfValidServerConfirmation($pfParamString, $pfHost, $pfProxy = null) -{ - if (in_array('curl', get_loaded_extensions(), true)) { - $url = 'https://' . $pfHost . '/eng/query/validate'; - $ch = curl_init(); - curl_setopt($ch, CURLOPT_USERAGENT, NULL); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_HEADER, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $pfParamString); - if (!empty($pfProxy)) curl_setopt($ch, CURLOPT_PROXY, $pfProxy); - - $response = curl_exec($ch); - curl_close($ch); - return $response === 'VALID'; - } - return false; -} - - - -// Tell Payfast that this page is reachable by triggering a header 200 -header('HTTP/1.0 200 OK'); -flush(); - -$dbhost = "localhost"; -$dbuser = "aqmqeocm_4wdcsa"; -$dbpass = "Toxicbuny1!"; -$dbname = "aqmqeocm_4wdcsa"; - -if (!$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname)) { - die("Failed to connect: " . mysqli_connect_error()); -} - -define('SANDBOX_MODE', true); -$pfHost = SANDBOX_MODE ? 'sandbox.payfast.co.za' : 'www.payfast.co.za'; -// Posted variables from ITN -$pfData = $_POST; -$payment_id = $pfData['m_payment_id']; -$pfstatus = $pfData['payment_status']; -$orderTotal = getOrderTotal($conn, $payment_id); -$description = getOrderDesc($conn, $payment_id); -$user_id = getUserIdByPaymentId($payment_id, $conn); - - - -// Strip any slashes in data -foreach ($pfData as $key => $val) { - $pfData[$key] = stripslashes($val); -} - -// Convert posted variables to a string -$pfParamString = ''; -foreach ($pfData as $key => $val) { - if ($key !== 'signature') { - $pfParamString .= $key . '=' . urlencode($val) . '&'; - } else { - break; - } -} -$pfParamString = rtrim($pfParamString, '&'); - - - -// Initialize check results -$checkResults = []; - -// Perform checks -if (!pfValidSignature($pfData, $pfParamString)) { - $checkResults[] = "Signature check failed."; -} -if (!pfValidIP()) { - $checkResults[] = "IP check failed."; -} -if (!pfValidPaymentData($orderTotal, $pfData)) { - $checkResults[] = "Payment data check failed. order= " . $payment_id . " 4WDCSA_Total=" . $orderTotal . " PFtotal=" . $pfData['amount_gross']; -} -if (!pfValidServerConfirmation($pfParamString, $pfHost)) { - $checkResults[] = "Server confirmation check failed."; -} - -// Log results to the file -$myfile = fopen($payment_id . ".txt", "w") or die("Unable to open file!"); -if (empty($checkResults)) { - fwrite($myfile, $pfstatus . "\n"); - fwrite($myfile, $payment_id . " passed all checks.\n"); - - // Update the database - $conn->begin_transaction(); - - try { - // Update payments table - $stmt = $conn->prepare("UPDATE payments SET status = ? WHERE payment_id = ?"); - $status = "PAID"; // Explicitly set the status to "PAID" - $stmt->bind_param("ss", $status, $payment_id); - - if (!$stmt->execute()) { - throw new Exception("Failed to update payments table."); - } - - $stmt = $conn->prepare("UPDATE bookings SET status = ? WHERE payment_id = ?"); - if ($stmt) { - $status = "PAID"; // Explicitly set the status to "PAID" - $stmt->bind_param("ss", $status, $payment_id); - - if (!$stmt->execute()) { - throw new Exception("Failed to update bookings table."); - } - - $stmt->close(); - } else { - throw new Exception("Failed to prepare statement for bookings table: " . $conn->error); - } - - setMemberStatus($user_id, $conn); - - // Commit transaction - $conn->commit(); - fwrite($myfile, "Database updated successfully.\n"); - } catch (Exception $e) { - // Rollback transaction in case of error - $conn->rollback(); - fwrite($myfile, "Database update failed: " . $e->getMessage() . "\n"); - } - - $stmt->close(); - -} else { - fwrite($myfile, $pfstatus . "\n"); - foreach ($checkResults as $result) { - fwrite($myfile, $result . "\n"); - } - - $conn->begin_transaction(); - - try { - // Update payments table with 'FAILED CHECKS' status - $stmt = $conn->prepare("UPDATE payments SET status = 'FAILED CHECKS' WHERE payment_id = ?"); - $stmt->bind_param("i", $payment_id); - - if (!$stmt->execute()) { - throw new Exception("Failed to update payments table."); - } - - - // Commit transaction - $conn->commit(); - fwrite($myfile, "Database updated successfully.\n"); - } catch (Exception $e) { - // Rollback transaction in case of error - $conn->rollback(); - fwrite($myfile, "Database update failed: " . $e->getMessage() . "\n"); - } - - $stmt->close(); -} - -fclose($myfile); -$conn->close(); +prepare($sql); + + if ($stmt) { + // Bind the parameter + $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) + + // Execute the statement + $stmt->execute(); + + // Get the result + $result = $stmt->get_result(); + + // Fetch the order total + if ($row = $result->fetch_assoc()) { + return $row['amount']; + } else { + return 9999.00; // Order not found + } + + // Close the statement + $stmt->close(); + } else { + // Handle the error (you might want to log this or throw an exception) + return null; + } +} + +function getOrderDesc($conn, $payment_id) +{ + // Prepare the SQL statement + $sql = "SELECT description FROM payments WHERE payment_id = ?"; + $stmt = $conn->prepare($sql); + + if ($stmt) { + // Bind the parameter + $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) + + // Execute the statement + $stmt->execute(); + + // Get the result + $result = $stmt->get_result(); + + // Fetch the order total + if ($row = $result->fetch_assoc()) { + return $row['description']; + } else { + return null; // Order not found + } + + // Close the statement + $stmt->close(); + } else { + // Handle the error (you might want to log this or throw an exception) + return null; + } +} + +function getUserIdByPaymentId($payment_id, $conn) +{ + // Prepare the SQL query to fetch user_id from payments table + $query = "SELECT user_id FROM payments WHERE payment_id = ?"; + $user_id = "0"; + // Prepare the statement + if ($stmt = $conn->prepare($query)) { + // Bind the payment_id parameter to the query + $stmt->bind_param("s", $payment_id); + + // Execute the query + $stmt->execute(); + + // Bind the result to a variable + $stmt->bind_result($user_id); + + // Fetch the result + if ($stmt->fetch()) { + // Return the user_id + return $user_id; + } else { + // Return null if no user is found + return null; + } + + // Close the statement + $stmt->close(); + } else { + // Handle query preparation failure + throw new Exception("Query preparation failed: " . $conn->error); + } +} + +function setMemberStatus($user_id, $conn) +{ + // Prepare the SQL query to update the member status + $query = "UPDATE users SET member = 1 WHERE user_id = ?"; + + // Prepare the statement + if ($stmt = $conn->prepare($query)) { + // Bind the user_id parameter to the query + $stmt->bind_param("i", $user_id); + + // Execute the query + if ($stmt->execute()) { + // Check if any rows were affected + if ($stmt->affected_rows > 0) { + return true; // Success + } else { + return false; // No rows updated, possibly no such user_id + } + } else { + // Handle query execution failure + throw new Exception("Failed to execute the query: " . $stmt->error); + } + + // Close the statement + $stmt->close(); + } else { + // Handle query preparation failure + throw new Exception("Query preparation failed: " . $conn->error); + } +} + +function pfValidSignature($pfData, $pfParamString, $pfPassphrase = 'SheSells7Shells') +{ + $tempParamString = $pfPassphrase === null ? $pfParamString : $pfParamString . '&passphrase=' . urlencode($pfPassphrase); + $signature = md5($tempParamString); + return ($pfData['signature'] === $signature); +} + +function pfValidIP() +{ + $validHosts = [ + 'www.payfast.co.za', + 'sandbox.payfast.co.za', + 'w1w.payfast.co.za', + 'w2w.payfast.co.za', + ]; + + $validIps = []; + foreach ($validHosts as $pfHostname) { + $ips = gethostbynamel($pfHostname); + if ($ips !== false) { + $validIps = array_merge($validIps, $ips); + } + } + + $validIps = array_unique($validIps); + $referrerIp = gethostbyname(parse_url($_SERVER['HTTP_REFERER'])['host']); + return in_array($referrerIp, $validIps, true); +} + +function pfValidPaymentData($cartTotal, $pfData) +{ + return !(abs((float)$cartTotal - (float)$pfData['amount_gross']) > 0.01); +} + +function pfValidServerConfirmation($pfParamString, $pfHost, $pfProxy = null) +{ + if (in_array('curl', get_loaded_extensions(), true)) { + $url = 'https://' . $pfHost . '/eng/query/validate'; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_USERAGENT, NULL); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $pfParamString); + if (!empty($pfProxy)) curl_setopt($ch, CURLOPT_PROXY, $pfProxy); + + $response = curl_exec($ch); + curl_close($ch); + return $response === 'VALID'; + } + return false; +} + + + +// Tell Payfast that this page is reachable by triggering a header 200 +header('HTTP/1.0 200 OK'); +flush(); + +$dbhost = "localhost"; +$dbuser = "aqmqeocm_4wdcsa"; +$dbpass = "Toxicbuny1!"; +$dbname = "aqmqeocm_4wdcsa"; + +if (!$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname)) { + die("Failed to connect: " . mysqli_connect_error()); +} + +define('SANDBOX_MODE', true); +$pfHost = SANDBOX_MODE ? 'sandbox.payfast.co.za' : 'www.payfast.co.za'; +// Posted variables from ITN +$pfData = $_POST; +$payment_id = $pfData['m_payment_id']; +$pfstatus = $pfData['payment_status']; +$orderTotal = getOrderTotal($conn, $payment_id); +$description = getOrderDesc($conn, $payment_id); +$user_id = getUserIdByPaymentId($payment_id, $conn); + + + +// Strip any slashes in data +foreach ($pfData as $key => $val) { + $pfData[$key] = stripslashes($val); +} + +// Convert posted variables to a string +$pfParamString = ''; +foreach ($pfData as $key => $val) { + if ($key !== 'signature') { + $pfParamString .= $key . '=' . urlencode($val) . '&'; + } else { + break; + } +} +$pfParamString = rtrim($pfParamString, '&'); + + + +// Initialize check results +$checkResults = []; + +// Perform checks +if (!pfValidSignature($pfData, $pfParamString)) { + $checkResults[] = "Signature check failed."; +} +if (!pfValidIP()) { + $checkResults[] = "IP check failed."; +} +if (!pfValidPaymentData($orderTotal, $pfData)) { + $checkResults[] = "Payment data check failed. order= " . $payment_id . " 4WDCSA_Total=" . $orderTotal . " PFtotal=" . $pfData['amount_gross']; +} +if (!pfValidServerConfirmation($pfParamString, $pfHost)) { + $checkResults[] = "Server confirmation check failed."; +} + +// Log results to the file +$myfile = fopen($payment_id . ".txt", "w") or die("Unable to open file!"); +if (empty($checkResults)) { + fwrite($myfile, $pfstatus . "\n"); + fwrite($myfile, $payment_id . " passed all checks.\n"); + + // Update the database + $conn->begin_transaction(); + + try { + // Update payments table + $stmt = $conn->prepare("UPDATE payments SET status = ? WHERE payment_id = ?"); + $status = "PAID"; // Explicitly set the status to "PAID" + $stmt->bind_param("ss", $status, $payment_id); + + if (!$stmt->execute()) { + throw new Exception("Failed to update payments table."); + } + + $stmt = $conn->prepare("UPDATE bookings SET status = ? WHERE payment_id = ?"); + if ($stmt) { + $status = "PAID"; // Explicitly set the status to "PAID" + $stmt->bind_param("ss", $status, $payment_id); + + if (!$stmt->execute()) { + throw new Exception("Failed to update bookings table."); + } + + $stmt->close(); + } else { + throw new Exception("Failed to prepare statement for bookings table: " . $conn->error); + } + + setMemberStatus($user_id, $conn); + + // Commit transaction + $conn->commit(); + fwrite($myfile, "Database updated successfully.\n"); + } catch (Exception $e) { + // Rollback transaction in case of error + $conn->rollback(); + fwrite($myfile, "Database update failed: " . $e->getMessage() . "\n"); + } + + $stmt->close(); + +} else { + fwrite($myfile, $pfstatus . "\n"); + foreach ($checkResults as $result) { + fwrite($myfile, $result . "\n"); + } + + $conn->begin_transaction(); + + try { + // Update payments table with 'FAILED CHECKS' status + $stmt = $conn->prepare("UPDATE payments SET status = 'FAILED CHECKS' WHERE payment_id = ?"); + $stmt->bind_param("i", $payment_id); + + if (!$stmt->execute()) { + throw new Exception("Failed to update payments table."); + } + + + // Commit transaction + $conn->commit(); + fwrite($myfile, "Database updated successfully.\n"); + } catch (Exception $e) { + // Rollback transaction in case of error + $conn->rollback(); + fwrite($myfile, "Database update failed: " . $e->getMessage() . "\n"); + } + + $stmt->close(); +} + +fclose($myfile); +$conn->close(); diff --git a/confirm2.php b/src/pages/shop/confirm2.php similarity index 96% rename from confirm2.php rename to src/pages/shop/confirm2.php index a73c4008..f7108455 100644 --- a/confirm2.php +++ b/src/pages/shop/confirm2.php @@ -1,336 +1,336 @@ -prepare($sql); - - if ($stmt) { - // Bind the parameter - $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) - - // Execute the statement - $stmt->execute(); - - // Get the result - $result = $stmt->get_result(); - - // Fetch the order total - if ($row = $result->fetch_assoc()) { - return $row['amount']; - } else { - return 9999.00; // Order not found - } - - // Close the statement - $stmt->close(); - } else { - // Handle the error (you might want to log this or throw an exception) - return null; - } -} - -function getOrderDesc($conn, $payment_id) -{ - // Prepare the SQL statement - $sql = "SELECT description FROM payments WHERE payment_id = ?"; - $stmt = $conn->prepare($sql); - - if ($stmt) { - // Bind the parameter - $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) - - // Execute the statement - $stmt->execute(); - - // Get the result - $result = $stmt->get_result(); - - // Fetch the order total - if ($row = $result->fetch_assoc()) { - return $row['description']; - } else { - return null; // Order not found - } - - // Close the statement - $stmt->close(); - } else { - // Handle the error (you might want to log this or throw an exception) - return null; - } -} - -function getUserIdByPaymentId($payment_id, $conn) -{ - // Prepare the SQL query to fetch user_id from payments table - $query = "SELECT user_id FROM payments WHERE payment_id = ?"; - $user_id = "0"; - // Prepare the statement - if ($stmt = $conn->prepare($query)) { - // Bind the payment_id parameter to the query - $stmt->bind_param("s", $payment_id); - - // Execute the query - $stmt->execute(); - - // Bind the result to a variable - $stmt->bind_result($user_id); - - // Fetch the result - if ($stmt->fetch()) { - // Return the user_id - return $user_id; - } else { - // Return null if no user is found - return null; - } - - // Close the statement - $stmt->close(); - } else { - // Handle query preparation failure - throw new Exception("Query preparation failed: " . $conn->error); - } -} - -function setMemberStatus($user_id, $conn) -{ - // Prepare the SQL query to update the member status - $query = "UPDATE users SET member = 1 WHERE user_id = ?"; - - // Prepare the statement - if ($stmt = $conn->prepare($query)) { - // Bind the user_id parameter to the query - $stmt->bind_param("i", $user_id); - - // Execute the query - if ($stmt->execute()) { - // Check if any rows were affected - if ($stmt->affected_rows > 0) { - return true; // Success - } else { - return false; // No rows updated, possibly no such user_id - } - } else { - // Handle query execution failure - throw new Exception("Failed to execute the query: " . $stmt->error); - } - - // Close the statement - $stmt->close(); - } else { - // Handle query preparation failure - throw new Exception("Query preparation failed: " . $conn->error); - } -} - -function pfValidSignature($pfData, $pfParamString, $pfPassphrase = 'SheSells7Shells') -{ - $tempParamString = $pfPassphrase === null ? $pfParamString : $pfParamString . '&passphrase=' . urlencode($pfPassphrase); - $signature = md5($tempParamString); - return ($pfData['signature'] === $signature); -} - -function pfValidIP() -{ - $validHosts = [ - 'www.payfast.co.za', - 'sandbox.payfast.co.za', - 'w1w.payfast.co.za', - 'w2w.payfast.co.za', - ]; - - $validIps = []; - foreach ($validHosts as $pfHostname) { - $ips = gethostbynamel($pfHostname); - if ($ips !== false) { - $validIps = array_merge($validIps, $ips); - } - } - - $validIps = array_unique($validIps); - $referrerIp = gethostbyname(parse_url($_SERVER['HTTP_REFERER'])['host']); - return in_array($referrerIp, $validIps, true); -} - -function pfValidPaymentData($cartTotal, $pfData) -{ - return !(abs((float)$cartTotal - (float)$pfData['amount_gross']) > 0.01); -} - -function pfValidServerConfirmation($pfParamString, $pfHost, $pfProxy = null) -{ - if (in_array('curl', get_loaded_extensions(), true)) { - $url = 'https://' . $pfHost . '/eng/query/validate'; - $ch = curl_init(); - curl_setopt($ch, CURLOPT_USERAGENT, NULL); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_HEADER, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $pfParamString); - if (!empty($pfProxy)) curl_setopt($ch, CURLOPT_PROXY, $pfProxy); - - $response = curl_exec($ch); - curl_close($ch); - return $response === 'VALID'; - } - return false; -} - - - -// Tell Payfast that this page is reachable by triggering a header 200 -header('HTTP/1.0 200 OK'); -flush(); - -$dbhost = "localhost"; -$dbuser = "aqmqeocm_4wdcsa"; -$dbpass = "Toxicbuny1!"; -$dbname = "aqmqeocm_4wdcsa"; - -if (!$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname)) { - die("Failed to connect: " . mysqli_connect_error()); -} - -define('SANDBOX_MODE', true); -$pfHost = SANDBOX_MODE ? 'sandbox.payfast.co.za' : 'www.payfast.co.za'; -// Posted variables from ITN -$pfData = $_POST; -$payment_id = $pfData['m_payment_id']; -$pfstatus = $pfData['payment_status']; -$orderTotal = getOrderTotal($conn, $payment_id); -$description = getOrderDesc($conn, $payment_id); -$user_id = getUserIdByPaymentId($payment_id, $conn); - -// Strip any slashes in data -foreach ($pfData as $key => $val) { - $pfData[$key] = stripslashes($val); -} - -// Convert posted variables to a string -$pfParamString = ''; -foreach ($pfData as $key => $val) { - if ($key !== 'signature') { - $pfParamString .= $key . '=' . urlencode($val) . '&'; - } else { - break; - } -} -$pfParamString = rtrim($pfParamString, '&'); - -// Initialize check results -$checkResults = []; - -// Perform checks -if (!pfValidSignature($pfData, $pfParamString)) { - $checkResults[] = "Signature check failed."; -} -if (!pfValidIP()) { - $checkResults[] = "IP check failed."; -} -if (!pfValidPaymentData($orderTotal, $pfData)) { - $checkResults[] = "Payment data check failed. order= " . $payment_id . " 4WDCSA_Total=" . $orderTotal . " PFtotal=" . $pfData['amount_gross']; -} -if (!pfValidServerConfirmation($pfParamString, $pfHost)) { - $checkResults[] = "Server confirmation check failed."; -} - -// Log results to the file -$myfile = fopen($payment_id . ".txt", "w") or die("Unable to open file!"); -if (empty($checkResults)) { - fwrite($myfile, "Starting database update process for payment ID: $payment_id\n"); - fwrite($myfile, "Payment status: $pfstatus\n"); - - // Begin database transaction - $conn->begin_transaction(); - fwrite($myfile, "Transaction started.\n"); - - try { - // Step 1: Update payments table - fwrite($myfile, "Preparing to update payments table...\n"); - $stmt = $conn->prepare("UPDATE payments SET status = ? WHERE payment_id = ?"); - if (!$stmt) { - throw new Exception("Failed to prepare statement for payments table: " . $conn->error); - } - - fwrite($myfile, "Prepared statement for payments table.\n"); - $status = "PAID"; // Explicitly set the status to "PAID" - $stmt->bind_param("ss", $status, $payment_id); - fwrite($myfile, "Bound parameters for payments table update.\n"); - - if (!$stmt->execute()) { - throw new Exception("Failed to execute update for payments table: " . $stmt->error); - } - fwrite($myfile, "Payments table updated successfully.\n"); - $stmt->close(); - fwrite($myfile, "Closed statement for payments table update.\n"); - - // Step 2: Update membership_fees table - fwrite($myfile, "Preparing to update membership_fees table...\n"); - $stmt = $conn->prepare("UPDATE membership_fees SET payment_status = ? WHERE payment_id = ?"); - if (!$stmt) { - throw new Exception("Failed to prepare statement for membership_fees table: " . $conn->error); - } - - fwrite($myfile, "Prepared statement for membership_fees table.\n"); - $status = "PAID"; // Explicitly set the status to "PAID" - $stmt->bind_param("ss", $status, $payment_id); - fwrite($myfile, "Bound parameters for membership_fees table update.\n"); - - if (!$stmt->execute()) { - throw new Exception("Failed to execute update for membership_fees table: " . $stmt->error); - } - fwrite($myfile, "Membership_fees table updated successfully.\n"); - $stmt->close(); - fwrite($myfile, "Closed statement for membership_fees table update.\n"); - - // Step 3: Set member status - fwrite($myfile, "Calling setMemberStatus()...\n"); - setMemberStatus($user_id, $conn); - fwrite($myfile, "setMemberStatus() executed successfully.\n"); - - // Commit transaction - $conn->commit(); - fwrite($myfile, "Transaction committed successfully. Database updates complete.\n"); - } catch (Exception $e) { - // Rollback transaction in case of error - $conn->rollback(); - fwrite($myfile, "Transaction rolled back due to error: " . $e->getMessage() . "\n"); - } -} else { - fwrite($myfile, $pfstatus . "\n"); - foreach ($checkResults as $result) { - fwrite($myfile, $result . "\n"); - } - - $conn->begin_transaction(); - - try { - // Update payments table with 'FAILED CHECKS' status - $stmt = $conn->prepare("UPDATE payments SET status = 'FAILED CHECKS' WHERE payment_id = ?"); - $stmt->bind_param("i", $payment_id); - - if (!$stmt->execute()) { - throw new Exception("Failed to update payments table."); - } - - - // Commit transaction - $conn->commit(); - fwrite($myfile, "Database updated successfully.\n"); - } catch (Exception $e) { - // Rollback transaction in case of error - $conn->rollback(); - fwrite($myfile, "Database update failed: " . $e->getMessage() . "\n"); - } - - $stmt->close(); -} - -fclose($myfile); -$conn->close(); +prepare($sql); + + if ($stmt) { + // Bind the parameter + $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) + + // Execute the statement + $stmt->execute(); + + // Get the result + $result = $stmt->get_result(); + + // Fetch the order total + if ($row = $result->fetch_assoc()) { + return $row['amount']; + } else { + return 9999.00; // Order not found + } + + // Close the statement + $stmt->close(); + } else { + // Handle the error (you might want to log this or throw an exception) + return null; + } +} + +function getOrderDesc($conn, $payment_id) +{ + // Prepare the SQL statement + $sql = "SELECT description FROM payments WHERE payment_id = ?"; + $stmt = $conn->prepare($sql); + + if ($stmt) { + // Bind the parameter + $stmt->bind_param("s", $payment_id); // Assuming order_id is a string (UUID) + + // Execute the statement + $stmt->execute(); + + // Get the result + $result = $stmt->get_result(); + + // Fetch the order total + if ($row = $result->fetch_assoc()) { + return $row['description']; + } else { + return null; // Order not found + } + + // Close the statement + $stmt->close(); + } else { + // Handle the error (you might want to log this or throw an exception) + return null; + } +} + +function getUserIdByPaymentId($payment_id, $conn) +{ + // Prepare the SQL query to fetch user_id from payments table + $query = "SELECT user_id FROM payments WHERE payment_id = ?"; + $user_id = "0"; + // Prepare the statement + if ($stmt = $conn->prepare($query)) { + // Bind the payment_id parameter to the query + $stmt->bind_param("s", $payment_id); + + // Execute the query + $stmt->execute(); + + // Bind the result to a variable + $stmt->bind_result($user_id); + + // Fetch the result + if ($stmt->fetch()) { + // Return the user_id + return $user_id; + } else { + // Return null if no user is found + return null; + } + + // Close the statement + $stmt->close(); + } else { + // Handle query preparation failure + throw new Exception("Query preparation failed: " . $conn->error); + } +} + +function setMemberStatus($user_id, $conn) +{ + // Prepare the SQL query to update the member status + $query = "UPDATE users SET member = 1 WHERE user_id = ?"; + + // Prepare the statement + if ($stmt = $conn->prepare($query)) { + // Bind the user_id parameter to the query + $stmt->bind_param("i", $user_id); + + // Execute the query + if ($stmt->execute()) { + // Check if any rows were affected + if ($stmt->affected_rows > 0) { + return true; // Success + } else { + return false; // No rows updated, possibly no such user_id + } + } else { + // Handle query execution failure + throw new Exception("Failed to execute the query: " . $stmt->error); + } + + // Close the statement + $stmt->close(); + } else { + // Handle query preparation failure + throw new Exception("Query preparation failed: " . $conn->error); + } +} + +function pfValidSignature($pfData, $pfParamString, $pfPassphrase = 'SheSells7Shells') +{ + $tempParamString = $pfPassphrase === null ? $pfParamString : $pfParamString . '&passphrase=' . urlencode($pfPassphrase); + $signature = md5($tempParamString); + return ($pfData['signature'] === $signature); +} + +function pfValidIP() +{ + $validHosts = [ + 'www.payfast.co.za', + 'sandbox.payfast.co.za', + 'w1w.payfast.co.za', + 'w2w.payfast.co.za', + ]; + + $validIps = []; + foreach ($validHosts as $pfHostname) { + $ips = gethostbynamel($pfHostname); + if ($ips !== false) { + $validIps = array_merge($validIps, $ips); + } + } + + $validIps = array_unique($validIps); + $referrerIp = gethostbyname(parse_url($_SERVER['HTTP_REFERER'])['host']); + return in_array($referrerIp, $validIps, true); +} + +function pfValidPaymentData($cartTotal, $pfData) +{ + return !(abs((float)$cartTotal - (float)$pfData['amount_gross']) > 0.01); +} + +function pfValidServerConfirmation($pfParamString, $pfHost, $pfProxy = null) +{ + if (in_array('curl', get_loaded_extensions(), true)) { + $url = 'https://' . $pfHost . '/eng/query/validate'; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_USERAGENT, NULL); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $pfParamString); + if (!empty($pfProxy)) curl_setopt($ch, CURLOPT_PROXY, $pfProxy); + + $response = curl_exec($ch); + curl_close($ch); + return $response === 'VALID'; + } + return false; +} + + + +// Tell Payfast that this page is reachable by triggering a header 200 +header('HTTP/1.0 200 OK'); +flush(); + +$dbhost = "localhost"; +$dbuser = "aqmqeocm_4wdcsa"; +$dbpass = "Toxicbuny1!"; +$dbname = "aqmqeocm_4wdcsa"; + +if (!$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname)) { + die("Failed to connect: " . mysqli_connect_error()); +} + +define('SANDBOX_MODE', true); +$pfHost = SANDBOX_MODE ? 'sandbox.payfast.co.za' : 'www.payfast.co.za'; +// Posted variables from ITN +$pfData = $_POST; +$payment_id = $pfData['m_payment_id']; +$pfstatus = $pfData['payment_status']; +$orderTotal = getOrderTotal($conn, $payment_id); +$description = getOrderDesc($conn, $payment_id); +$user_id = getUserIdByPaymentId($payment_id, $conn); + +// Strip any slashes in data +foreach ($pfData as $key => $val) { + $pfData[$key] = stripslashes($val); +} + +// Convert posted variables to a string +$pfParamString = ''; +foreach ($pfData as $key => $val) { + if ($key !== 'signature') { + $pfParamString .= $key . '=' . urlencode($val) . '&'; + } else { + break; + } +} +$pfParamString = rtrim($pfParamString, '&'); + +// Initialize check results +$checkResults = []; + +// Perform checks +if (!pfValidSignature($pfData, $pfParamString)) { + $checkResults[] = "Signature check failed."; +} +if (!pfValidIP()) { + $checkResults[] = "IP check failed."; +} +if (!pfValidPaymentData($orderTotal, $pfData)) { + $checkResults[] = "Payment data check failed. order= " . $payment_id . " 4WDCSA_Total=" . $orderTotal . " PFtotal=" . $pfData['amount_gross']; +} +if (!pfValidServerConfirmation($pfParamString, $pfHost)) { + $checkResults[] = "Server confirmation check failed."; +} + +// Log results to the file +$myfile = fopen($payment_id . ".txt", "w") or die("Unable to open file!"); +if (empty($checkResults)) { + fwrite($myfile, "Starting database update process for payment ID: $payment_id\n"); + fwrite($myfile, "Payment status: $pfstatus\n"); + + // Begin database transaction + $conn->begin_transaction(); + fwrite($myfile, "Transaction started.\n"); + + try { + // Step 1: Update payments table + fwrite($myfile, "Preparing to update payments table...\n"); + $stmt = $conn->prepare("UPDATE payments SET status = ? WHERE payment_id = ?"); + if (!$stmt) { + throw new Exception("Failed to prepare statement for payments table: " . $conn->error); + } + + fwrite($myfile, "Prepared statement for payments table.\n"); + $status = "PAID"; // Explicitly set the status to "PAID" + $stmt->bind_param("ss", $status, $payment_id); + fwrite($myfile, "Bound parameters for payments table update.\n"); + + if (!$stmt->execute()) { + throw new Exception("Failed to execute update for payments table: " . $stmt->error); + } + fwrite($myfile, "Payments table updated successfully.\n"); + $stmt->close(); + fwrite($myfile, "Closed statement for payments table update.\n"); + + // Step 2: Update membership_fees table + fwrite($myfile, "Preparing to update membership_fees table...\n"); + $stmt = $conn->prepare("UPDATE membership_fees SET payment_status = ? WHERE payment_id = ?"); + if (!$stmt) { + throw new Exception("Failed to prepare statement for membership_fees table: " . $conn->error); + } + + fwrite($myfile, "Prepared statement for membership_fees table.\n"); + $status = "PAID"; // Explicitly set the status to "PAID" + $stmt->bind_param("ss", $status, $payment_id); + fwrite($myfile, "Bound parameters for membership_fees table update.\n"); + + if (!$stmt->execute()) { + throw new Exception("Failed to execute update for membership_fees table: " . $stmt->error); + } + fwrite($myfile, "Membership_fees table updated successfully.\n"); + $stmt->close(); + fwrite($myfile, "Closed statement for membership_fees table update.\n"); + + // Step 3: Set member status + fwrite($myfile, "Calling setMemberStatus()...\n"); + setMemberStatus($user_id, $conn); + fwrite($myfile, "setMemberStatus() executed successfully.\n"); + + // Commit transaction + $conn->commit(); + fwrite($myfile, "Transaction committed successfully. Database updates complete.\n"); + } catch (Exception $e) { + // Rollback transaction in case of error + $conn->rollback(); + fwrite($myfile, "Transaction rolled back due to error: " . $e->getMessage() . "\n"); + } +} else { + fwrite($myfile, $pfstatus . "\n"); + foreach ($checkResults as $result) { + fwrite($myfile, $result . "\n"); + } + + $conn->begin_transaction(); + + try { + // Update payments table with 'FAILED CHECKS' status + $stmt = $conn->prepare("UPDATE payments SET status = 'FAILED CHECKS' WHERE payment_id = ?"); + $stmt->bind_param("i", $payment_id); + + if (!$stmt->execute()) { + throw new Exception("Failed to update payments table."); + } + + + // Commit transaction + $conn->commit(); + fwrite($myfile, "Database updated successfully.\n"); + } catch (Exception $e) { + // Rollback transaction in case of error + $conn->rollback(); + fwrite($myfile, "Database update failed: " . $e->getMessage() . "\n"); + } + + $stmt->close(); +} + +fclose($myfile); +$conn->close(); diff --git a/payment_confirmation.php b/src/pages/shop/payment_confirmation.php similarity index 92% rename from payment_confirmation.php rename to src/pages/shop/payment_confirmation.php index 2de6948b..0ec2a3b7 100644 --- a/payment_confirmation.php +++ b/src/pages/shop/payment_confirmation.php @@ -1,149 +1,150 @@ -prepare($sql); - -if (!$stmt) { - die("Prepare failed: " . $conn->error); -} - -$stmt->bind_param("i", $booking_id); -$stmt->execute(); -$stmt->bind_result($eft_id, $amount, $discount, $trip_id, $course_id); -$stmt->fetch(); -$stmt->close(); - -// Check if booking was found -if (!$eft_id) { - die("Error: Booking not found."); -} - -// Retrieve trip details -$sql = "SELECT trip_name, start_date, end_date FROM trips WHERE trip_id = ?"; -$stmt = $conn->prepare($sql); - -if (!$stmt) { - die("Prepare failed: " . $conn->error); -} - -$stmt->bind_param("i", $trip_id); -$stmt->execute(); -$stmt->bind_result($trip_name, $start_date, $end_date); -$stmt->fetch(); -$stmt->close(); - -// Retrieve trip details -$sql = "SELECT course_type, date FROM courses WHERE course_id = ?"; -$stmt = $conn->prepare($sql); - -if (!$stmt) { - die("Prepare failed: " . $conn->error); -} - -$stmt->bind_param("i", $course_id); -$stmt->execute(); -$stmt->bind_result($type, $start_date); -$stmt->fetch(); -$stmt->close(); - - -if ($type === "driver_training") { - $course_name = "Basic 4X4 Driver Training Course"; -} elseif ($type === "bush_mechanics") { - $course_name = "Bush Mechanics Course"; -} elseif ($type === "rescue_recovery") { - $course_name = "Rescue & Recovery Training Course"; -} else { - $course_name = "General Course"; // Default fallback description -} -// $start_date = $date; - -// Get user's email -$sql = "SELECT email FROM users WHERE user_id = ?"; -$stmt = $conn->prepare($sql); - -if (!$stmt) { - die("Prepare failed: " . $conn->error); -} - -$stmt->bind_param("i", $user_id); -$stmt->execute(); -$stmt->bind_result($user_email); -$stmt->fetch(); -$stmt->close(); - -$conn->close(); - -$payment_amount = $amount - $discount; -?> - - -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    - Booking Summary: -

    '. htmlspecialchars($start_date).' - '.htmlspecialchars($end_date).'

    '; - } else { - echo htmlspecialchars($course_name).'

    '. htmlspecialchars($start_date).'

    '; - }?> - - -
    -

    Your invoice has been sent to . Please upload your proof of payment below.

    - -
    Payment Details:
    -

    The Four Wheel Drive Club of Southern Africa
    FNB
    Account Number: 58810022334
    Branch code: 250655
    Reference:
    Amount: R

    - - Submit Proof of Payment - - -
    -
    -
    -
    -
    - - - \ No newline at end of file +prepare($sql); + +if (!$stmt) { + die("Prepare failed: " . $conn->error); +} + +$stmt->bind_param("i", $booking_id); +$stmt->execute(); +$stmt->bind_result($eft_id, $amount, $discount, $trip_id, $course_id); +$stmt->fetch(); +$stmt->close(); + +// Check if booking was found +if (!$eft_id) { + die("Error: Booking not found."); +} + +// Retrieve trip details +$sql = "SELECT trip_name, start_date, end_date FROM trips WHERE trip_id = ?"; +$stmt = $conn->prepare($sql); + +if (!$stmt) { + die("Prepare failed: " . $conn->error); +} + +$stmt->bind_param("i", $trip_id); +$stmt->execute(); +$stmt->bind_result($trip_name, $start_date, $end_date); +$stmt->fetch(); +$stmt->close(); + +// Retrieve trip details +$sql = "SELECT course_type, date FROM courses WHERE course_id = ?"; +$stmt = $conn->prepare($sql); + +if (!$stmt) { + die("Prepare failed: " . $conn->error); +} + +$stmt->bind_param("i", $course_id); +$stmt->execute(); +$stmt->bind_result($type, $start_date); +$stmt->fetch(); +$stmt->close(); + + +if ($type === "driver_training") { + $course_name = "Basic 4X4 Driver Training Course"; +} elseif ($type === "bush_mechanics") { + $course_name = "Bush Mechanics Course"; +} elseif ($type === "rescue_recovery") { + $course_name = "Rescue & Recovery Training Course"; +} else { + $course_name = "General Course"; // Default fallback description +} +// $start_date = $date; + +// Get user's email +$sql = "SELECT email FROM users WHERE user_id = ?"; +$stmt = $conn->prepare($sql); + +if (!$stmt) { + die("Prepare failed: " . $conn->error); +} + +$stmt->bind_param("i", $user_id); +$stmt->execute(); +$stmt->bind_result($user_email); +$stmt->fetch(); +$stmt->close(); + +$conn->close(); + +$payment_amount = $amount - $discount; +?> + + +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    + Booking Summary: +

    '. htmlspecialchars($start_date).' - '.htmlspecialchars($end_date).'

    '; + } else { + echo htmlspecialchars($course_name).'

    '. htmlspecialchars($start_date).'

    '; + }?> + + +
    +

    Your invoice has been sent to . Please upload your proof of payment below.

    + +
    Payment Details:
    +

    The Four Wheel Drive Club of Southern Africa
    FNB
    Account Number: 58810022334
    Branch code: 250655
    Reference:
    Amount: R

    + + Submit Proof of Payment + + +
    +
    +
    +
    +
    + + + diff --git a/view_cart.php b/src/pages/shop/view_cart.php similarity index 95% rename from view_cart.php rename to src/pages/shop/view_cart.php index 1963ca3b..d84870ab 100644 --- a/view_cart.php +++ b/src/pages/shop/view_cart.php @@ -1,12 +1,12 @@ -'; - print_r($_SESSION['cart']); // Display cart contents in a readable format - echo ''; -} else { - echo 'Cart is empty.'; -} -?> +'; + print_r($_SESSION['cart']); // Display cart contents in a readable format + echo ''; +} else { + echo 'Cart is empty.'; +} +?> diff --git a/submit_order.php b/submit_order.php deleted file mode 100644 index 1d673dfa..00000000 --- a/submit_order.php +++ /dev/null @@ -1,46 +0,0 @@ - 'error', 'message' => 'Security token validation failed.']); - exit(); -} - -if (isset($_POST['tab_id']) && isset($_SESSION['cart'][$_POST['tab_id']])) { - $tab_id = (int) $_POST['tab_id']; // Ensure it's an integer - $drinks = $_SESSION['cart'][$tab_id]; - $created_at = date('Y-m-d H:i:s'); - - $errors = []; // Array to store SQL errors - - foreach ($drinks as $drink) { - $drink_id = (int) $drink['item_id']; // Ensure drink ID is an integer - $drink_name = $drink['item_name']; // No escaping needed with prepared statements - $drink_price = (float) $drink['item_price']; // Ensure price is a float - $user_id = (int) $drink['user_id']; // Convert to integer - - // Insert each drink into the bar_transactions table using prepared statement - $stmt = $conn->prepare("INSERT INTO bar_transactions (user_id, tab_id, item_id, item_name, item_price) VALUES (?, ?, ?, ?, ?)"); - $stmt->bind_param("iiisi", $user_id, $tab_id, $drink_id, $drink_name, $drink_price); - - if (!$stmt->execute()) { - $errors[] = "Error inserting drink ID $drink_id: " . $conn->error; - } - } - - if (empty($errors)) { - // Clear the cart for this tab after successful submission - unset($_SESSION['cart'][$tab_id]); - echo json_encode(['status' => 'success', 'message' => 'Order submitted successfully!']); - } else { - // Log all errors and return failure message - error_log(implode("\n", $errors)); // Log errors to the server - echo json_encode(['status' => 'error', 'message' => 'Some items failed to be added.', 'errors' => $errors]); - } -} else { - echo json_encode(['status' => 'error', 'message' => 'Cart is empty or tab ID is invalid.']); -} diff --git a/submit_pop.php b/submit_pop.php deleted file mode 100644 index a9e705e6..00000000 --- a/submit_pop.php +++ /dev/null @@ -1,214 +0,0 @@ -Invalid submission: missing eft_id or file."; - exit; - } - - // Validate file using hardened validation function - $validationResult = validateFileUpload($_FILES['pop_file'], 'proof_of_payment'); - - if ($validationResult === false) { - echo "
    Invalid file. Only PDF files under 10MB are allowed.
    "; - exit; - } - - $target_dir = "uploads/pop/"; - $randomFilename = $validationResult['filename']; - $target_file = $target_dir . $randomFilename; - - // Make sure target directory exists and writable - if (!is_dir($target_dir)) { - mkdir($target_dir, 0755, true); - } - - if (!is_writable($target_dir)) { - echo "
    Upload directory is not writable: $target_dir
    "; - exit; - } - - if (move_uploaded_file($_FILES['pop_file']['tmp_name'], $target_file)) { - chmod($target_file, 0644); - - // Update EFT and booking status - $payment_type = $_POST['payment_type'] ?? 'booking'; - - if ($payment_type === 'membership') { - // Update EFT and booking status - $stmt1 = $conn->prepare("UPDATE efts SET status = 'PROCESSING' WHERE eft_id = ?"); - $stmt1->bind_param("s", $eft_id); - $stmt1->execute(); - $stmt1->close(); - - // Update membership fee status - $stmt = $conn->prepare("UPDATE membership_fees SET payment_status = 'PROCESSING' WHERE payment_id = ?"); - $stmt->bind_param("s", $eft_id); - $stmt->execute(); - $stmt->close(); - } else { - // Update EFT and booking status - $stmt1 = $conn->prepare("UPDATE efts SET status = 'PROCESSING' WHERE eft_id = ?"); - $stmt1->bind_param("s", $eft_id); - $stmt1->execute(); - $stmt1->close(); - - $stmt2 = $conn->prepare("UPDATE bookings SET status = 'PROCESSING' WHERE eft_id = ?"); - $stmt2->bind_param("s", $eft_id); - $stmt2->execute(); - $stmt2->close(); - } - - // Send notification email using sendPOP() - $fullname = getFullName($user_id); - $eftDetails = getEFTDetails($eft_id); - - if ($eftDetails) { - $amount = "R" . number_format($eftDetails['amount'], 2); - $description = $eftDetails['description']; - } else { - $amount = "R0.00"; - $description = "Payment"; - } - - if (sendPOP($fullname, $randomFilename, $amount, $description)) { - $_SESSION['message'] = "Thank you! Your payment proof has been uploaded and notification sent."; - } else { - $_SESSION['message'] = "Payment uploaded, but notification email could not be sent."; - } - - // Log the action - auditLog($user_id, 'POP_UPLOAD', 'efts', $eft_id, ['filename' => $randomFilename, 'payment_type' => $payment_type]); - - header("Location: bookings.php"); - exit; - - } else { - echo "
    Unable to move uploaded file.
    "; - exit; - } -} - - -// Fetch bookings for dropdown -$stmt = $conn->prepare(" - SELECT eft_id AS id, 'booking' AS type FROM bookings WHERE user_id = ? AND status = 'AWAITING PAYMENT' - UNION - SELECT payment_id AS id, 'membership' AS type FROM membership_fees WHERE user_id = ? AND payment_status = 'PENDING' -"); -$stmt->bind_param("ii", $user_id, $user_id); -$stmt->execute(); -$result = $stmt->get_result(); -$items = $result->fetch_all(MYSQLI_ASSOC); - - - - -$bannerFolder = 'assets/images/banners/'; -$bannerImages = glob($bannerFolder . '*.{jpg,jpeg,png,webp}', GLOB_BRACE); - -$randomBanner = 'assets/images/base4/camping.jpg'; // default fallback -if (!empty($bannerImages)) { - $randomBanner = $bannerImages[array_rand($bannerImages)]; -} -?> -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    -

    Submit Proof of Payment

    -
    -

    To finalise your booking/membership, select the payment reference below, and then upload your PDF proof of payment.

    -
    - 0) {?> - -
    - -
    -
      -
    • - Select Payment Reference: - - -
    • -
    -
  • - -
  • -
    -
    - -
    - -
    - -
    -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/update_application.php b/update_application.php deleted file mode 100644 index 445463ea..00000000 --- a/update_application.php +++ /dev/null @@ -1,127 +0,0 @@ -begin_transaction(); - - try { - // Prepare the SQL update statement - $stmt = $conn->prepare("UPDATE membership_application SET - first_name = ?, last_name = ?, id_number = ?, dob = ?, occupation = ?, tel_cell = ?, email = ?, - spouse_first_name = ?, spouse_last_name = ?, spouse_id_number = ?, spouse_dob = ?, spouse_occupation = ?, spouse_tel_cell = ?, spouse_email = ?, - child_name1 = ?, child_dob1 = ?, child_name2 = ?, child_dob2 = ?, child_name3 = ?, child_dob3 = ?, - physical_address = ?, postal_address = ?, interests_hobbies = ?, vehicle_make = ?, vehicle_model = ?, vehicle_year = ?, vehicle_registration = ?, - secondary_vehicle_make = ?, secondary_vehicle_model = ?, secondary_vehicle_year = ?, secondary_vehicle_registration = ? - WHERE user_id = ?"); - - // Check if preparation was successful - if (!$stmt) { - die("SQL error: " . $conn->error); - } - - $stmt->bind_param( - "sssssssssssssssssssssssssssssssi", - $first_name, - $last_name, - $id_number, - $dob, - $occupation, - $tel_cell, - $email, - $spouse_first_name, - $spouse_last_name, - $spouse_id_number, - $spouse_dob, - $spouse_occupation, - $spouse_tel_cell, - $spouse_email, - $child_name1, - $child_dob1, - $child_name2, - $child_dob2, - $child_name3, - $child_dob3, - $physical_address, - $postal_address, - $interests_hobbies, - $vehicle_make, - $vehicle_model, - $vehicle_year, - $vehicle_registration, - $secondary_vehicle_make, - $secondary_vehicle_model, - $secondary_vehicle_year, - $secondary_vehicle_registration, - $user_id // User ID for WHERE condition - ); - - if ($stmt->execute()) { - $conn->commit(); - header("Location: membership_details.php"); - exit(); // Ensure no further code is executed after the redirect - } else { - throw new Exception("Failed to update member application. SQL error: " . $conn->error); - } - } catch (Exception $e) { - // Rollback the transaction in case of error - $conn->rollback(); - - // Error response - $response = [ - 'status' => 'error', - 'message' => 'Error: ' . $e->getMessage() - ]; - } -} -?> diff --git a/update_user.php b/update_user.php deleted file mode 100644 index d064522d..00000000 --- a/update_user.php +++ /dev/null @@ -1,40 +0,0 @@ - 'error', 'message' => 'Something went wrong'); - -// Check if the user is logged in -if (!isset($_SESSION['user_id'])) { - $response['message'] = 'You are not logged in.'; - echo json_encode($response); - exit(); -} - -$user_id = $_SESSION['user_id']; - -// Handle updating user details (excluding profile picture) -if (isset($_POST['first_name'], $_POST['last_name'], $_POST['phone_number'], $_POST['email'])) { - $first_name = ucwords(strtolower($_POST['first_name'])); - $last_name = ucwords(strtolower($_POST['last_name'])); - $phone_number = $_POST['phone_number']; - $email = $_POST['email']; - - // Update user details in the database - $sql = "UPDATE users SET first_name = ?, last_name = ?, phone_number = ?, email = ? WHERE user_id = ?"; - $stmt = $conn->prepare($sql); - $stmt->bind_param("ssssi", $first_name, $last_name, $phone_number, $email, $user_id); - - if ($stmt->execute()) { - $response['status'] = 'success'; - $response['message'] = 'User details updated successfully'; - } else { - $response['message'] = 'Failed to update user details'; - } -} else { - $response['message'] = 'Invalid form submission'; -} - -echo json_encode($response); diff --git a/upload_profile_picture.php b/upload_profile_picture.php deleted file mode 100644 index 9414a320..00000000 --- a/upload_profile_picture.php +++ /dev/null @@ -1,79 +0,0 @@ - 'error', 'message' => 'Something went wrong'); - -// Check if the user is logged in -if (!isset($_SESSION['user_id'])) { - $response['message'] = 'You are not logged in.'; - echo json_encode($response); - exit(); -} - -$user_id = $_SESSION['user_id']; - -// Handle profile picture upload -if (isset($_FILES['profile_picture']) && $_FILES['profile_picture']['error'] != UPLOAD_ERR_NO_FILE) { - // Validate file using hardened validation function - $validationResult = validateFileUpload($_FILES['profile_picture'], 'profile_picture'); - - if ($validationResult === false) { - $response['message'] = 'Invalid file. Only JPG, JPEG, PNG, GIF, and WEBP images under 5MB are allowed.'; - echo json_encode($response); - exit(); - } - - // Extract validated filename - $randomFilename = $validationResult['filename']; - $target_dir = "assets/images/pp/"; - $target_file = $target_dir . $randomFilename; - - // Ensure upload directory exists and is writable - if (!is_dir($target_dir)) { - mkdir($target_dir, 0755, true); - } - - if (!is_writable($target_dir)) { - $response['message'] = 'Upload directory is not writable.'; - echo json_encode($response); - exit(); - } - - // Move the uploaded file - if (move_uploaded_file($_FILES['profile_picture']['tmp_name'], $target_file)) { - // Set secure file permissions (readable but not executable) - chmod($target_file, 0644); - - // Update the profile picture path in the database - $sql = "UPDATE users SET profile_pic = ? WHERE user_id = ?"; - $stmt = $conn->prepare($sql); - if (!$stmt) { - $response['message'] = 'Database error.'; - echo json_encode($response); - exit(); - } - - $stmt->bind_param("si", $target_file, $user_id); - if ($stmt->execute()) { - $_SESSION['profile_pic'] = $target_file; - $response['status'] = 'success'; - $response['message'] = 'Profile picture updated successfully'; - - // Log the action - auditLog($user_id, 'PROFILE_PIC_UPLOAD', 'users', $user_id, ['filename' => $randomFilename]); - } else { - $response['message'] = 'Failed to update profile picture in the database'; - } - $stmt->close(); - } else { - $response['message'] = 'Failed to move uploaded file.'; - } -} else { - $response['message'] = 'No file uploaded or file error.'; -} - -echo json_encode($response); -?>