-
-
-
-
+
-
-
-
Interests and Hobbies
-
-
-
-
-
+
-
-
-
Primary Vehicle
-
-
-
-
-
-
-
-
-
+
-
Secondary Vehicle
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
@@ -282,3 +313,43 @@ $user = $result->fetch_assoc();
+
+
\ No newline at end of file
diff --git a/src/pages/memberships/membership_details.php b/src/pages/memberships/membership_details.php
index 8a5c39d2..d3abaff9 100644
--- a/src/pages/memberships/membership_details.php
+++ b/src/pages/memberships/membership_details.php
@@ -189,7 +189,7 @@ if (empty($application['id_number'])) {
|
|
-
PENDING RENEWAL |
+
'>= $membership['payment_status'] ?> |
|
diff --git a/src/pages/other/base4.php b/src/pages/other/base4.php
index 7b5f101f..75fc9d39 100644
--- a/src/pages/other/base4.php
+++ b/src/pages/other/base4.php
@@ -141,6 +141,17 @@ include_once($rootPath . '/header.php');
margin: 50px;
padding: 20px;
border-radius: 20px;
+ box-sizing: border-box;
+ }
+
+ @media (max-width: 768px) {
+ #map {
+ margin: 0 !important;
+ padding: 0 !important;
+ width: 100% !important;
+ height: 500px !important;
+ border-radius: 0 !important;
+ }
}
.obstacle-popup h4 {
diff --git a/src/processors/process_application.php b/src/processors/process_application.php
index 8e073398..eb22fab0 100644
--- a/src/processors/process_application.php
+++ b/src/processors/process_application.php
@@ -4,6 +4,7 @@ require_once($rootPath . "/src/config/env.php");
require_once($rootPath . "/src/config/session.php");
require_once($rootPath . "/src/config/connection.php");
require_once($rootPath . "/src/config/functions.php");
+require_once($rootPath . "/src/helpers/notification_helper.php");
$user_id = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : null;
$payment_id = generatePaymentRef('SUBS', null, $user_id);
@@ -89,7 +90,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$email = validateEmail($_POST['email'] ?? '');
if ($email === false) {
- die('Invalid email format.');
+ die('Invalid email format.');
+ }
+
+ //MEMBERSHIP TYPE
+ $country_membership = isset($_POST['country_membership']) ? 1 : 0;
+ $membership_type = in_array($_POST['membership_type'] ?? '', ['full', 'single']) ? $_POST['membership_type'] : 'full';
+
+ if ($country_membership) {
+ $membership_type = 'country';
+ }else{
+ $membership_type = $membership_type;
}
// Spouse or Partner details (optional)
@@ -136,8 +147,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
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
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ secondary_vehicle_make, secondary_vehicle_model, secondary_vehicle_year, secondary_vehicle_registration, membership_type
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
// Check if preparation was successful
if (!$stmt) {
@@ -145,7 +156,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
$stmt->bind_param(
- "isssssssssssssssssssssssssssssss",
+ "issssssssssssssssssssssssssssssss",
$user_id,
$first_name,
$last_name,
@@ -177,7 +188,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$secondary_vehicle_make,
$secondary_vehicle_model,
$secondary_vehicle_year,
- $secondary_vehicle_registration
+ $secondary_vehicle_registration,
+ $membership_type
);
if ($stmt->execute()) {
@@ -187,10 +199,22 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$year = (int)$today->format('Y');
$payment_date = $today->format('Y-m-d');
$membership_start_date = $payment_date;
+ if ($membership_type === 'country') {
+ $payment_amount = getPriceByDescription('country_membership');
+ $prorata_amount = calculateProrata(getPriceByDescription('country_prorata'));
+ } elseif ($membership_type === 'single') {
+ $payment_amount = getPriceByDescription('single');
+ $prorata_amount = calculateProrata(getPriceByDescription('single_prorata'));
+ } else {
+ $payment_amount = getPriceByDescription('membership_fees');
+ $prorata_amount = calculateProrata(getPriceByDescription('pro_rata'));
+ }
+
+
if ($month == 12 || $month == 1 || $month == 2) {
// December, January, February: charge full fee, valid till end of next Feb
- $payment_amount = getPriceByDescription('membership_fees');
+ $payment_amount = $payment_amount;
// If Dec, Jan, Feb, set end to next year's Feb
$end_year = ($month == 12) ? $year + 2 : $year + 1;
$membership_end_date = (new DateTime("$end_year-02-01"))
@@ -198,7 +222,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
->format('Y-m-d');
} else {
// Prorata for Mar-Nov
- $payment_amount = calculateProrata(getPriceByDescription('pro_rata'));
+ $payment_amount = $prorata_amount;
// End of next Feb if after Feb, else this Feb
if ($month > 2) {
$end_year = $year + 1;
diff --git a/uploads/signatures/signature_163.png b/uploads/signatures/signature_163.png
index 27bcf4f9..48a14509 100644
Binary files a/uploads/signatures/signature_163.png and b/uploads/signatures/signature_163.png differ