░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
lon105.truehost.cloud
LOCATION:
/home/ilrtztmy/versatilesecuritylimited.com/api
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: contact.php
<?php require_once 'config.php'; header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST, OPTIONS'); header('Access-Control-Allow-Headers: Content-Type'); if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { exit; } if ($_SERVER['REQUEST_METHOD'] !== 'POST') { sendJsonResponse(['success' => false, 'message' => 'Method not allowed'], 405); } $input = getJsonInput(); $name = trim($input['name'] ?? ''); $org = trim($input['org'] ?? ''); $phone = trim($input['phone'] ?? ''); $email = trim($input['email'] ?? ''); $type = trim($input['type'] ?? ''); $message = trim($input['message'] ?? ''); // Validate required fields if (!$name || !$phone || !$email || !$type || !$message) { sendJsonResponse(['success' => false, 'message' => 'All required fields must be completed.'], 400); } if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { sendJsonResponse(['success' => false, 'message' => 'Invalid email address.'], 400); } // Enforce reasonable length limits if (strlen($name) > 150 || strlen($email) > 150 || strlen($phone) > 50 || strlen($org) > 150 || strlen($message) > 1000) { sendJsonResponse(['success' => false, 'message' => 'One or more fields exceed the maximum allowed length.'], 400); } $db = getDbConnection(); $stmt = $db->prepare( "INSERT INTO inquiries (name, org, phone, email, type, message, status, created_at) VALUES (?, ?, ?, ?, ?, ?, 'new', NOW())" ); if ($stmt->execute([$name, $org, $phone, $email, $type, $message])) { sendJsonResponse(['success' => true, 'message' => 'Inquiry received.']); } else { sendJsonResponse(['success' => false, 'message' => 'Failed to submit inquiry. Please try again.'], 500); } ?>
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📁 admin/
DIR
—
2020-10-15 14:24
📄 careers.php
PHP
1.7 KB
2026-05-16 13:26
EDIT
📄 config.php
PHP
3.7 KB
2026-05-16 11:45
EDIT
📄 contact.php
PHP
1.7 KB
2026-05-16 13:27
EDIT
📄 packages-inquiry.php
PHP
1.8 KB
2026-05-16 13:26
EDIT