/
home
/
wellcas2
/
public_html
/
Upload File
HOME
<?php $pageTitle = "Contact & Debt Assessment | Wellcash"; $activePage = "contact"; require_once 'config/helpers.php'; $contactInfo = db_one($pdo, 'sitecontact'); $sectionTitle = db_one($pdo, 'section_title'); include 'template/header.php'; // Initialize variables for preserving input values $name_val = ""; $email_val = ""; $debt_val = ""; $msg_html = ""; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name_val = htmlspecialchars(trim($_POST['name'] ?? '')); $email_val = filter_var(trim($_POST['email'] ?? ''), FILTER_VALIDATE_EMAIL); $debt_raw = $_POST['debt_amount'] ?? ''; $debt_val = $debt_raw !== '' ? floatval($debt_raw) : 0; if ($name_val && $email_val && $debt_val > 0) { // SUCCESS PROCESSING LOGIC: // You can add email notification (e.g., mail()) or database insertion here. $msg_html = "<div class='alert-box success-msg'> <strong>Success!</strong> Thank you, " . $name_val . ". We have received your inquiry regarding the outstanding balance of $" . number_format($debt_val, 2) . ". A recovery specialist will contact you shortly. </div>"; // Clear variables on success so the form resets $name_val = $email_val = $debt_val = ""; } else { // ERROR LOGIC: $msg_html = "<div class='alert-box error-msg'> <strong>Error:</strong> Please fill out all fields with valid information. Ensure your estimated debt is greater than 0. </div>"; } } ?> <section class="contact-section"> <div class="container contact-split-container"> <!-- LEFT COLUMN: Contact Information --> <div class="contact-info-column reveal delay-1"> <span class="location-badge"> <i class="fa-solid fa-handshake-simple" style="color: var(--brand-red); margin-right: 6px;"></i> Professional Recovery Partner </span> <h1 class="contact-title"><?php echo $sectionTitle ? htmlspecialchars($sectionTitle['contact_title']) : 'Let’s restore what is'; ?> <span class="text-red"><?php echo $sectionTitle ? '' : 'rightfully yours.'; ?></span></h1> <p class="contact-subtitle"><?php echo $sectionTitle ? htmlspecialchars($sectionTitle['contact_text']) : 'Get in touch with our intake team today. Whether you have a single commercial delinquency or a high-volume consumer portfolio, we provide structured, legally compliant paths to recovery.'; ?></p> <div class="info-list"> <!-- Phone Item --> <div class="info-item" style="display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start;"> <div class="info-icon" style="font-size: 24px; color: var(--brand-red); width: 40px; text-align: center;"> <i class="fa-solid fa-phone-volume"></i> </div> <div class="info-details"> <h4 style="margin: 0 0 5px 0; font-size: 18px;">Call Our Intake Desk</h4> <?php $phone1 = $contactInfo['phone1'] ?? '+263 (242) 700-000'; ?> <p style="margin: 0;"><a href="tel:<?php echo htmlspecialchars(preg_replace('/[^0-9+]/', '', $phone1)); ?>" style="color: inherit; text-decoration: none;"><?php echo htmlspecialchars($phone1); ?></a></p> <?php if (!empty($contactInfo['phone2']) && $contactInfo['phone2'] !== $phone1): ?> <p style="margin: 0;"><a href="tel:<?php echo htmlspecialchars(preg_replace('/[^0-9+]/', '', $contactInfo['phone2'])); ?>" style="color: inherit; text-decoration: none;"><?php echo htmlspecialchars($contactInfo['phone2']); ?></a></p> <?php endif; ?> </div> </div> <!-- Email Item --> <div class="info-item" style="display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start;"> <div class="info-icon" style="font-size: 24px; color: var(--brand-red); width: 40px; text-align: center;"> <i class="fa-solid fa-envelope-open-text"></i> </div> <div class="info-details"> <h4 style="margin: 0 0 5px 0; font-size: 18px;">Email Submissions</h4> <?php $email1 = $contactInfo['email1'] ?? 'info@wellcashdc.co.zw'; ?> <p style="margin: 0;"><a href="mailto:<?php echo htmlspecialchars($email1); ?>" style="color: inherit; text-decoration: none;"><?php echo htmlspecialchars($email1); ?></a></p> </div> </div> <!-- Headquarters Item --> <div class="info-item" style="display: flex; gap: 15px; align-items: flex-start;"> <div class="info-icon" style="font-size: 24px; color: var(--brand-red); width: 40px; text-align: center;"> <i class="fa-solid fa-building-flag"></i> </div> <div class="info-details"> <h4 style="margin: 0 0 5px 0; font-size: 18px;">Headquarters</h4> <p style="margin: 0; color: #555;">2 Northampton Avenue, Eastlea, Harare, Zimbabwe</p> </div> </div> </div> </div> <!-- RIGHT COLUMN: Contact Form Card --> <div class="contact-form-column reveal delay-2"> <div class="form-card"> <h3>Request an Assessment</h3> <p>Submit your claim details securely below to initiate a review.</p> <!-- Display status messages inline dynamically --> <?php echo $msg_html; ?> <form method="POST" action="" class="modern-form"> <div class="form-group"> <label for="name">Full Name</label> <input type="text" name="name" id="name" placeholder="e.g. John Doe" value="<?php echo htmlspecialchars($name_val); ?>" required> </div> <div class="form-group"> <label for="email">Email Address</label> <input type="email" name="email" id="email" placeholder="e.g. john@company.co.zw" value="<?php echo htmlspecialchars($email_val ? $_POST['email'] : ''); ?>" required> </div> <div class="form-group"> <label for="debt_amount">Estimated Outstanding Debt ($)</label> <input type="number" name="debt_amount" id="debt_amount" step="0.01" min="0.01" placeholder="0.00" value="<?php echo $debt_val > 0 ? htmlspecialchars($debt_val) : ''; ?>" required> </div> <button type="submit" class="btn btn-red btn-pill submit-btn" style="display: inline-flex; align-items: center; gap: 8px;"> Submit Request <i class="fa-solid fa-arrow-right-long"></i> </button> </form> </div> </div> </div> </section> <?php include 'template/footer.php'; ?>