V1
This commit is contained in:
parent
d604ef4d58
commit
88faa8fb09
5
.env
Normal file
5
.env
Normal file
@ -0,0 +1,5 @@
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=local_db
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=password
|
||||
22
README.md
Normal file
22
README.md
Normal file
@ -0,0 +1,22 @@
|
||||
# Agency Lead Generation Website
|
||||
|
||||
This project is a simple lead generation website for a medical agency. It includes a public-facing landing page with a contact form to capture leads.
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `index.php`: The main landing page.
|
||||
- `contact_handler.php`: Handles the contact form submission.
|
||||
- `lib.php`: Contains helper functions.
|
||||
- `assets/`: Contains CSS and JavaScript files.
|
||||
- `css/custom.css`: Custom stylesheets.
|
||||
- `js/main.js`: Custom JavaScript.
|
||||
- `db/`: Contains database-related files.
|
||||
- `config.php`: Database configuration and connection.
|
||||
- `migrations/`: Contains database migration files.
|
||||
- `.env`: Contains environment variables, including database credentials.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Create a `.env` file and add your database credentials.
|
||||
2. Run the migration scripts in `db/migrations/` to create the necessary tables.
|
||||
3. (Optional) Run `db/seed.php` to seed the database with sample data.
|
||||
1
assets/css/custom.css
Normal file
1
assets/css/custom.css
Normal file
@ -0,0 +1 @@
|
||||
/* Custom CSS will go here */
|
||||
62
assets/js/main.js
Normal file
62
assets/js/main.js
Normal file
@ -0,0 +1,62 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
// Smooth scroll for navigation links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const contactForm = document.getElementById('contactForm');
|
||||
const formAlert = document.getElementById('form-alert');
|
||||
|
||||
if (contactForm) {
|
||||
contactForm.addEventListener('submit', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (!contactForm.checkValidity()) {
|
||||
contactForm.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = new FormData(contactForm);
|
||||
const submitButton = contactForm.querySelector('button[type="submit"]');
|
||||
const originalButtonText = submitButton.innerHTML;
|
||||
|
||||
submitButton.disabled = true;
|
||||
submitButton.innerHTML = '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Sending...';
|
||||
|
||||
fetch('contact_handler.php', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
formAlert.classList.remove('d-none', 'alert-danger', 'alert-success');
|
||||
if (data.success) {
|
||||
formAlert.classList.add('alert-success');
|
||||
formAlert.textContent = data.message;
|
||||
contactForm.reset();
|
||||
contactForm.classList.remove('was-validated');
|
||||
} else {
|
||||
formAlert.classList.add('alert-danger');
|
||||
formAlert.textContent = data.error || 'An unknown error occurred.';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
formAlert.classList.remove('d-none', 'alert-success');
|
||||
formAlert.classList.add('alert-danger');
|
||||
formAlert.textContent = 'A network error occurred. Please try again.';
|
||||
console.error('Fetch Error:', error);
|
||||
})
|
||||
.finally(() => {
|
||||
submitButton.disabled = false;
|
||||
submitButton.innerHTML = originalButtonText;
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
58
contact_handler.php
Normal file
58
contact_handler.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
require_once __DIR__ . '/mail/MailService.php';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
http_response_code(405);
|
||||
echo json_encode(['success' => false, 'error' => 'Method Not Allowed']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$name = $_POST['name'] ?? '';
|
||||
$email = $_POST['email'] ?? '';
|
||||
$phone = $_POST['phone'] ?? '';
|
||||
$message = $_POST['message'] ?? '';
|
||||
|
||||
if (empty($name) || empty($email) || empty($message)) {
|
||||
http_response_code(400);
|
||||
echo json_encode(['success' => false, 'error' => 'Please fill in all required fields.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
http_response_code(400);
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid email format.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$pdo = db();
|
||||
|
||||
if (!$pdo) {
|
||||
http_response_code(500);
|
||||
echo json_encode(['success' => false, 'error' => 'Database connection failed.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
try {
|
||||
$stmt = $pdo->prepare("INSERT INTO leads (name, email, phone, message) VALUES (?, ?, ?, ?)");
|
||||
$stmt->execute([$name, $email, $phone, $message]);
|
||||
} catch (PDOException $e) {
|
||||
http_response_code(500);
|
||||
error_log('DB Insert Error: ' . $e->getMessage());
|
||||
echo json_encode(['success' => false, 'error' => 'An error occurred while saving your message.']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$contactEmailResult = MailService::sendContactMessage($name, $email, $message);
|
||||
|
||||
if (empty($contactEmailResult['success'])) {
|
||||
// Log the error, but don't block the user. The lead is already saved.
|
||||
error_log("Failed to send contact form email: " . ($contactEmailResult['error'] ?? 'Unknown error'));
|
||||
}
|
||||
|
||||
|
||||
if (!headers_sent()) {
|
||||
header('Content-Type: application/json');
|
||||
}
|
||||
echo json_encode(['success' => true, 'message' => 'Thank you for your message! We will get back to you shortly.']);
|
||||
@ -1,17 +1,44 @@
|
||||
<?php
|
||||
// Generated by setup_mariadb_project.sh — edit as needed.
|
||||
define('DB_HOST', '127.0.0.1');
|
||||
define('DB_NAME', 'app_36525');
|
||||
define('DB_USER', 'app_36525');
|
||||
define('DB_PASS', '1a8cc708-b513-4573-a00c-73b5c345f14f');
|
||||
|
||||
function db() {
|
||||
static $pdo;
|
||||
if (!$pdo) {
|
||||
$pdo = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';charset=utf8mb4', DB_USER, DB_PASS, [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
]);
|
||||
}
|
||||
return $pdo;
|
||||
require_once __DIR__ . '/../lib.php';
|
||||
|
||||
load_env(__DIR__ . '/../.env');
|
||||
|
||||
function db(): ?PDO
|
||||
{
|
||||
static $pdo = null;
|
||||
|
||||
if ($pdo !== null) {
|
||||
return $pdo;
|
||||
}
|
||||
|
||||
$host = getenv('DB_HOST');
|
||||
$port = getenv('DB_PORT');
|
||||
$db = getenv('DB_DATABASE');
|
||||
$user = getenv('DB_USERNAME');
|
||||
$pass = getenv('DB_PASSWORD');
|
||||
|
||||
if (!$host || !$db || !$user) {
|
||||
// You could log an error or throw an exception here
|
||||
return null;
|
||||
}
|
||||
|
||||
$dsn = "mysql:host={$host};port={$port};dbname={$db};charset=utf8mb4";
|
||||
|
||||
$options = [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
];
|
||||
|
||||
try {
|
||||
$pdo = new PDO($dsn, $user, $pass, $options);
|
||||
return $pdo;
|
||||
} catch (PDOException $e) {
|
||||
// In a real application, you'd log this error and show a generic error page.
|
||||
// For development, it's okay to show the error.
|
||||
// throw new PDOException($e->getMessage(), (int)$e->getCode());
|
||||
error_log('DB Connection Error: ' . $e->getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
8
db/migrations/001_create_leads_table.sql
Normal file
8
db/migrations/001_create_leads_table.sql
Normal file
@ -0,0 +1,8 @@
|
||||
CREATE TABLE IF NOT EXISTS leads (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
email VARCHAR(255) NOT NULL,
|
||||
phone VARCHAR(50),
|
||||
message TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
348
index.php
348
index.php
@ -1,150 +1,210 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
@ini_set('display_errors', '1');
|
||||
@error_reporting(E_ALL);
|
||||
@date_default_timezone_set('UTC');
|
||||
|
||||
$phpVersion = PHP_VERSION;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
?>
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<?php
|
||||
// Read project preview data from environment
|
||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
?>
|
||||
<?php if ($projectDescription): ?>
|
||||
<!-- Meta description -->
|
||||
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<!-- Twitter meta tags -->
|
||||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if ($projectImageUrl): ?>
|
||||
<!-- Open Graph image -->
|
||||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<!-- Twitter image -->
|
||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<?php endif; ?>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
@keyframes bg-pan {
|
||||
0% { background-position: 0% 0%; }
|
||||
100% { background-position: 100% 100%; }
|
||||
}
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.loader {
|
||||
margin: 1.25rem auto 1.25rem;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
.hint {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px; height: 1px;
|
||||
padding: 0; margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap; border: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
code {
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Medical Agency - Your Health is Our Priority</title>
|
||||
<meta name="description" content="A leading medical agency providing top-tier health services, patient care, and treatment solutions.">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
<style>
|
||||
:root {
|
||||
--bs-primary-rgb: 13, 110, 253; /* Custom primary color */
|
||||
}
|
||||
.hero-section {
|
||||
background: linear-gradient(rgba(13, 110, 253, 0.05), rgba(255, 255, 255, 0)), url('https://images.pexels.com/photos/4021775/pexels-photo-4021775.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center;
|
||||
background-size: cover;
|
||||
color: #333;
|
||||
}
|
||||
.section-icon {
|
||||
font-size: 2.5rem;
|
||||
color: var(--bs-primary);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your website…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
</div>
|
||||
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
</footer>
|
||||
|
||||
<!-- Header -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand fw-bold" href="#">
|
||||
<i class="bi bi-heart-pulse-fill text-primary"></i> MedAgency
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="#services">Services</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#testimonials">Testimonials</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<header class="hero-section py-5">
|
||||
<div class="container text-center py-5">
|
||||
<h1 class="display-4 fw-bold">Compassionate Care, Advanced Solutions</h1>
|
||||
<p class="lead col-lg-8 mx-auto">We connect you with world-class medical experts and facilities, ensuring a seamless journey to better health.</p>
|
||||
<a href="#contact" class="btn btn-primary btn-lg mt-3">Request a Free Quote</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<!-- Services Section -->
|
||||
<section id="services" class="py-5 bg-light">
|
||||
<div class="container">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="fw-bold">Our Services</h2>
|
||||
<p class="text-muted">Comprehensive support for your medical needs.</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Service Item 1 -->
|
||||
<div class="col-md-4 mb-4">
|
||||
<div class="card h-100 text-center p-4">
|
||||
<i class="bi bi-person-check-fill section-icon mb-3"></i>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bold">Personalized Treatment Plans</h5>
|
||||
<p class="card-text">Tailored medical strategies designed by top specialists to meet your unique health requirements.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Service Item 2 -->
|
||||
<div class="col-md-4 mb-4">
|
||||
<div class="card h-100 text-center p-4">
|
||||
<i class="bi bi-geo-alt-fill section-icon mb-3"></i>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bold">International Client Services</h5>
|
||||
<p class="card-text">Multi-language support and currency options for a hassle-free experience, no matter where you are.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Service Item 3 -->
|
||||
<div class="col-md-4 mb-4">
|
||||
<div class="card h-100 text-center p-4">
|
||||
<i class="bi bi-shield-check section-icon mb-3"></i>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bold">Patient Workflow Management</h5>
|
||||
<p class="card-text">A dedicated CRM to manage your entire treatment journey, from consultation to recovery.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- About Section -->
|
||||
<section id="about" class="py-5">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<img src="https://images.pexels.com/photos/5452292/pexels-photo-5452292.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1" class="img-fluid rounded shadow" alt="About MedAgency">
|
||||
</div>
|
||||
<div class="col-lg-6 mt-4 mt-lg-0">
|
||||
<h2 class="fw-bold">About MedAgency</h2>
|
||||
<p class="text-muted">Founded on the principle of patient-centric care, MedAgency was created to bridge the gap between patients and high-quality medical services worldwide. Our team is dedicated to providing transparent, efficient, and compassionate support throughout your healthcare journey.</p>
|
||||
<p>We leverage cutting-edge technology and a vast network of certified professionals to ensure you receive the best possible care.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Testimonials -->
|
||||
<section id="testimonials" class="py-5 bg-light">
|
||||
<div class="container">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="fw-bold">What Our Patients Say</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-lg-4 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="fst-italic">"The entire process was so smooth and professional. MedAgency took care of everything, and I could focus solely on my recovery."</p>
|
||||
<footer class="blockquote-footer mt-2">John Doe</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-4 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="fst-italic">"I was amazed by the level of personalized care. The team was always there to answer my questions and support me."</p>
|
||||
<footer class="blockquote-footer mt-2">Jane Smith</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-4 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="fst-italic">"Navigating international healthcare seemed daunting, but MedAgency made it simple and stress-free."</p>
|
||||
<footer class="blockquote-footer mt-2">Samuel Lee</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Contact Form -->
|
||||
<section id="contact" class="py-5">
|
||||
<div class="container">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="fw-bold">Get a Free Quote</h2>
|
||||
<p class="text-muted">Fill out the form below, and we'll get back to you with a personalized treatment estimate.</p>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8">
|
||||
<form id="contactForm" novalidate>
|
||||
<div id="form-alert" class="alert d-none"></div>
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Full Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" required>
|
||||
<div class="invalid-feedback">Please enter your name.</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email Address</label>
|
||||
<input type="email" class="form-control" id="email" name="email" required>
|
||||
<div class="invalid-feedback">Please enter a valid email.</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label">Phone Number (Optional)</label>
|
||||
<input type="tel" class="form-control" id="phone" name="phone">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="message" class="form-label">Your Message or Inquiry</label>
|
||||
<textarea class="form-control" id="message" name="message" rows="5" required></textarea>
|
||||
<div class="invalid-feedback">Please enter your message.</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary btn-lg">Submit Request</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="bg-dark text-white py-4">
|
||||
<div class="container text-center">
|
||||
<p>© <?php echo date("Y"); ?> MedAgency. All Rights Reserved.</p>
|
||||
<div>
|
||||
<a href="#" class="text-white me-2"><i class="bi bi-twitter"></i></a>
|
||||
<a href="#" class="text-white me-2"><i class="bi bi-facebook"></i></a>
|
||||
<a href="#" class="text-white"><i class="bi bi-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
25
lib.php
Normal file
25
lib.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
function load_env($path)
|
||||
{
|
||||
if (!file_exists($path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$lines = file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
foreach ($lines as $line) {
|
||||
if (strpos(trim($line), '#') === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
list($name, $value) = explode('=', $line, 2);
|
||||
$name = trim($name);
|
||||
$value = trim($value);
|
||||
|
||||
if (!array_key_exists($name, $_SERVER) && !array_key_exists($name, $_ENV)) {
|
||||
putenv(sprintf('%s=%s', $name, $value));
|
||||
$_ENV[$name] = $value;
|
||||
$_SERVER[$name] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user