Files
4WDCSA.co.za/indemnity.php
twotalesanimation 110c853945 Refactor: Update all remaining pages to use unified header template
- Updated 39 pages from old header01.php and header02.php includes
- All pages now use single configurable header.php with $headerStyle variable
- Light style (default): Most pages (login, register, trips, courses, etc.)
- Dark style: Coming from header01 original usage

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

All pages now maintain single header template source - easier to update navigation, styles, and functionality across the entire site.
2025-12-03 16:55:32 +02:00

154 lines
8.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
$headerStyle = 'light';
include_once('header.php');
// Assuming you have the user ID stored in the session
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];
} else {
header('Location: login.php');
exit(); // Stop further script execution
}
?>
<style>
h2 {
text-align: center;
margin-bottom: 20px;
}
.indemnitycontainer {
max-width: 800px;
margin: 0 auto;
}
.indemnity-text {
text-align: justify;
margin-bottom: 20px;
}
.signature-container {
margin-top: 30px;
margin-bottom: 100px;
text-align: center;
}
#signature-pad {
border: 1px solid black;
}
</style>
<!-- Page Banner Start -->
<?php
$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)];
}
?>
<section class="page-banner-area pt-50 pb-35 rel z-1 bgs-cover" style="background-image: url('<?php echo $randomBanner; ?>');">
<div class="banner-overlay"></div>
<div class="container">
<div class="banner-inner text-white">
<h2 class="page-title mb-10" data-aos="fade-left" data-aos-duration="1500" data-aos-offset="50">Indemnity</h2>
<nav aria-label="breadcrumb">
<ol class="breadcrumb justify-content-center mb-20" data-aos="fade-right" data-aos-delay="200" data-aos-duration="1500" data-aos-offset="50">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item ">Membership</li>
<li class="breadcrumb-item ">Application</li>
<li class="breadcrumb-item active">Indemnity</li>
<li class="breadcrumb-item ">Payment</li>
</ol>
</nav>
</div>
</div>
</section>
<!-- Page Banner End -->
<div class="indemnitycontainer pt-20">
<!-- <h2>Indemnity and Waiver</h2> -->
<div class="indemnity-text">
<p><strong>INDEMNITY AND WAIVER</strong></p>
<p>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).</p>
<p>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.</p>
<p>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 Clubs agents or contractors, and I hereby indemnify and hold harmless the Club and any Club Officer against all such loss or damage.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p><strong>BASE 4 CODE OF CONDUCT</strong></p>
<p>1. No motorbikes or quadbikes.</p>
<p>2. No loud music (unless authorised by the Committee or its representatives).</p>
<p>3. Dogs to be controlled by their owners who take full responsibility for the animals behaviour.</p>
<p>4. No dogs belonging to non-members are allowed at Base 4 unless with the express permission of the Committee.</p>
<p>5. No person in the rear of open vehicles when driving on obstacles.</p>
<p>6. When driving the obstacles stay on the tracks.</p>
<p>7. Engage 4WD when driving the obstacles to minimise wear and damage to the track.</p>
<p>8. No alcohol to be consumed while driving the track.</p>
<p>9. No littering (please pick up cigarette butts etc.)</p>
<p>10. All rubbish is to be taken away with you when leaving. Dustbins and refuse collection is not provided.</p>
<p>11. Use water sparingly. Please bring your own water and a little extra for the Club.</p>
<p>I am a member of the Four Wheel Drive Club of Southern Africa and I will strive to uphold these Codes.</p>
</div>
<div class="signature-container">
<div style="text-align: center;" id="responseMessage"></div> <!-- Message display area -->
<p><strong>Signature</strong></p>
<canvas id="signature-pad" width=400 height=200></canvas><br>
<button type="button" class="theme-btn style-two" id="save">ACCEPT INDEMNITY</button>
<!-- <div class="pt-20" style="text-align: center;">You will be redirected to Payfast for payment.</div> -->
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/signature_pad@4.0.0/dist/signature_pad.umd.min.js"></script>
<script>
var canvas = document.getElementById('signature-pad');
var signaturePad = new SignaturePad(canvas);
document.getElementById('save').addEventListener('click', function() {
if (signaturePad.isEmpty()) {
alert("Please provide a signature.");
} else {
var dataUrl = signaturePad.toDataURL(); // Get signature as base64 image
$.ajax({
url: 'process_signature.php',
type: 'POST',
data: {
signature: dataUrl // Send the base64 signature image
},
success: function(response) {
// Parse response if needed
if (typeof response === "string") {
response = JSON.parse(response);
}
if (response.status === 'success') {
// Check if the user has paid
if (response.paymentStatus === 'PAID') {
// Redirect to membership_details.php if paid
setTimeout(function() {
window.location.href = 'membership_details.php';
}, 2000); // 2-second delay before redirecting
} else {
// Redirect to membership_payment.php if not paid
setTimeout(function() {
window.location.href = 'membership_payment.php';
}, 2000); // 2-second delay before redirecting
}
} else {
$('#responseMessage').html('<div class="alert alert-danger">' + response.message + '</div>');
}
},
error: function() {
$('#responseMessage').html('<div class="alert alert-danger">Error uploading signature.</div>');
}
});
}
});
</script>
<?php include_once('insta_footer.php') ?>