Converted queries in: - functions.php: * getTripCount() - Hardcoded query * getAvailableSpaces() - Two queries using $trip_id parameter (HIGH PRIORITY) - blog.php: * Main blog list query - Hardcoded 'published' status - course_details.php: * Driver training courses query - Hardcoded course type - driver_training.php: * Future driver training dates query - Hardcoded course type - events.php: * Upcoming events query - Hardcoded date comparison - index.php: * Featured trips query - Hardcoded published status All queries now use proper parameter binding via prepared statements. Next: Convert remaining 15+ safe hardcoded queries for consistency.
302 lines
18 KiB
PHP
302 lines
18 KiB
PHP
<?php
|
||
$headerStyle = 'light';
|
||
include_once('header.php');
|
||
|
||
// SQL query to fetch dates for driver training
|
||
$stmt = $conn->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();
|
||
?>
|
||
|
||
|
||
|
||
<?php
|
||
$pageTitle = 'Course Details';
|
||
$breadcrumbs = [['Home' => 'index.php']];
|
||
require_once('components/banner.php');
|
||
?>
|
||
<!-- Page Banner End -->
|
||
|
||
<!-- Product Details Start -->
|
||
<section class="product-details pt-100">
|
||
<div class="container">
|
||
<div class="row">
|
||
<div class="col-lg-6">
|
||
<div class="product-details-images rmb-55" data-aos="fade-left" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="tab-content preview-images">
|
||
<div class="tab-pane fade preview-item active show" id="preview1">
|
||
<img src="assets/images/shop/preview1.png" alt="Perview">
|
||
</div>
|
||
<div class="tab-pane fade preview-item" id="preview2">
|
||
<img src="assets/images/shop/preview1.png" alt="Perview">
|
||
</div>
|
||
<div class="tab-pane fade preview-item" id="preview3">
|
||
<img src="assets/images/shop/preview1.png" alt="Perview">
|
||
</div>
|
||
</div>
|
||
<div class="nav thumb-images rmb-20">
|
||
<a href="#preview1" data-bs-toggle="tab" class="thumb-item active show">
|
||
<img src="assets/images/shop/thumb1.png" alt="Thumb">
|
||
</a>
|
||
<a href="#preview2" data-bs-toggle="tab" class="thumb-item">
|
||
<img src="assets/images/shop/thumb2.png" alt="Thumb">
|
||
</a>
|
||
<a href="#preview3" data-bs-toggle="tab" class="thumb-item">
|
||
<img src="assets/images/shop/thumb3.png" alt="Thumb">
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-6">
|
||
<div class="product-details-content" data-aos="fade-right" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="section-title">
|
||
<h2>4X4 Driver Training</h2>
|
||
</div>
|
||
<!-- <div class="ratting mb-15">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
<span>(5.8k+ reviews)</span>
|
||
</div> -->
|
||
<span class="price mb-5">R 50,00/member</span>
|
||
<span class="price mb-25">R 750,00/non-members</span>
|
||
<p>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!</p>
|
||
<hr class="mt-40">
|
||
<form action="#" class="add-to-cart pt-15 pb-30">
|
||
<input type="hidden" name="csrf_token" value="<?php echo generateCSRFToken(); ?>">
|
||
<label for="course_date">Select a Date:</label>
|
||
<select name="course_date" id="course_date" required>
|
||
<!-- <option value="" disabled selected>-- Select a Date --</option> -->
|
||
<?php
|
||
if ($result->num_rows > 0) {
|
||
// Output each course as an option
|
||
while ($row = $result->fetch_assoc()) {
|
||
$course_id = htmlspecialchars($row['course_id']); // Escape output for security
|
||
$date = htmlspecialchars($row['date']); // Escape output for security
|
||
echo "<option value='$course_id'>$date</option>";
|
||
}
|
||
} else {
|
||
echo "<option value='' disabled>No dates available</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
<button type="submit" class="theme-btn style-two bgc-secondary">
|
||
<span data-hover="Add to Cart">Book Now</span>
|
||
<i class="far fa-arrow-right"></i>
|
||
</button>
|
||
</form>
|
||
<hr class="mb-45">
|
||
<a href="#" class="wishlist"><i class="far fa-heart"></i> Add to Wishlist</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<ul class="nav nav product-tab mt-70 mb-30" data-aos="fade-up" data-aos-duration="1500" data-aos-offset="50">
|
||
<li><a href="#details" data-bs-toggle="tab" class="active show">Course Overview<i class="far fa-arrow-right"></i></a></li>
|
||
<li><a href="#information" data-bs-toggle="tab">What to Expect<i class="far fa-arrow-right"></i></a></li>
|
||
<!-- <li><a href="#reviews" data-bs-toggle="tab"> Reviews <i class="far fa-arrow-right"></i></a></li> -->
|
||
</ul>
|
||
<div class="tab-content" data-aos="fade-up" data-aos-delay="50" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="tab-pane fade active show" id="details">
|
||
<p>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.</p>
|
||
<p>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.</p>
|
||
<div class="row gap-50 pt-25 pb-20 align-items-center">
|
||
<div class="col-lg-7 pt-15">
|
||
<h5>What this course includes</h5>
|
||
<ul class="list-style-two mt-25">
|
||
<li>Basic Driver Training Manual.</li>
|
||
<li>Theory session and discussion.</li>
|
||
<li>Spend the afternoon on the track learning the basic practices of 4X4 driving.</li>
|
||
</ul>
|
||
</div>
|
||
<div class="col-lg-5">
|
||
<div class="image rmt-45">
|
||
<img src="assets/images/shop/product-details.jpg" alt="Product Details">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="information">
|
||
<!-- <p>Circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses</p> -->
|
||
<ul class="list-style-two my-35">
|
||
<li>Coffee and Welcome: Start the day with a warm cup of coffee, meet the instructors, and get an overview of the training schedule.</li>
|
||
<li>Theory Session: Learn the fundamentals of 4x4 vehicle mechanics, terrain types, recovery equipment, and off-road safety.</li>
|
||
<li>Practical Demonstrations: Observe demonstrations of essential techniques like gear selection, tire pressure adjustment, and recovery setups.</li>
|
||
<li>Lunch Break: Bring along a packed lunch or something to braai. Fires will be provided.</li>
|
||
<li>Track Driving and Practical Training: Put theory into action with hands-on driving exercises on a custom-designed off-road track.</li>
|
||
<li>Debrief and Certificates: Wrap up the day with a recap of key lessons, feedback from instructors, and certificates of completion.</li>
|
||
</ul>
|
||
</div>
|
||
<!-- <div class="tab-pane fade mb-20" id="reviews">
|
||
<h5>2 Reviews</h5>
|
||
<div class="comments my-30">
|
||
<div class="comment-body" data-aos="fade-up" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="author-thumb">
|
||
<img src="assets/images/blog/comment-author1.jpg" alt="Author">
|
||
</div>
|
||
<div class="content">
|
||
<h6>Lonnie B. Horwitz</h6>
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<span class="time">Venice, Rome and Milan – 9 Days 8 Nights</span>
|
||
<p>Tours and travels play a crucial role in enriching lives by offering unique experiences, cultural exchanges, and the joy of exploration.</p>
|
||
<a class="read-more" href="#">Reply <i class="far fa-angle-right"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="comment-body" data-aos="fade-up" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="author-thumb">
|
||
<img src="assets/images/blog/comment-author3.jpg" alt="Author">
|
||
</div>
|
||
<div class="content">
|
||
<h6>Jaime B. Wilson</h6>
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<span class="time">Venice, Rome and Milan – 9 Days 8 Nights</span>
|
||
<p>Tours and travels play a crucial role in enriching lives by offering unique experiences, cultural exchanges, and the joy of exploration.</p>
|
||
<a class="read-more" href="#">Reply <i class="far fa-angle-right"></i></a>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<!-- <h5>Add A Reviews</h5>
|
||
<form id="comment-form" class="comment-form bgc-lighter z-1 rel mt-30" name="review-form" action="#" method="post" data-aos="fade-up" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="row gap-20">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<input type="text" id="full-name" name="full-name" class="form-control" placeholder="Name" value="" required="">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<input type="email" id="email-address" name="email" class="form-control" placeholder="Email" value="" required="">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-12">
|
||
<div class="form-group">
|
||
<textarea name="message" id="message" class="form-control" rows="5" placeholder="Comments" required=""></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-12">
|
||
<div class="form-group mb-0">
|
||
<button type="submit" class="theme-btn bgc-secondary style-two">
|
||
<span data-hover="Submit reviews">Submit review</span>
|
||
<i class="fal fa-arrow-right"></i>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</form> -->
|
||
<!-- </div> -->
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- Product Details End -->
|
||
|
||
|
||
<!-- Shop Details Area start -->
|
||
<section class="shop-details-page pt-80 pb-100 rel z-1">
|
||
<div class="container">
|
||
<div class="section-title text-center mb-40">
|
||
<h2>Other Courses</h2>
|
||
</div>
|
||
<div class="product-slider">
|
||
<div class="product-item" data-aos="flip-left" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="image">
|
||
<img src="assets/images/shop/product1.png" alt="Product">
|
||
</div>
|
||
<div class="content">
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<h6><a href="product-details.html">Airport Travel Suitcases</a></h6>
|
||
<span class="price">$188.00</span>
|
||
</div>
|
||
</div>
|
||
<div class="product-item" data-aos="flip-left" data-aos-duration="1500" data-aos-offset="50" data-aos-delay="50">
|
||
<div class="image">
|
||
<img src="assets/images/shop/product2.png" alt="Product">
|
||
</div>
|
||
<div class="content">
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<h6><a href="product-details.html">Travel Great blue hat</a></h6>
|
||
<span class="price">$188.00</span>
|
||
</div>
|
||
</div>
|
||
<div class="product-item" data-aos="flip-left" data-aos-duration="1500" data-aos-offset="50" data-aos-delay="100">
|
||
<div class="image">
|
||
<img src="assets/images/shop/product3.png" alt="Product">
|
||
</div>
|
||
<div class="content">
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<h6><a href="product-details.html">Waistband and Mesh Fashion</a></h6>
|
||
<span class="price">$188.00</span>
|
||
</div>
|
||
</div>
|
||
<div class="product-item" data-aos="flip-left" data-aos-duration="1500" data-aos-offset="50" data-aos-delay="150">
|
||
<div class="image">
|
||
<img src="assets/images/shop/product4.png" alt="Product">
|
||
</div>
|
||
<div class="content">
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<h6><a href="product-details.html">Sandals for Casual Techies</a></h6>
|
||
<span class="price">$188.00</span>
|
||
</div>
|
||
</div>
|
||
<div class="product-item" data-aos="flip-left" data-aos-duration="1500" data-aos-offset="50">
|
||
<div class="image">
|
||
<img src="assets/images/shop/product5.png" alt="Product">
|
||
</div>
|
||
<div class="content">
|
||
<div class="ratting">
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star"></i>
|
||
<i class="fas fa-star-half-alt"></i>
|
||
</div>
|
||
<h6><a href="product-details.html">Children With Jute Soles</a></h6>
|
||
<span class="price">$188.00</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- Shop Details Area end -->
|
||
|
||
|
||
<?php include_once('insta_footer.php') ?>
|