HEX
Server: Apache
System: Linux p3plzcpnl485017.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: rbrijwzv8p53 (8461783)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/rbrijwzv8p53/public_html/outlinenews.com.pk/contact.php
\
<?php
$success = false;
$error = '';
$name = '';
$email = '';
$subject = '';
$message = '';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $name = trim($_POST['name'] ?? '');
    $email = trim($_POST['email'] ?? '');
    $subject = trim($_POST['subject'] ?? '');
    $message = trim($_POST['message'] ?? '');

    if ($name === '' || $email === '' || $subject === '' || $message === '') {
        $error = 'Please fill in all fields.';
    } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
        $error = 'Please enter a valid email address.';
    } else {
        $to = 'newsroom@outlinenews.com.pk'; // Replace with your real inbox
        $mailSubject = 'Outline News website contact: ' . $subject;
        $mailBody = "Name: {$name}\nEmail: {$email}\nSubject: {$subject}\n\nMessage:\n{$message}\n";
        $headers = "From: no-reply@outlinenews.com.pk\r\n";
        $headers .= "Reply-To: {$email}\r\n";
        $headers .= "Content-Type: text/plain; charset=UTF-8\r\n";

        if (@mail($to, $mailSubject, $mailBody, $headers)) {
            $success = true;
            $name = $email = $subject = $message = '';
        } else {
            $error = 'The form could not send the email on this server yet. Upload is fine, but you may need GoDaddy email/PHP mail settings or SMTP integration.';
        }
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Contact | Outline News</title>
  <meta name="description" content="Contact Outline News newsroom, advertising and editorial teams." />
  <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;500;600;700;800&family=Source+Serif+4:wght@600;700;800&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="assets/css/styles.css" />
</head>
<body>
  <div class="top-strip">
    <div class="container top-strip-inner">
      <p>Pakistan Edition</p>
      <div class="top-strip-links">
        <a href="index.php">Home</a>
        <a href="category.php?section=latest">Latest</a>
        <a href="category.php?section=pakistan">Pakistan</a>
      </div>
    </div>
  </div>

  <header class="site-header sticky-header">
    <div class="container header-main">
      <a href="index.php" class="brand">
        <span class="brand-mark">O</span>
        <span class="brand-copy"><strong>OUTLINE</strong><small>NEWS</small></span>
      </a>
      <nav class="desktop-nav">
        <a href="category.php?section=latest">Latest</a>
        <a href="category.php?section=pakistan">Pakistan</a>
        <a href="category.php?section=world">World</a>
        <a href="category.php?section=politics">Politics</a>
        <a href="category.php?section=business">Business</a>
        <a href="category.php?section=opinion">Opinion</a>
        <a href="category.php?section=video">Video</a>
      </nav>
      <div class="header-actions">
        <button class="icon-button" id="searchToggle" aria-label="Open search"><span>⌕</span></button>
        <button class="menu-button" id="menuToggle" aria-label="Open menu"><span></span><span></span><span></span></button>
      </div>
    </div>
    <div class="search-panel" id="searchPanel">
      <div class="container search-wrap">
        <input type="search" id="searchInput" placeholder="Search stories, sections, topics..." />
        <div id="searchResults" class="search-results"></div>
      </div>
    </div>
    <div class="mobile-nav" id="mobileNav">
      <div class="container mobile-nav-links">
        <a href="category.php?section=latest">Latest</a>
        <a href="category.php?section=pakistan">Pakistan</a>
        <a href="category.php?section=world">World</a>
        <a href="category.php?section=politics">Politics</a>
        <a href="category.php?section=business">Business</a>
        <a href="category.php?section=opinion">Opinion</a>
        <a href="category.php?section=video">Video</a>
        <a href="contact.php">Contact</a>
      </div>
    </div>
  </header>

  <main class="container contact-page">
    <section class="contact-hero">
      <p class="eyebrow">Outline News</p>
      <h1>Contact the newsroom</h1>
      <p>Use this page for editorial tips, advertising inquiries, and general contact. Replace the email addresses below with your official team addresses before going live.</p>
    </section>

    <section class="contact-grid">
      <div class="contact-card">
        <h3>Editorial Desk</h3>
        <p>Email: newsroom@outlinenews.com.pk</p>
        <p>Phone: +92 300 0000000</p>
        <p>For tips, corrections and story submissions.</p>
      </div>
      <div class="contact-card">
        <h3>Advertising</h3>
        <p>Email: ads@outlinenews.com.pk</p>
        <p>Phone: +92 300 0000001</p>
        <p>For campaigns, sponsorships and branded content.</p>
      </div>
      <div class="contact-card">
        <h3>General Support</h3>
        <p>Email: info@outlinenews.com.pk</p>
        <p>Phone: +92 300 0000002</p>
        <p>For feedback, partnerships and technical issues.</p>
      </div>
    </section>

    <section class="contact-form-section">
      <div>
        <h2>Send a message</h2>
        <p>This version is ready for GoDaddy cPanel hosting and uses PHP mail. Update the destination email in <strong>contact.php</strong> before launch.</p>
      </div>
      <form class="contact-form" method="post" action="contact.php">
        <?php if ($success): ?>
          <div class="form-status form-success">Thank you. Your message has been sent successfully.</div>
        <?php elseif ($error !== ''): ?>
          <div class="form-status form-error"><?php echo htmlspecialchars($error, ENT_QUOTES, 'UTF-8'); ?></div>
        <?php endif; ?>

        <div class="form-row">
          <input type="text" name="name" placeholder="Full name" value="<?php echo htmlspecialchars($name, ENT_QUOTES, 'UTF-8'); ?>" required />
          <input type="email" name="email" placeholder="Email address" value="<?php echo htmlspecialchars($email, ENT_QUOTES, 'UTF-8'); ?>" required />
        </div>
        <input type="text" name="subject" placeholder="Subject" value="<?php echo htmlspecialchars($subject, ENT_QUOTES, 'UTF-8'); ?>" required />
        <textarea rows="7" name="message" placeholder="Message" required><?php echo htmlspecialchars($message, ENT_QUOTES, 'UTF-8'); ?></textarea>
        <button type="submit">Send Message</button>
      </form>
    </section>
  </main>

  <footer class="site-footer">
    <div class="container footer-bottom single-line">
      <p>© 2026 Outline News. All rights reserved.</p>
      <div>
        <a href="index.php">Home</a>
        <a href="category.php?section=latest">Latest</a>
      </div>
    </div>
  </footer>

  <script src="assets/js/data.js"></script>
  <script src="assets/js/main.js"></script>
</body>
</html>