<?php
require_once '../veritabani.php';
require_once '../netgsm.php';

$mesaj = "";


/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/

?>

<!DOCTYPE html>
<html lang="tr">
<head>
  <meta charset="UTF-8">
  <title>Teklif Linki Gönder</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="https://cdn.tailwindcss.com"></script>
  <script src="https://unpkg.com/lucide@latest"></script>
  <style>
    body {
      background: radial-gradient(circle at top left, #1e1e2f, #10101a);
      font-family: 'Orbitron', sans-serif;
      color: #fff;
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0;
      padding: 1rem;
    }
    .giris-box {
      max-width: 420px;
      width: 100%;
      padding: 30px;
      border-radius: 20px;
      background: linear-gradient(145deg, #2c2c3e, #1e1e2f);
      box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    }
    .giris-box input {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
      width: 100%;
      padding: 12px;
      margin-bottom: 12px;
      border: none;
      border-radius: 12px;
    }
    .giris-box input::placeholder {
      color: #cbd5e1;
    }
    .giris-box button {
      background: linear-gradient(to right, #ff800a, #ffb347);
      color: white;
      padding: 12px;
      width: 100%;
      border: none;
      border-radius: 50px;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: transform 0.2s ease;
      margin-top: 6px;
    }
    .giris-box button:hover {
      transform: scale(1.03);
      background: #e67100;
    }
    .info-text {
      color: #cbd5e1;
      font-size: 0.875rem;
      text-align: center;
      margin-top: 16px;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 6px;
      font-style: italic;
    }
  </style>
</head>
<body>
  <div class="giris-box animate-fade">
    <div class="flex items-center justify-center gap-3 mb-6">
      <i data-lucide="send" class="w-6 h-6 text-[#ff800a]"></i>
      <h2 class="text-xl font-bold text-[#ff800a] text-center">Teklif Bağlantısı Gönder</h2>
    </div>

    <?php if ($mesaj): ?>
      <div class="mb-4 p-3 flex items-center gap-2 text-sm font-semibold text-white rounded-lg <?= $mesaj === 'success' ? 'bg-green-500' : 'bg-red-500' ?>">
        <i data-lucide="<?= $mesaj === 'success' ? 'check-circle' : 'alert-circle' ?>" class="w-5 h-5"></i>
        <?= $mesaj === 'success' ? 'Link başarıyla gönderildi.' : 'Hata: ' . htmlspecialchars($mesaj) ?>
      </div>
    <?php endif; ?>

    <form method="POST">
      <input type="text" name="telefon" placeholder="5XXXXXXXXX" maxlength="10" required>
      <button type="submit"><i data-lucide="link"></i> SMS ile Link Gönder</button>
    </form>

    <p class="info-text">
      <i data-lucide="info" class="w-4 h-4"></i> Ziyaretçiye SMS ile özel bağlantı gönderilir.
    </p>
  </div>

  <script>
    lucide.createIcons();
  </script>
</body>
</html>