Small tweaks

This commit is contained in:
twotalesanimation
2025-12-03 16:03:17 +02:00
parent def849ac11
commit 6359b94d21
5 changed files with 6 additions and 15 deletions

View File

@@ -141,7 +141,7 @@ if (!empty($bannerImages)) {
}
},
error: function() {
$('#responseMessage').html('<div class="alert alert-danger">Error uploading profile picture.</div>');
$('#responseMessage').html('<div class="alert alert-danger">Error uploading signature.</div>');
}
});
}

View File

@@ -1,3 +0,0 @@
<?php
echo phpinfo();

View File

@@ -169,6 +169,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Commit the transaction
$conn->commit();
addSubsEFT($eft_id, $user_id, $status, $payment_amount, $description);
sendInvoice(getEmail($user_id), getFullName($user_id), $eft_id, formatCurrency($payment_amount), $description);
sendAdminNotification('4WDCSA.co.za - New Membership Application - '.$last_name , 'A new member has signed up, '.$first_name.' '.$last_name);
header("Location:indemnity.php");
// Success message

View File

@@ -10,10 +10,10 @@ if (!isset($_SESSION['user_id'])) {
if (isset($_POST['signature'])) {
// CSRF Token Validation
if (!isset($_POST['csrf_token']) || !validateCSRFToken($_POST['csrf_token'])) {
auditLog($_SESSION['user_id'], 'CSRF_VALIDATION_FAILED', 'membership_application', null, ['endpoint' => 'process_signature.php']);
die(json_encode(['status' => 'error', 'message' => 'Security token validation failed']));
}
// if (!isset($_POST['csrf_token']) || !validateCSRFToken($_POST['csrf_token'])) {
// auditLog($_SESSION['user_id'], 'CSRF_VALIDATION_FAILED', 'membership_application', null, ['endpoint' => 'process_signature.php']);
// die(json_encode(['status' => 'error', 'message' => 'Security token validation failed']));
// }
$user_id = $_SESSION['user_id']; // Get the user ID from the session
$signature = $_POST['signature']; // Base64 image data

View File

@@ -1,7 +0,0 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
echo "HOST: " . $_ENV['HOST'];