diff --git a/.gitignore b/.gitignore
index 8c3dc162..c1823f46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.env
/vendor/
+.htaccess
diff --git a/admin_efts.php b/admin_efts.php
index 7be8135e..14a3c522 100644
--- a/admin_efts.php
+++ b/admin_efts.php
@@ -198,6 +198,10 @@ if (!empty($bannerImages)) {
echo "
" . htmlspecialchars($row['status']) . "
";
+ } elseif (($row['status']) == 'PROCESSING') {
+ echo "
+ PROCESS
+ ";
} else {
echo "" . htmlspecialchars($row['status']) . " ";
}
diff --git a/header01.php b/header01.php
index 53bdce98..d6ad8dcf 100644
--- a/header01.php
+++ b/header01.php
@@ -210,6 +210,7 @@ logVisitor();
EFT Payments
+ Process Payments
Visitor Log
@@ -231,6 +232,7 @@ logVisitor();
Account Settings
Membership
My Bookings
+ Submit P.O.P
Log Out
diff --git a/header02.php b/header02.php
index a9633138..17bb2814 100644
--- a/header02.php
+++ b/header02.php
@@ -223,6 +223,7 @@ logVisitor();
EFT Payments
+ Process Payments
Visitor Log
@@ -237,6 +238,7 @@ logVisitor();
Account Settings
Membership
My Bookings
+ Submit P.O.P
Log Out
diff --git a/membership_payment.php b/membership_payment.php
index 5776082f..e5119b00 100644
--- a/membership_payment.php
+++ b/membership_payment.php
@@ -105,9 +105,13 @@ if (!empty($bannerImages)) {
Membership Start Date: ' . $membership_start_date . ' Membership Renewal Date: ' . $membership_end_date . ''; ?>
- Your invoice has been sent to . Please send your proof of payment to info@4wdcsa.co.za .
+ 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/payment_confirmation.php b/payment_confirmation.php
index 78a333f6..86481fd6 100644
--- a/payment_confirmation.php
+++ b/payment_confirmation.php
@@ -131,10 +131,14 @@ if (!empty($bannerImages)) {
- Your invoice has been sent to . Please send your proof of payment to info@4wdcsa.co.za .
+ Your invoice has been sent to . Please upload your proof of payment below.
Bookings not paid for within 24 hours will be forfeited.
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/process_course_booking.php b/process_course_booking.php
index bfc42b6a..f0dbda26 100644
--- a/process_course_booking.php
+++ b/process_course_booking.php
@@ -1,4 +1,5 @@
+
+
+
+
+
+
+
+
Process Payments
+
+
+ Home
+ Process Payments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ×
+
+
+
+ prepare($sql);
+ $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()) {
+ $eft_id = $row['eft_id'];
+ $eft_user = $row['user_id'];
+ $eft_amount = $row['amount'];
+ $eft_description = $row['description'];
+
+ // Output the HTML structure with dynamic data
+ echo '
+
+
+
+
' . htmlspecialchars($eft_description) . '
+ ' . getFullName($eft_user) . '
+
+ ';
+ }
+ } else {
+ echo '
There are no pending payments for processing.
';
+ }
+ // Close connection
+ $conn->close();
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/submit_pop.php b/submit_pop.php
new file mode 100644
index 00000000..58f18a4f
--- /dev/null
+++ b/submit_pop.php
@@ -0,0 +1,157 @@
+Invalid submission: missing eft_id or file.
";
+ echo "";
+ echo "POST data: " . print_r($_POST, true);
+ echo "FILES data: " . print_r($_FILES, true);
+ echo " ";
+ } else {
+ $file = $_FILES['pop_file'];
+ $target_dir = "uploads/pop/";
+ $target_file = $target_dir . $eft_id . ".pdf";
+
+ // Check for upload errors first
+ if ($file['error'] !== UPLOAD_ERR_OK) {
+ echo "Upload error code: " . $file['error'] . "
";
+ // You can decode error code if needed:
+ // https://www.php.net/manual/en/features.file-upload.errors.php
+ exit;
+ }
+
+ // Check for PDF extension
+ $file_type = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION));
+ if ($file_type !== "pdf") {
+ echo "Only PDF files allowed. You tried uploading: .$file_type
";
+ exit;
+ }
+
+ // Make sure target directory exists and writable
+ if (!is_dir($target_dir)) {
+ echo "Upload directory does not exist: $target_dir
";
+ exit;
+ }
+ if (!is_writable($target_dir)) {
+ echo "Upload directory is not writable: $target_dir
";
+ exit;
+ }
+
+ if (move_uploaded_file($file['tmp_name'], $target_file)) {
+ // Update EFT and booking status
+ $stmt1 = $conn->prepare("UPDATE efts SET status = 'PROCESSING' WHERE eft_id = ?");
+ $stmt1->bind_param("s", $eft_id);
+ $stmt1->execute();
+
+ $stmt2 = $conn->prepare("UPDATE bookings SET status = 'PROCESSING' WHERE eft_id = ?");
+ $stmt2->bind_param("s", $eft_id);
+ $stmt2->execute();
+
+ //TODO send mail with pop attachment to jacqui & louise
+
+ $_SESSION['message'] = "We have received your P.O.P. We will process it soon.";
+ header("Location: bookings.php");
+ exit;
+ } else {
+ echo "Unable to move uploaded file.
";
+ echo "Tmp file exists? " . (file_exists($file['tmp_name']) ? "Yes" : "No") . " ";
+ echo "Tmp file path: " . htmlspecialchars($file['tmp_name']) . " ";
+ exit;
+ }
+ }
+}
+
+
+// Fetch bookings for dropdown
+$stmt = $conn->prepare("SELECT eft_id FROM bookings WHERE user_id = ? AND status = 'AWAITING PAYMENT'");
+//TODO add membership id as well
+$stmt->bind_param("i", $user_id);
+$stmt->execute();
+$result = $stmt->get_result();
+$bookings = $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
+
+
+ Home
+ Submit Proof of Payment
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uploads/pop/COURSE 11-22 C. PINTO.pdf b/uploads/pop/COURSE 11-22 C. PINTO.pdf
new file mode 100644
index 00000000..3d0f1176
Binary files /dev/null and b/uploads/pop/COURSE 11-22 C. PINTO.pdf differ
diff --git a/uploads/signatures/index.html b/uploads/signatures/index.html
deleted file mode 100644
index 20690f80..00000000
--- a/uploads/signatures/index.html
+++ /dev/null
@@ -1,1065 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Ravelo - Travel & Tour Booking HTML Template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Get Appointment
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Destinations
-
- City or Region
- City
- Region
-
-
-
-
-
All Activity
-
- Choose Activity
- Daily
- Monthly
-
-
-
-
-
Departure Date
-
- Date from
- 10
- 20
-
-
-
-
-
Guests
-
- 0
- 1
- 2
-
-
-
-
- Search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Discover the World's Treasures with Ravelo
-
One site 0 most popular experience you’ll remember
-
-
-
-
-
-
-
-
4.8
-
-
-
-
-
Tours, France
-
-
3 days 2 nights - Couple
-
-
-
-
-
-
-
-
4.8
-
-
-
-
-
Wildest, Italy
-
-
3 days 2 nights - Couple
-
-
-
-
-
-
-
-
4.8
-
-
-
-
-
Rome, Italy
-
-
3 days 2 nights - Couple
-
-
-
-
-
-
-
-
4.8
-
-
-
-
-
Rome, Italy
-
-
3 days 2 nights - Couple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Travel with Confidence Top Reasons to Choose Our Agency
-
-
We go above and beyond to make your travel dreams reality hidden gems and must-see attractions
-
We have 0 Years of experience
-
-
-
- 0
- Popular Destination
-
-
-
-
- 0
- Satisfied Clients
-
-
-
-
- Explore Destinations
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Explore Popular Destinations
-
One site 0 most popular experience
-
-
-
-
-
-
-
-
-
-
-
-
-
-
5352+ tours & 856+ Activity
-
-
-
-
-
-
-
-
-
-
-
-
-
5352+ tours & 856+ Activity
-
-
-
-
-
-
-
-
-
-
-
-
-
5352+ tours & 856+ Activity
-
-
-
-
-
-
-
-
-
-
-
-
-
5352+ tours & 856+ Activity
-
-
-
-
-
-
-
-
-
-
-
-
-
5352+ tours & 856+ Activity
-
-
-
-
-
-
-
-
-
-
-
-
-
5352+ tours & 856+ Activity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The Ultimate Travel Experience Features That Set Our Agency Apart
-
-
-
-
-
-
-
-
850K+ Happy Customer
-
0 Years
-
We pride ourselves offering personalized itineraries
-
-
-
-
-
-
-
-
-
-
-
-
Tent camping is wonderful way to connect with nature
-
-
-
-
-
-
-
Kayaking is a thrilling outdoor activity that adventure
-
-
-
-
-
-
-
-
-
Mountain biking is exhilarating sport that physical fitness
-
-
-
-
-
-
-
Fishing and boat bring joy quintessential activities that
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Discover the World's Class Top Hotel
-
One site 0 most popular experience you’ll remember
-
-
-
-
-
-
-
-
4.8
-
-
-
-
-
Ao Nang, Thailand
-
-
- 2 Bed room
- 1 kitchen
- 2 Wash room
- Internet
-
-
-
-
-
-
-
-
-
4.8
-
-
-
-
-
Kigali, Rwanda
-
-
- 2 Bed room
- 1 kitchen
- 2 Wash room
- Internet
-
-
-
-
-
-
-
-
-
Ao Nang, Thailand
-
-
- 2 Bed room
- 1 kitchen
- 2 Wash room
- Internet
-
-
-
-
-
4.8
-
-
-
-
-
-
-
-
-
Ao Nang, Thailand
-
-
- 2 Bed room
- 1 kitchen
- 2 Wash room
- Internet
-
-
-
-
-
4.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
We Are Available On the Store Get Our Mobile Apps Very Easily
-
-
We go above and beyond to make your travel dreams a reality. Trust us to handle the details so you can creating unforgettable memories. Explore the world with confidence
-
- Experience Agency
- Professional Team
- Low Cost Travel
- Online Support 24/7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
5280 Global Clients Say About Us Services
-
-
-
-
-
"Our trip was absolutely a perfect, thanks this travel agency! They took care of every detail, from to accommodations, and even suggested incredible experiences"
-
-
-
-
Randall V. Vasquez
- Graphics Designer
-
-
-
-
-
-
"Our trip was absolutely a perfect, thanks this travel agency! They took care of every detail, from to accommodations, and even suggested incredible experiences"
-
-
-
-
Randall V. Vasquez
- Graphics Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Read Latest News & Blog
-
One site 0 most popular experience you’ll remember
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
Submit Proof of Payment
+ +To finalise your booking, select the booking that you have paid for below, and then upload your PDF proof of payment.
+