דילוג לתוכן
  • חוקי הפורום
  • פופולרי
  • לא נפתר
  • משתמשים
  • חיפוש גוגל בפורום
  • צור קשר
עיצובים
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • ברירת מחדל (ללא עיצוב (ברירת מחדל))
  • ללא עיצוב (ברירת מחדל)
כיווץ
מתמחים טופ
י

יהודי זה הכי

@יהודי זה הכי
אודות
פוסטים
109
נושאים
11
שיתופים
0
קבוצות
0
עוקבים
2
עוקב אחרי
1

פוסטים

פוסטים אחרונים הגבוה ביותר שנוי במחלוקת

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    @לא-מתייאש בדגם הזה צריך ללחוץ כאן
    a3956b57-f676-4822-86d4-0ca6f1e317dd-Screenshot_20250710-172456.png

    עזרה הדדית - אנדרואיד

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    @יאיר-דניאל

    עברתי כבר בטעות את השלב של איפוס המכשיר

    עזרה הדדית - אנדרואיד

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    אני מנסה להתקין את זה על הנגן
    הבעייה שאחרי 5 לחיצות נפתח לי החלון הזה
    92eaa5a0-49b6-4e1d-a2ce-d62110743a5d-Screenshot_20250710-172108.png
    ובעברית
    8ecf888e-8687-4e06-9512-5ae363197863-image.png

    עברתי כבר בטעות את השלב של איפוס המכשיר

    עזרה הדדית - אנדרואיד

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    אגב שאלה נוספת
    האם כשאני מגדיר ללא אופצייה להסרה אני יכול לשנות רמת הגנה לאחר מכן?

    עזרה הדדית - אנדרואיד

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    @יאיר-דניאל כתב בשיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!:

    תעשה חיפוש גוגל בשרשור זה

    איך?

    אאל"ט

    מה הכוונה

    עזרה הדדית - אנדרואיד

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    יש אלוי משהו שיכול לשלוח לי את התוכנה בגירסה ניידת אולי ככה זה יעבוד?

    עזרה הדדית - אנדרואיד

  • שיתוף | להכשיר (כמעט) כל אנדרואיד לוויז ומייל בלבד – קיידרואיד 0.7.4 גרסת בטא ציבורית!
    י יהודי זה הכי

    @לא-מתייאש זה לא נפתח לי התוכנה

    עזרה הדדית - אנדרואיד

  • שאלה | במערכת של ימות המשיח. מישהו יודע להסביר מה עושים כדי לבנות מערכת של צינתוקים לרשומים במערכת?
    י יהודי זה הכי

    @CHANAEZRACI עדיף פשוט לשאול בפורום של ימות

    מערכות IVR - ימות המשיח

  • בקשת מידע | ישנה אפשרות לפתוח חשבון באפליקציית ME בלי שאנשים יראו איך שמרתי אותם אצלי?
    י יהודי זה הכי

    @NOM לא לתת הרשאת גישה לאנשי הקשר

    שאלות למומחים

  • בקשה | כמה מיקומים במקביל בגוגל מפות
    י יהודי זה הכי

    הסתבכתי קצת עם הגדרת מפה שיש בה כמה מיקומים במקביל שנטענים מקובץ contacts.json בשרת ואני לא מסתדר עם הקבלת API מגוגל

    מישהו יוכל לעזור לי?

    רשתות

  • שאלה | במערכת של ימות המשיח. מישהו יודע להסביר מה עושים כדי לבנות מערכת של צינתוקים לרשומים במערכת?
    י יהודי זה הכי

    @עידו300 @CHANAEZRACI כל זה בהנחה שהם יתקשרו ויירשמו
    אם לא זה יעלה קצת כסף

    ולהודיע לכאלה שכבר נרשמו לקורס שיש מערכת זה מסובך

    לכן בפעם הראשונה מומלץ להוציא קמפיין רגיל

    מערכות IVR - ימות המשיח

  • בקשת מידע | API של פקע"ר
    י יהודי זה הכי

    @יוסי-רחמים כתב בבקשת מידע | API של פקע"ר:

    https://clarityai-smart-tools.onrender.com/alerts.php

    זה כן טוב

    אז תשאל את AI STUDIO

    מי זה?

    רשתות

  • בקשת מידע | API של פקע"ר
    י יהודי זה הכי

    @יוסי-רחמים כתב בבקשת מידע | API של פקע"ר:

    3.תשתמש בקוד שהבאתי לך.

    {
      "סטטוס": "שגיאה",
      "message": "נכשל בהתחברות לשרת Oref. שגיאת cURL: נכשל בהתחברות ל-www.oref.org.il פורט 443: החיבור נדחה",
      "חותמת זמן": "2025-06-23T20:21:03+03:00"
    }
    
    רשתות

  • בקשת מידע | API של פקע"ר
    י יהודי זה הכי

    @יוסי-רחמים אני לא מסתדר איתו

    רשתות

  • בקשת מידע | API של פקע"ר
    י יהודי זה הכי

    אני עשיתי את זה וזה לא מצליח להתחבר לשרת ואני רוצה לדעת איך אפשר כן להתחבר

    index.php

    <!DOCTYPE html>
    <html lang="he" dir="rtl">
    <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>🎗️האלפון של הזירה הית🎗️</title>
    <link rel="icon" href="https://lh3.googleusercontent.com/a/ACg8ocLCPoxjLoSems6ya7IDqC2PPZ8pbKjT6MCpYDvD9_yU2-tcV6JQ=s288-c-no" type="image/png" />
    
    <meta name="description" content="האלפון של הזירה הית">
    <meta name="keywords" content="תגיותב">
    
    <style>
      body {
        font-family: Arial, sans-serif;
        text-align: center;
        background-image: url("https://i.ibb.co/Q3fVHtsZ/unnamed.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding: 80px 20px 100px 20px;
        position: relative;
        direction: rtl;
      }
      .container {
        background-color: rgba(255, 255, 255, 0.8);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        display: inline-block;
        text-align: right;
        margin: 10px auto;
        max-width: 600px;
        width: 100%;
      }
      .input-group {
        display: flex;
        align-items: center;
        margin: 10px 0;
      }
      .input-group input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 5px 0 0 5px;
        font-size: 16px;
        direction: rtl;
      }
      .input-group span {
        padding: 10px;
        background-color: #0073e6;
        color: white;
        border-radius: 0 5px 5px 0;
        cursor: default;
      }
      button {
        padding: 10px 20px;
        border: none;
        background-color: #0073e6;
        color: white;
        border-radius: 5px;
        cursor: pointer;
        margin: 5px 0;
        font-size: 16px;
      }
      button:hover {
        background-color: #005bb5;
      }
      .footer {
        margin-top: 30px;
        padding: 10px;
        background-color: rgba(221, 221, 221, 0.8);
        border-radius: 5px;
        font-size: 14px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
      }
      #results {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 20px;
        gap: 15px;
      }
      .result-item {
        background-color: rgba(255, 255, 255, 0.8);
        border-radius: 8px;
        border: 1px solid #ddd;
        width: 250px;
        min-height: 160px;
        padding: 15px;
        box-sizing: border-box;
        text-align: right;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
      }
      .result-item strong {
        font-size: 16px;
      }
      .details-btn {
        margin-top: 10px;
        align-self: flex-start;
        background-color: #28a745;
      }
      .details-btn:hover {
        background-color: #1e7e34;
      }
      /* חלון קופץ לפרטים */
      #detailsModal {
        display: none;
        position: fixed;
        z-index: 1500;
        left: 0; top: 0;
        width: 100%; height: 100%;
        background-color: rgba(0,0,0,0.5);
        overflow: auto;
        justify-content: center;
        align-items: center;
        display: flex;
      }
      #detailsModal.hidden {
        display: none !important;
      }
      #detailsModalContent {
        background-color: white;
        padding: 20px 30px;
        border-radius: 10px;
        max-width: 400px;
        width: 90%;
        text-align: right;
        font-size: 18px;
        position: relative;
        box-sizing: border-box;
      }
      #closeModalBtn {
        position: absolute;
        top: 10px;
        left: 10px;
        background-color: #dc3545;
        border: none;
        color: white;
        font-size: 18px;
        padding: 5px 10px;
        border-radius: 5px;
        cursor: pointer;
      }
      #closeModalBtn:hover {
        background-color: #a71d2a;
      }
      #showMapBtn {
        margin-top: 15px;
        background-color: #0073e6;
        color: white;
        padding: 10px 15px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
      }
      #showMapBtn:hover {
        background-color: #005bb5;
      }
      /* חלון קופץ למפה */
      #mapModal {
        display: none;
        position: fixed;
        z-index: 1600;
        left: 0; top: 0;
        width: 100vw; height: 100vh;
        background-color: rgba(0,0,0,0.7);
        justify-content: center;
        align-items: center;
        display: flex;
      }
      #mapModal.hidden {
        display: none !important;
      }
      #mapContent {
        position: relative;
        background: white;
        border-radius: 10px;
        width: 90%;
        max-width: 600px;
        height: 400px;
        box-sizing: border-box;
        padding-top: 35px;
      }
      #closeMapBtn {
        position: absolute;
        top: 8px; right: 8px;
        background: #dc3545;
        border: none;
        color: white;
        font-size: 16px;
        padding: 6px 10px;
        border-radius: 5px;
        cursor: pointer;
        z-index: 10;
      }
      #closeMapBtn:hover {
        background: #b02a37;
      }
      #mapIframe {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0 0 10px 10px;
        display: block;
      }
      /* משחק נחש */
      #snakeGameContainer {
        display: none;
        position: fixed;
        bottom: 10px;
        left: 10px;
        background-color: rgba(255,255,255,0.8);
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
      }
    
      /* pagination controls */
      #paginationControls {
        text-align: center;
        margin-top: 10px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
      }
      #paginationControls button {
        margin: 0 10px;
        padding: 8px 16px;
        font-size: 14px;
      }
    
      /* results per page selector */
      #resultsPerPageContainer {
        max-width: 600px;
        margin: 10px auto 0 auto;
        text-align: right;
      }
    
      /* הוספת תיבת התראות צבע אדום במקום הטלפון */
      .phone-box {
        position: fixed;
        top: 120px;
        right: 15px;
        width: 260px;
        height: 480px;
        background: #222;
        border-radius: 30px;
        border: 6px solid #000;
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
        z-index: 9999;
        overflow: hidden;
        display: flex;
        flex-direction: column;
      }
      .phone-box .screen {
        background: #fff;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        direction: rtl;
        overflow: hidden;
      }
      #alert-box {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
      }
      #alert-box .message {
        padding: 10px;
        font-size: 14px;
        text-align: right;
        border-bottom: 1px solid #ddd;
        background-color: #fff;
        color: #c0392b;
      }
      .phone-box .controls {
        background: #111;
        padding: 10px;
        text-align: center;
        user-select: none;
      }
      .phone-box .controls button {
        margin: 2px;
        padding: 5px 10px;
        font-size: 14px;
        cursor: pointer;
        border-radius: 5px;
        border: none;
        background-color: #0073e6;
        color: white;
      }
      .phone-box .controls button:hover {
        background-color: #005bb5;
      }
    </style>
    </head>
    
    <body>
    
    <div id="bthn" lang="he"></div>
    <script>
     (function () {
       var script = document.createElement("script");
       script.type = "text/javascript";
       script.src = "https://bringthemhomenow.net/1.3.0/hostages-ticker.js";
       script.setAttribute(
         "integrity",
         "sha384-MmP7bD5QEJWvJccg9c0lDnn3LjjqQWDiRCxRV+NU8hij15icuwb29Jfw1TqJwuSv"
       );
       script.setAttribute("crossorigin", "anonymous");
       document.getElementsByTagName("head")[0].appendChild(script);
     })();
    </script>
    
    <h1>📖 🎗️האלפון של הזירה הית 🎗️📖</h1>
    <h1>שימו לב האלפון בשלבי בנייה ופיתוח ייתכנו תקלות</h1>
    
    <!-- תיבת ההתראות בצבע אדום - הטלפון בצד ימין -->
    <div class="phone-box" role="region" aria-label="התראות צבע אדום">
      <div class="screen">
        <div id="alert-box" aria-live="polite" aria-relevant="additions">
          <div class="message">📞 האלפון מתעדכן מדי יום!</div>
        </div>
        <div class="controls" role="group" aria-label="כפתורי עדכון התראות">
          <button onclick="fetchAlerts()" aria-label="עדכן התראות צבע אדום">🔄 עדכן</button>
          <button onclick="sendTestAlert()" aria-label="שלח התראת בדיקה">🧪 בדיקה</button>
        </div>
      </div>
    </div>
    
    <!-- מערכת חיפוש -->
    <div class="container">
        <h2>🔍 מערכת חיפוש</h2>
        <div class="input-group">
            <span>🔍</span>
            <input
                type="text"
                id="searchInput"
                placeholder="הקלד שם, כתובת או מספר טלפון"
                onkeydown="if(event.key === 'Enter') searchData()"
            />
        </div>
        <button onclick="searchData()">חפש</button>
    
        <!-- בחירת מספר תוצאות בדף -->
        <div id="resultsPerPageContainer" style="display:none;">
          <label for="resultsPerPage">הצג תוצאות בכל דף: </label>
          <select id="resultsPerPage" onchange="renderResults()">
            <option value="5">5</option>
            <option value="10" selected>10</option>
            <option value="20">20</option>
          </select>
        </div>
    
        <div id="results"></div>
    <div id="paginationControls" style="display:none;">
      <button onclick="changePage(1)" id="nextBtn" disabled>הבא ➡</button>
      <span id="pageInfo" style="margin: 0 10px;"></span>
      <button onclick="changePage(-1)" id="prevBtn" disabled>⬅ קודם</button>
    </div>
    </div>
    
    <!-- חלון קופץ לפרטים -->
    <div id="detailsModal" class="hidden" aria-modal="true" role="dialog" aria-labelledby="detailsTitle">
        <div id="detailsModalContent">
            <button id="closeModalBtn" onclick="closeDetails()" aria-label="סגור חלון">✖</button>
            <div id="detailsContent" dir="rtl"></div>
            <button id="showMapBtn" onclick="openMap()" style="display:none;">הצג מיקום במפה</button>
        </div>
    </div>
    
    <!-- חלון קופץ למפה -->
    <div id="mapModal" class="hidden" aria-modal="true" role="dialog" aria-labelledby="mapTitle" aria-hidden="true">
        <div id="mapContent">
            <button id="closeMapBtn" onclick="closeMap()" aria-label="סגור מפה">✖</button>
            <iframe id="mapIframe" src="" allowfullscreen loading="lazy" title="מפת מיקום"></iframe>
        </div>
    </div>
    
    <!-- כפתור למשחק נחש -->
    <button onclick="openSnakeGame()" style="position: fixed; bottom: 80px; left: 10px;">
        🎮 שחק נחש
    </button>
    <div
        id="snakeGameContainer"
        style="display: none; position: fixed; bottom: 10px; left: 10px; background-color: rgba(255,255,255,0.8); padding: 10px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); z-index: 1000;">
        <button onclick="closeSnakeGame()" style="float: left;">❌ סגור</button>
        <h3>🐍 משחק נחש</h3>
        <canvas
            id="snakeCanvas"
            width="300"
            height="300"
            style="background-color: #f4f4f4">
        </canvas>
    </div>
    
    <!-- תחתית -->
    <div class="footer">
        <p>📢 הפיתוח נעשה בחסות <strong>הזירה הית</strong> - המרחב החם של הציבור הי</p>
        <p>☎️ טלפון: 02-313-60-90</p>
        <p>🛠️ פיתוח ע"י <strong>אבי ש.</strong> אל תדאגו נעזרתי בבינה מלאכותית 😋😋😋 אני לא כזה מומחה</p>
        <p>💬 לכניסה לצ'אט: <a href="https://chat.google.com/room/AAQApcvo9RM?cls=7" target="_blank" rel="noopener noreferrer">לחץ כאן</a></p>
        <p>📧 להצטרפות שלח מייל ל: <a href="mailto:avshainin@gmail.com">avshainin@gmail.com</a></p>
        <p>© 2025 הזירה הית</p>
    </div>
    
    <script>
    let currentResults = [];
    let currentPage = 1;
    let resultsPerPage = 10;
    
    function searchData() {
        let input = document.getElementById("searchInput").value.trim();
        const resultsDiv = document.getElementById("results");
        const paginationControls = document.getElementById("paginationControls");
        const resultsPerPageContainer = document.getElementById("resultsPerPageContainer");
    
        resultsDiv.innerHTML = "🔍 טוען...";
        paginationControls.style.display = "none";
        resultsPerPageContainer.style.display = "none";
    
        fetch("get.php")
            .then(res => res.json())
            .then(database => {
                let results = database.filter(item =>
                    item["שם"].includes(input) ||
                    item["כתובת"].includes(input) ||
                    item["פלאפון"].includes(input)
                );
    
                results.sort((a, b) => a["שם"].localeCompare(b["שם"], "he", { sensitivity: "base" }));
    
                currentResults = results;
                currentPage = 1;
    
                if(results.length === 0) {
                    resultsDiv.innerHTML = "❌ לא נמצאו תוצאות";
                    paginationControls.style.display = "none";
                    resultsPerPageContainer.style.display = "none";
                    return;
                }
    
                paginationControls.style.display = "block";
                resultsPerPageContainer.style.display = "block";
    
                renderResults();
            })
            .catch(() => {
                resultsDiv.innerHTML = "❌ קרתה שגיאה בטעינת הנתונים";
                paginationControls.style.display = "none";
                resultsPerPageContainer.style.display = "none";
            });
    }
    
    function renderResults() {
        const resultsDiv = document.getElementById("results");
        resultsPerPage = parseInt(document.getElementById("resultsPerPage").value);
    
        const startIndex = (currentPage -1) * resultsPerPage;
        const endIndex = startIndex + resultsPerPage;
        const pageResults = currentResults.slice(startIndex, endIndex);
    
        if(pageResults.length === 0 && currentPage > 1) {
            currentPage--;
            renderResults();
            return;
        }
    
        resultsDiv.innerHTML = pageResults.map((item, index) => `
            <div class="result-item" tabindex="0">
                <div><strong>שם:</strong> ${item["שם"]}</div>
                <div><strong>כתובת:</strong> ${item["כתובת"]}</div>
                <div><strong>פלאפון:</strong> ${item["פלאפון"]}</div>
                <div><strong>טלפון בבית:</strong> ${item["טלפון בבית"] || "❌"}</div>
                <div><strong>תא קולי:</strong> ${item["תא קולי"] || "❌"}</div>
            </div>
        `).join("");
    
        // עדכון כפתורי ניווט
        document.getElementById("pageInfo").textContent = `עמוד ${currentPage} מתוך ${Math.ceil(currentResults.length / resultsPerPage)}`;
        document.getElementById("nextBtn").disabled = currentPage >= Math.ceil(currentResults.length / resultsPerPage);
        document.getElementById("prevBtn").disabled = currentPage <= 1;
    }
    
    function changePage(direction) {
        if(direction === 1 && currentPage < Math.ceil(currentResults.length / resultsPerPage)) {
            currentPage++;
        } else if(direction === -1 && currentPage > 1) {
            currentPage--;
        }
        renderResults();
    }
    
    // פונקציות לפרטי איש קשר ומפות (יש למלא בהתאם לצורך שלך)
    function closeDetails() {
        document.getElementById("detailsModal").classList.add("hidden");
    }
    
    function openMap() {
        const modal = document.getElementById("mapModal");
        const iframe = document.getElementById("mapIframe");
        // example of google maps embed, צריך להתאים למיקום בפועל
        iframe.src = "https://maps.google.com/maps?q=32.0804,34.7805&hl=he&z=14&output=embed";
        modal.classList.remove("hidden");
    }
    
    function closeMap() {
        document.getElementById("mapModal").classList.add("hidden");
        document.getElementById("mapIframe").src = "";
    }
    
    // המשחק נחש - פונקציות נפתח וסוגר
    function openSnakeGame() {
        document.getElementById("snakeGameContainer").style.display = "block";
        startSnakeGame();
    }
    function closeSnakeGame() {
        document.getElementById("snakeGameContainer").style.display = "none";
        stopSnakeGame();
    }
    
    let snakeGameInterval = null;
    function startSnakeGame() {
        // כאן לשים את הקוד של משחק הנחש
    }
    function stopSnakeGame() {
        if(snakeGameInterval) {
            clearInterval(snakeGameInterval);
            snakeGameInterval = null;
        }
    }
    
    // --- קוד ההתראות צבע אדום ---
    
    const alertBox = document.getElementById("alert-box");
    
    async function fetchAlerts() {
      try {
        const res = await fetch('https://www.oref.org.il/WarningMessages/alert/alerts.json');
        if(!res.ok) throw new Error('Network response was not ok');
        const data = await res.json();
    
        // נקרא לפי מפתח התרעות "alerts"
        const alerts = data["alerts"];
    
        if(!alerts || alerts.length === 0) {
          alertBox.innerHTML = `<div class="message">📞 אין כרגע התראות צבע אדום</div>`;
          return;
        }
    
        // הצגת כל ההתראות בקופסה, כל הודעה ב-div נפרד
        alertBox.innerHTML = alerts.map(alert => {
          // יש גם תאריך התחלה וסיום
          const start = alert["StartTime"];
          const end = alert["EndTime"];
          const region = alert["RegionDesc"] || "";
          const desc = alert["Message"] || "";
          // פורמט פשוט
          return `<div class="message"><strong>🔴 אזור:</strong> ${region}<br><strong>הודעה:</strong> ${desc}<br><small>${start} - ${end}</small></div>`;
        }).join("");
      } catch(err) {
        alertBox.innerHTML = `<div class="message">❌ שגיאה בטעינת ההתראות</div>`;
        console.error("Error fetching alerts:", err);
      }
    }
    
    function sendTestAlert() {
      alertBox.innerHTML = `<div class="message">🧪 זוהי התראת בדיקה - אין התראה אמיתית כרגע</div>`;
    }
    
    // אתחל את ההתראות אוטומטית בהעמסה ועם ריענון כל 2 דקות
    fetchAlerts();
    setInterval(fetchAlerts, 3000);
    
    </script>
    
    </body>
    </html>
    
    
    <?php
    $apiUrl = 'https://api.tzevaadom.co.il/notifications';
    
    function getAlerts($url) {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $json = curl_exec($ch);
        $error = curl_error($ch);
        curl_close($ch);
    
        if ($json === false || $json === '') {
            error_log("שגיאה ב-cURL: " . $error);
            return null;
        }
    
        $data = json_decode($json, true);
        if ($data === null) {
            error_log("שגיאה בפענוח JSON");
        }
        return $data;
    }
    
    function saveAlerts($alerts) {
        $file = __DIR__ . '/alerts_history.json';
    
        $existing = [];
        if (file_exists($file)) {
            $existingJson = file_get_contents($file);
            $existing = json_decode($existingJson, true);
            if ($existing === null) $existing = [];
        }
    
        foreach ($alerts as $alert) {
            $time = $alert['created_at'] ?? '';
            $location = implode(', ', $alert['data']['locations'] ?? ['מיקום לא ידוע']);
    
            $exists = false;
            foreach ($existing as $ex) {
                if ($ex['time'] === $time) {
                    $exists = true;
                    break;
                }
            }
    
            if (!$exists) {
                $existing[] = [
                    'time' => $time,
                    'location' => $location,
                ];
            }
        }
    
        file_put_contents($file, json_encode($existing, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
    }
    
    $alerts = getAlerts($apiUrl);
    if ($alerts) {
        saveAlerts($alerts);
        echo "התראות נשמרו בהצלחה.\n";
    } else {
        echo "שגיאה בקבלת ההתראות.\n";
    }
    
    

    fetch_and_save_alerts.php

    <?php
    // get_alerts.php
    header('Content-Type: application/json');
    if (file_exists('alerts_log.txt')) {
        $lines = file('alerts_log.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
        $alerts = [];
        foreach ($lines as $line) {
            $parts = explode(" - ", $line, 2);
            if (count($parts) === 2) {
                $alerts[] = ['time' => $parts[0], 'location' => $parts[1]];
            }
        }
        echo json_encode($alerts);
    } else {
        echo json_encode([]);
    }
    ?>
    
    
    <?php
    // save_alert.php
    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
        $json = file_get_contents('php://input');
        $data = json_decode($json, true);
    
        if ($data && isset($data['time']) && isset($data['location'])) {
            $entry = $data['time'] . " - " . $data['location'] . "\n";
            file_put_contents('alerts_log.txt', $entry, FILE_APPEND | LOCK_EX);
            echo "OK";
        } else {
            http_response_code(400);
            echo "Invalid data";
        }
    } else {
        http_response_code(405);
        echo "Method not allowed";
    }
    ?>
    
    
    רשתות

  • בקשת מידע | קומפרסור וואקום
    י יהודי זה הכי

    @ejay איך?

    לא שווה לקנות ב 180 ואח"כ לעשות/לתרום לגמ"ח

    כללי - עזרה הדדית

  • בקשת מידע | קומפרסור וואקום
    י יהודי זה הכי

    @ejay 😥 😥 😥

    כללי - עזרה הדדית

  • בקשת מידע | קומפרסור וואקום
    י יהודי זה הכי

    @ejay אתה בירושלים?

    כללי - עזרה הדדית

  • בקשת מידע | קומפרסור וואקום
    י יהודי זה הכי

    @ejay חמוד אבל אני צריך את זה למזגן זה חיבור הפוך ממה שיש אצלך

    אגב זה מתנייד?

    כללי - עזרה הדדית
  • התחברות

  • אין לך חשבון עדיין? הרשמה

  • התחברו או הירשמו כדי לחפש.
  • פוסט ראשון
    פוסט אחרון
0
  • חוקי הפורום
  • פופולרי
  • לא נפתר
  • משתמשים
  • חיפוש גוגל בפורום
  • צור קשר