{"id":21987,"date":"2026-04-19T18:18:38","date_gmt":"2026-04-19T17:18:38","guid":{"rendered":"https:\/\/marinaport.hu\/app\/?page_id=21987"},"modified":"2026-04-19T18:40:27","modified_gmt":"2026-04-19T17:40:27","slug":"21987-2","status":"publish","type":"page","link":"https:\/\/marinaport.hu\/app\/21987-2\/","title":{"rendered":"login2"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"hu\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n    \n    <script src=\"https:\/\/www.gstatic.com\/firebasejs\/9.23.0\/firebase-app-compat.js\"><\/script>\n    <script src=\"https:\/\/www.gstatic.com\/firebasejs\/9.23.0\/firebase-auth-compat.js\"><\/script>\n    <script src=\"https:\/\/www.gstatic.com\/firebasejs\/9.23.0\/firebase-database-compat.js\"><\/script>\n\n    <style>\n        \/* Mobil-specifikus st\u00edlusok *\/\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n            margin: 0;\n            padding: 10px;\n            background-color: #f4f7f6;\n            color: #333;\n            -webkit-font-smoothing: antialiased;\n        }\n        \n        .container {\n            max-width: 100%;\n            margin: 0 auto;\n        }\n\n        h3 { color: #2c3e50; margin-bottom: 15px; }\n\n        \/* Bejelentkez\u00e9s \u00e9s Keres\u0151 k\u00e1rty\u00e1k *\/\n        .card {\n            background: white;\n            padding: 20px;\n            border-radius: 12px;\n            box-shadow: 0 4px 6px rgba(0,0,0,0.05);\n            margin-bottom: 20px;\n            border: 1px solid #e0e0e0;\n        }\n\n        \/* Bemeneti mez\u0151k optimaliz\u00e1l\u00e1sa (16px a zoom ellen) *\/\n        input[type=\"email\"], \n        input[type=\"password\"], \n        input[type=\"date\"] {\n            width: 100%;\n            padding: 12px;\n            margin-bottom: 12px;\n            border: 1px solid #ccc;\n            border-radius: 8px;\n            font-size: 16px; \n            box-sizing: border-box; \/* Hogy ne l\u00f3gjon ki a padding miatt *\/\n            appearance: none; \/* Safari st\u00edlus reset *\/\n            -webkit-appearance: none;\n        }\n\n        \/* Gombok mobilra (nagyobb \u00e9rint\u00e9si fel\u00fclet) *\/\n        button {\n            width: 100%;\n            padding: 14px;\n            font-size: 16px;\n            font-weight: bold;\n            border: none;\n            border-radius: 8px;\n            cursor: pointer;\n            transition: background 0.3s;\n        }\n\n        .btn-primary { background-color: #007aff; color: white; } \/* iOS k\u00e9k *\/\n        .btn-success { background-color: #34c759; color: white; } \/* iOS z\u00f6ld *\/\n        .btn-danger { background-color: #ff3b30; color: white; padding: 8px; font-size: 14px; }\n\n        \/* T\u00e1bl\u00e1zat g\u00f6rgethet\u0151s\u00e9ge mobilr\u00f3l *\/\n        .table-responsive {\n            width: 100%;\n            overflow-x: auto;\n            -webkit-overflow-scrolling: touch;\n            margin-top: 10px;\n            border-radius: 8px;\n            border: 1px solid #ddd;\n        }\n\n        table {\n            width: 100%;\n            border-collapse: collapse;\n            background: white;\n            min-width: 400px; \/* Biztos\u00edtja, hogy legyen mit g\u00f6rgetni, ne nyom\u00f3djon \u00f6ssze *\/\n        }\n\n        th, td {\n            padding: 12px 10px;\n            border: 1px solid #eee;\n            font-size: 14px;\n        }\n\n        th { background-color: #f8f9fa; text-align: left; font-weight: 600; }\n        \n        .text-right { text-align: right; }\n        .status-msg { margin: 10px 0; font-weight: bold; font-size: 14px; }\n    <\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n    <script>\n        var firebaseConfig = {\n            apiKey: \"AIzaSyDyHeexzDlwFVL3kowJ3sDBlXiPjCCVg2w\",\n            authDomain: \"wellness-ee025.firebaseapp.com\",\n            databaseURL: \"https:\/\/wellness-ee025-default-rtdb.firebaseio.com\",\n            projectId: \"wellness-ee025\",\n            storageBucket: \"wellness-ee025.appspot.com\",\n            messagingSenderId: \"196714975370\",\n            appId: \"1:196714975370:web:6548565d62a5e6252ddd73\",\n            measurementId: \"G-GJWK46QM3D\"\n        };\n        if (!firebase.apps.length) { firebase.initializeApp(firebaseConfig); }\n    <\/script>\n\n    <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;\">\n        <h3>Klubk\u00e1rtya Napl\u00f3<\/h3>\n        <button id=\"logout-btn\" class=\"btn-danger\" onclick=\"kilepes()\" style=\"display: none; width: auto;\">Kil\u00e9p\u00e9s<\/button>\n    <\/div>\n\n    <div id=\"login-card\" class=\"card\">\n        <h4 style=\"margin-top:0\">Bejelentkez\u00e9s<\/h4>\n        <input type=\"email\" id=\"login-email\" placeholder=\"E-mail c\u00edm\">\n        <input type=\"password\" id=\"login-jelszo\" placeholder=\"Jelsz\u00f3\">\n        <button class=\"btn-primary\" onclick=\"belepes()\">Bel\u00e9p\u00e9s<\/button>\n        <p id=\"login-error\" style=\"color: #ff3b30; display:none; margin-top:10px; font-size:14px;\"><\/p>\n    <\/div>\n\n    <div id=\"search-card\" class=\"card\" style=\"display: none;\">\n        <label style=\"font-weight: bold; display: block; margin-bottom: 10px;\">V\u00e1lasszon napot:<\/label>\n        <input type=\"date\" id=\"datum-valaszto\">\n        <button class=\"btn-success\" onclick=\"indulALekerdezes()\">Tranzakci\u00f3k lek\u00e9r\u00e9se<\/button>\n    <\/div>\n\n    <div id=\"result-area\"><\/div>\n<\/div>\n\n<script>\n    var auth = firebase.auth();\n    var db = firebase.database();\n    \n    \/\/ UI elemek\n    var loginCard = document.getElementById('login-card');\n    var searchCard = document.getElementById('search-card');\n    var logoutBtn = document.getElementById('logout-btn');\n    var resultArea = document.getElementById('result-area');\n    var dateInput = document.getElementById('datum-valaszto');\n\n    \/\/ Mai nap\n    dateInput.value = new Date().toISOString().split('T')[0];\n\n    \/\/ Auth figyel\u0151\n    auth.onAuthStateChanged(function(user) {\n        if (user) {\n            loginCard.style.display = 'none';\n            searchCard.style.display = 'block';\n            logoutBtn.style.display = 'block';\n            resultArea.innerHTML = \"\";\n        } else {\n            loginCard.style.display = 'block';\n            searchCard.style.display = 'none';\n            logoutBtn.style.display = 'none';\n            resultArea.innerHTML = \"\";\n        }\n    });\n\n    window.belepes = function() {\n        var email = document.getElementById('login-email').value;\n        var pass = document.getElementById('login-jelszo').value;\n        var err = document.getElementById('login-error');\n        \n        auth.signInWithEmailAndPassword(email, pass).catch(function(e) {\n            err.style.display = 'block';\n            err.innerText = \"Hiba: Hib\u00e1s adatok!\";\n        });\n    };\n\n    window.kilepes = function() { auth.signOut(); };\n\n    window.indulALekerdezes = function() {\n        var d = dateInput.value;\n        if (!d) return;\n\n        resultArea.innerHTML = \"<p class='status-msg'>Adatok bet\u00f6lt\u00e9se...<\/p>\";\n\n        Promise.all([\n            db.ref('Terminal').get(),\n            db.ref('Klubkartya naplo\/' + d).get()\n        ]).then(function(snaps) {\n            var terms = snaps[0].val() || {};\n            var trans = snaps[1].val();\n\n            if (!trans) {\n                resultArea.innerHTML = \"<div class='card' style='background:#fff3cd'>Nincs adat ezen a napon.<\/div>\";\n                return;\n            }\n\n            var html = \"<h3>\" + d + \"<\/h3>\";\n            var groups = {};\n\n            for (var ido in trans) {\n                var t = trans[ido];\n                var tid = t.terminalId;\n                if (!groups[tid]) groups[tid] = { list: [], total: 0, tip: 0 };\n                \n                t.time = ido;\n                groups[tid].list.push(t);\n                groups[tid].total += parseFloat(t.totalAmount) || 0;\n                groups[tid].tip += parseFloat(t.tipAmount) || 0;\n            }\n\n            for (var tid in groups) {\n                var name = terms[tid] || \"Termin\u00e1l: \" + tid;\n                html += \"<div class='card' style='padding:10px; margin-bottom:10px;'>\";\n                html += \"<strong>\" + name + \"<\/strong>\";\n                html += \"<div class='table-responsive'><table>\";\n                html += \"<tr><th>Id\u0151<\/th><th>N\u00e9v<\/th><th class='text-right'>Borr.<\/th><th class='text-right'>\u00d6ssz.<\/th><\/tr>\";\n                \n                groups[tid].list.forEach(function(item) {\n                    html += \"<tr>\";\n                    html += \"<td>\" + item.time.replace(\/-\/g, ':') + \"<\/td>\";\n                    html += \"<td>\" + (item.cardHolderName || '-') + \"<\/td>\";\n                    html += \"<td class='text-right'>\" + (item.tipAmount || 0) + \"<\/td>\";\n                    html += \"<td class='text-right'>\" + (item.totalAmount || 0) + \"<\/td>\";\n                    html += \"<\/tr>\";\n                });\n                \n                html += \"<tr style='background:#f9f9f9; font-weight:bold;'>\";\n                html += \"<td colspan='2'>\u00d6sszesen:<\/td>\";\n                html += \"<td class='text-right'>\" + groups[tid].tip + \"<\/td>\";\n                html += \"<td class='text-right'>\" + groups[tid].total + \"<\/td>\";\n                html += \"<\/tr><\/table><\/div><\/div>\";\n            }\n            resultArea.innerHTML = html;\n        });\n    };\n<\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Klubk\u00e1rtya Napl\u00f3 Kil\u00e9p\u00e9s Bejelentkez\u00e9s Bel\u00e9p\u00e9s V\u00e1lasszon napot: Tranzakci\u00f3k lek\u00e9r\u00e9se<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"blank","meta":{"footnotes":""},"class_list":["post-21987","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/pages\/21987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/comments?post=21987"}],"version-history":[{"count":7,"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/pages\/21987\/revisions"}],"predecessor-version":[{"id":21996,"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/pages\/21987\/revisions\/21996"}],"wp:attachment":[{"href":"https:\/\/marinaport.hu\/app\/wp-json\/wp\/v2\/media?parent=21987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}