message: email sending ready

This commit is contained in:
2025-02-19 16:41:09 +05:45
parent 9f2c0fec1d
commit e827dc6ccb
13 changed files with 407 additions and 131 deletions

View File

@ -1,3 +1,42 @@
<!-- Bootstrap CSS (Include if not already added) -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Toast Container (Fixed Position) -->
<div class="position-fixed top-0 end-0 p-3" style="z-index: 1050">
<?php if (isset($_GET['status'])): ?>
<div id="statusToast" class="toast align-items-center text-white bg-<?php echo ($_GET['status'] == 'success' ? 'success' : ($_GET['status'] == 'error' ? 'danger' : 'warning')); ?> border-0 show" role="alert" aria-live="assertive" aria-atomic="true">
<div class="d-flex">
<div class="toast-body">
<?php
if ($_GET['status'] == 'success') {
echo "✅ Message sent successfully!";
} elseif ($_GET['status'] == 'error') {
// echo "❌ There was an error sending your message. Please try again.";
echo "❌ There was an error: " . htmlspecialchars($_GET['message']);
} elseif ($_GET['status'] == 'missing_fields') {
echo "⚠️ Please fill in all required fields.";
}
?>
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
<?php $_GET['status'] = null; ?>
<?php endif; ?>
</div>
<!-- Bootstrap JS & Auto Hide Toast Script -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
let statusToast = document.getElementById("statusToast");
if (statusToast) {
let toast = new bootstrap.Toast(statusToast, { delay: 3000 }); // Auto-hide after 3s
toast.show();
}
});
</script>
<!DOCTYPE html>
<html lang="en">
<!--<< Header Area >>-->