Files
tomsjavajive/contact.php
T
myron c1c926a416 Fix contact info — correct email, phone, and ZIP throughout
sales@tomsjavajive.com, (817) 266-2022, Weatherford TX 76088 applied to
contact page, header schema, returns page, and FAQ. Fix Quick Links
list style so links render properly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 18:49:24 +00:00

170 lines
11 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
$pageTitle = "Contact Us - Tom's Java Jive";
$metaDescription = "Get in touch with Tom's Java Jive. We're here to help with orders, questions, and anything coffee-related.";
$canonicalUrl = 'https://tomsjavajive.com/contact.php';
$breadcrumbs = [
['name' => 'Home', 'url' => 'https://tomsjavajive.com'],
['name' => 'Contact', 'url' => 'https://tomsjavajive.com/contact.php']
];
require_once __DIR__ . '/includes/functions.php';
$sent = false;
$errors = [];
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = trim($_POST['name'] ?? '');
$email = trim($_POST['email'] ?? '');
$subject = trim($_POST['subject'] ?? '');
$message = trim($_POST['message'] ?? '');
if (empty($name)) $errors['name'] = 'Name is required.';
if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL))
$errors['email'] = 'A valid email address is required.';
if (empty($subject)) $errors['subject'] = 'Please choose a subject.';
if (empty($message)) $errors['message'] = 'Message cannot be empty.';
if (empty($errors)) {
$body = "Name: {$name}\nEmail: {$email}\nSubject: {$subject}\n\n{$message}";
cybermailSend('sales@tomsjavajive.com', "Contact Form: {$subject}", $body, $name, $email);
$sent = true;
}
}
require_once __DIR__ . '/includes/header.php';
?>
<section class="section" style="padding-top: 2rem; padding-bottom: 4rem;">
<div class="container" style="max-width: 900px;">
<div style="text-align: center; margin-bottom: 3rem;">
<h1 style="font-size: 2.5rem; margin-bottom: 0.75rem;">Contact Us</h1>
<p class="text-muted" style="font-size: 1.1rem;">Questions about your order or just want to talk coffee? We'd love to hear from you.</p>
</div>
<div style="display: grid; grid-template-columns: 1fr 1.6fr; gap: 2.5rem; align-items: start;">
<!-- Contact Info -->
<div>
<div class="card" style="margin-bottom: 1.5rem;">
<div class="card-body">
<h3 style="margin-bottom: 1.25rem; font-size: 1.1rem;">Get in Touch</h3>
<div style="display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 1.25rem;">
<div style="width: 38px; height: 38px; background: rgba(255,94,26,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--color-primary);">
<i class="fas fa-envelope"></i>
</div>
<div>
<div style="font-weight: 600; margin-bottom: 0.2rem;">Email</div>
<a href="mailto:sales@tomsjavajive.com">sales@tomsjavajive.com</a>
<div class="text-muted" style="font-size: 0.85rem; margin-top: 0.15rem;">We reply within 1 business day</div>
</div>
</div>
<div style="display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 1.25rem;">
<div style="width: 38px; height: 38px; background: rgba(255,94,26,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--color-primary);">
<i class="fas fa-phone"></i>
</div>
<div>
<div style="font-weight: 600; margin-bottom: 0.2rem;">Phone</div>
<a href="tel:+18172662022">(817) 266-2022</a>
<div class="text-muted" style="font-size: 0.85rem; margin-top: 0.15rem;">MonFri, 9am5pm CT</div>
</div>
</div>
<div style="display: flex; align-items: flex-start; gap: 0.85rem;">
<div style="width: 38px; height: 38px; background: rgba(255,94,26,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--color-primary);">
<i class="fas fa-map-marker-alt"></i>
</div>
<div>
<div style="font-weight: 600; margin-bottom: 0.2rem;">Location</div>
<div>Weatherford, TX 76088</div>
<div class="text-muted" style="font-size: 0.85rem; margin-top: 0.15rem;">United States</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h3 style="margin-bottom: 0.75rem; font-size: 1rem;">Quick Links</h3>
<ul style="list-style: none; padding: 0; margin: 0;">
<li style="margin-bottom: 0.6rem;"><a href="/track-order.php"><i class="fas fa-search" style="width: 16px; margin-right: 0.4rem;"></i> Track Your Order</a></li>
<li style="margin-bottom: 0.6rem;"><a href="/returns.php"><i class="fas fa-undo" style="width: 16px; margin-right: 0.4rem;"></i> Returns &amp; Refunds</a></li>
<li style="margin-bottom: 0.6rem;"><a href="/shipping.php"><i class="fas fa-truck" style="width: 16px; margin-right: 0.4rem;"></i> Shipping Info</a></li>
<li><a href="/faq.php"><i class="fas fa-question-circle" style="width: 16px; margin-right: 0.4rem;"></i> FAQ</a></li>
</ul>
</div>
</div>
</div>
<!-- Contact Form -->
<div class="card">
<div class="card-body">
<?php if ($sent): ?>
<div style="text-align: center; padding: 2rem 0;">
<div style="font-size: 3rem; margin-bottom: 1rem;">☕</div>
<h3 style="margin-bottom: 0.5rem;">Message Sent!</h3>
<p class="text-muted">Thanks for reaching out. We'll get back to you within one business day.</p>
<a href="/shop.php" class="btn btn-primary mt-2">Browse Our Coffee</a>
</div>
<?php else: ?>
<h3 style="margin-bottom: 1.5rem; font-size: 1.1rem;">Send a Message</h3>
<form method="POST" action="">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
<div class="form-group">
<label class="form-label">Your Name *</label>
<input type="text" name="name" class="form-input <?= isset($errors['name']) ? 'is-invalid' : '' ?>"
value="<?= htmlspecialchars($_POST['name'] ?? '') ?>" required>
<?php if (isset($errors['name'])): ?>
<span class="form-error"><?= $errors['name'] ?></span>
<?php endif; ?>
</div>
<div class="form-group">
<label class="form-label">Email Address *</label>
<input type="email" name="email" class="form-input <?= isset($errors['email']) ? 'is-invalid' : '' ?>"
value="<?= htmlspecialchars($_POST['email'] ?? '') ?>" required>
<?php if (isset($errors['email'])): ?>
<span class="form-error"><?= $errors['email'] ?></span>
<?php endif; ?>
</div>
</div>
<div class="form-group">
<label class="form-label">Subject *</label>
<select name="subject" class="form-input <?= isset($errors['subject']) ? 'is-invalid' : '' ?>" required>
<option value="">— Select a subject —</option>
<option value="Order Question" <?= ($_POST['subject'] ?? '') === 'Order Question' ? 'selected' : '' ?>>Order Question</option>
<option value="Shipping &amp; Delivery" <?= ($_POST['subject'] ?? '') === 'Shipping &amp; Delivery' ? 'selected' : '' ?>>Shipping &amp; Delivery</option>
<option value="Returns &amp; Refunds" <?= ($_POST['subject'] ?? '') === 'Returns &amp; Refunds' ? 'selected' : '' ?>>Returns &amp; Refunds</option>
<option value="Product Question" <?= ($_POST['subject'] ?? '') === 'Product Question' ? 'selected' : '' ?>>Product Question</option>
<option value="Wholesale Inquiry" <?= ($_POST['subject'] ?? '') === 'Wholesale Inquiry' ? 'selected' : '' ?>>Wholesale Inquiry</option>
<option value="Other" <?= ($_POST['subject'] ?? '') === 'Other' ? 'selected' : '' ?>>Other</option>
</select>
<?php if (isset($errors['subject'])): ?>
<span class="form-error"><?= $errors['subject'] ?></span>
<?php endif; ?>
</div>
<div class="form-group">
<label class="form-label">Message *</label>
<textarea name="message" class="form-textarea <?= isset($errors['message']) ? 'is-invalid' : '' ?>"
rows="5" placeholder="How can we help?" required><?= htmlspecialchars($_POST['message'] ?? '') ?></textarea>
<?php if (isset($errors['message'])): ?>
<span class="form-error"><?= $errors['message'] ?></span>
<?php endif; ?>
</div>
<button type="submit" class="btn btn-primary">
<i class="fas fa-paper-plane"></i> Send Message
</button>
</form>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<?php require_once __DIR__ . '/includes/footer.php'; ?>