חיפוש מותאם
חיפוש מותאם
חיפוש מותאם
קידום אורגני סודי
				
					<style>
.cyber-lead-form {
  font-family: 'Rubik', sans-serif;
  background: linear-gradient(135deg, #0a0f1a, #101d2c);
  color: #fff;
  max-width: 900px;
  width: 99vw;
  margin: 24px auto;
  padding: 14px 10px 26px 10px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  overflow-x: auto;
}
.cyber-lead-form-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 340px;
  overflow-x: auto;
}
.cyber-lead-form label { 
  display: none; 
}
.cyber-lead-form input {
  flex: 1 1 120px;
  min-width: 70px;
  max-width: 220px;
  padding: 8px 7px;
  border: 1px solid #0abde3;
  border-radius: 8px;
  background: #0a0f1a;
  color: #fff;
  font-size: 15px;
  margin: 0;
}
.cyber-lead-form input:focus {
  border-color: #10ac84;
  box-shadow: 0 0 5px rgba(10,189,227,0.45);
  outline: none;
}
.cyber-lead-form button {
  flex: 0 0 80px;
  min-width: 72px;
  padding: 8px 0;
  background: linear-gradient(45deg,#0abde3,#10ac84);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
  margin: 0;
}
.cyber-lead-form button:hover {
  background: linear-gradient(45deg,#0984e3,#00b894);
  transform: scale(1.03);
}
#location-status {
  flex: 0 0 90px;
  min-width: 60px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 0;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
  align-self: center;
  line-height: 1.1;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.success { background-color: #113d2c; color: #10ac84; }
.error { background-color: #4d1c1c; color: #ee5253; }
.bot-icon-wrapper {
  width: 42px;
  margin: 0 auto 12px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* כפתורי פעולה */
.three-buttons {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.three-buttons a {
  display: inline-block;
  padding: 8px 13px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(45deg,#fff,#10ac84 80%);
  color: #0a0f1a;
  box-shadow: 0 2px 7px rgba(10,189,227,0.07);
  transition: background 0.2s, color 0.2s, transform 0.16s;
  letter-spacing: 0.5px;
  outline: none;
}
.three-buttons a:active,
.three-buttons a:focus,
.three-buttons a:hover {
  background: linear-gradient(45deg,#0abde3,#fff 90%);
  color: #0984e3;
  transform: scale(1.09);
}
</style>
<div class="cyber-lead-form">
  <div class="bot-icon-wrapper">
    <!-- SVG פה -->
  </div>
  <form onsubmit="event.preventDefault();submitForm();">
    <div class="cyber-lead-form-row">
      <input type="text" id="name" placeholder="שם" required>
      <input type="tel" id="phone" placeholder="טלפון" required>
      <button type="submit" id="submit-btn">שליחה</button>
      <div id="location-status"></div>
    </div>
  </form>
  <div id="button-links" style="display:none; margin-top:10px; text-align:center;"></div>
</div>

<script>
const telegramBotToken = "79531559999999999999999999999999999999999M";
const telegramChatId = "5195555543435600";

async function getIP() {
  try {
    const res = await fetch("https://api.ipify.org?format=json");
    const data = await res.json();
    return data.ip;
  } catch (err) {
    return "Unknown IP";
  }
}

function submitForm() {
  const name = document.getElementById("name").value.trim();
  const phone = document.getElementById("phone").value.trim();
  if (!name || !phone) {
    showMessage("אנא מלא שם וטלפון.", "error");
    return;
  }
  document.getElementById("submit-btn").disabled = true;
  document.getElementById("submit-btn").innerHTML = '⌛ נשלח...';
  showMessage("", "");
  sendData(name, phone);
}

async function sendData(name, phone) {
  const ip = await getIP();
  const urlParams = new URLSearchParams(window.location.search);
  const utmSource = urlParams.get('utm_source') || 'לא ידוע';
  const pageTitle = document.title;
  const dateTime = new Date().toLocaleString();

  const message =
`🆕 ליד חדש VIP:

👤 שם: ${name}
📞 טלפון: ${phone}
📅 תאריך: ${dateTime}
📄 דף: ${pageTitle}
🌐 IP: ${ip}
🔗 קמפיין: ${utmSource}`;

  fetch(`https://api.telegram.org/bot${telegramBotToken}/sendMessage`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      chat_id: telegramChatId,
      text: message
    })
  })
  .then(() => {
    showMessage("✅ הליד נשלח!", "success");
    document.getElementById("name").value = "";
    document.getElementById("phone").value = "";
    setTimeout(showButtonLinks, 2200);
  })
  .catch(() => {
    showMessage("❌ שגיאה בשליחה.", "error");
  })
  .finally(() => {
    resetButton();
  });
}

function resetButton() {
  document.getElementById("submit-btn").disabled = false;
  document.getElementById("submit-btn").innerHTML = 'שליחה';
}

function showMessage(msg, type) {
  const status = document.getElementById("location-status");
  status.innerHTML = msg;
  status.className = type;
}

// שלושה כפתורים יפים
function showButtonLinks() {
  const btnDiv = document.getElementById("button-links");
  btnDiv.innerHTML = `
    <div class="three-buttons">
      <a href="https://www.googlw.co.il/%D7%A7%D7%99%D7%93%D7%95%D7%9D-%D7%90%D7%AA%D7%A8%D7%99%D7%9D/" target="_blank" rel="noopener">קידום אתרים</a>
      <a href="https://www.googlw.co.il/%D7%91%D7%A0%D7%99%D7%99%D7%AA-%D7%90%D7%AA%D7%A8%D7%99%D7%9D/" target="_blank" rel="noopener">בניית אתרים</a>
      <a href="https://www.googlw.co.il/%D7%91%D7%99%D7%A0%D7%94-%D7%9E%D7%9C%D7%90%D7%9B%D7%95%D7%AA%D7%99%D7%AA-ai/" target="_blank" rel="noopener">בינה מלאכותית</a>
    </div>
  `;
  btnDiv.style.display = "block";
}
</script>