Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

40
resend_verification.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
header('Content-Type: application/json');
require_once("connection.php");
require_once("functions.php");
require_once "vendor/autoload.php";
use GuzzleHttp\Client;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$data = json_decode(file_get_contents('php://input'), true);
if (!isset($data['email'], $data['name'], $data['token'])) {
echo json_encode([
'success' => false,
'message' => 'Missing required fields.'
]);
exit;
}
$email = $data['email'];
$name = $data['name'];
$token = $data['token'];
if (sendVerificationEmail($email, $name, $token)) {
$_SESSION['message'] = "Verification mail resend successful!";
echo json_encode([
'success' => true,
'message' => "Verification email sent to $email."
]);
} else {
$_SESSION['message'] = "Verification mail resend FAILED!";
echo json_encode([
'success' => false,
'message' => "Failed to send verification email to $email."
]);
}
}