{"id":13,"date":"2026-09-03T06:24:49","date_gmt":"2026-09-03T06:24:49","guid":{"rendered":"https:\/\/angels-devils.adilbannar.my\/index.php\/store\/"},"modified":"2026-09-03T06:24:49","modified_gmt":"2026-09-03T06:24:49","slug":"store","status":"publish","type":"page","link":"https:\/\/angels-devils.adilbannar.my\/index.php\/store\/","title":{"rendered":"Store"},"content":{"rendered":"<div class=\"srp-section\">\n    <h1 class=\"srp-section-title\">VIP <span class=\"accent\">STORE<\/span><\/h1>\n    <p class=\"srp-section-subtitle\" id=\"srpStoreSub\">Premium VIP packs for Angels & Devils Rp<\/p>\n\n    <div class=\"srp-tabs\" id=\"srpStoreTabs\">\n        <button class=\"srp-tab active\" onclick=\"srpLoadStore('all')\" id=\"srpStoreAll\">All<\/button>\n        <button class=\"srp-tab\" onclick=\"srpLoadStore('vip_cars')\" id=\"srpStoreCars\">VIP Cars<\/button>\n        <button class=\"srp-tab\" onclick=\"srpLoadStore('vip_mlo')\" id=\"srpStoreMlo\">VIP MLO<\/button>\n        <button class=\"srp-tab\" onclick=\"srpLoadStore('vip_project')\" id=\"srpStoreProj\">VIP Projects<\/button>\n    <\/div>\n\n    <div id=\"srpStoreItems\">\n        <p style=\"color:var(--srp-gray);\">Loading...<\/p>\n    <\/div>\n<\/div>\n\n<div id=\"srpBuyModal\" style=\"display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);z-index:9999;\">\n    <div style=\"max-width:480px;margin:120px auto;background:var(--srp-dark);border:1px solid var(--srp-border);border-radius:12px;padding:32px;text-align:center;\">\n        <h2 style=\"margin-bottom:8px;\" id=\"srpBuyTitle\"><\/h2>\n        <p style=\"color:var(--srp-gray);margin-bottom:8px;\" id=\"srpBuyCat\"><\/p>\n        <p style=\"color:var(--srp-red);font-size:28px;font-weight:900;margin-bottom:24px;\" id=\"srpBuyPrice\"><\/p>\n        <p style=\"color:var(--srp-gray);font-size:14px;margin-bottom:24px;\" id=\"srpBuyMsg\">After clicking buy, your request will be sent to our Discord server. A staff member will contact you to complete the purchase.<\/p>\n        <div style=\"display:flex;gap:12px;justify-content:center;\">\n            <button class=\"srp-btn srp-btn-red\" id=\"srpBuyConfirm\" onclick=\"srpConfirmBuy()\">Confirm Purchase<\/button>\n            <button class=\"srp-btn srp-btn-outline\" onclick=\"document.getElementById('srpBuyModal').style.display='none'\">Cancel<\/button>\n        <\/div>\n        <div id=\"srpBuyResult\" style=\"margin-top:16px;display:none;\"><\/div>\n    <\/div>\n<\/div>\n\n<script>\nvar currentBuyItem = null;\n\nfunction srpLoadStore(category) {\n    document.querySelectorAll('#srpStoreTabs .srp-tab').forEach(function(t){t.classList.remove('active');});\n    event.target.classList.add('active');\n\n    var el = document.getElementById('srpStoreItems');\n    el.innerHTML = '<p style=\"color:var(--srp-gray);\">Loading...<\/p>';\n\n    var url = srpAjax.url + 'vip\/items';\n    if (category !== 'all') url += '?category=' + category;\n\n    fetch(url)\n    .then(function(r){return r.json();})\n    .then(function(items){\n        if (!items.length) {\n            el.innerHTML = '<div class=\"srp-card\" style=\"text-align:center;padding:48px;\"><p style=\"color:var(--srp-gray);\">No items available in this category yet.<\/p><\/div>';\n            return;\n        }\n        var html = '<div class=\"srp-card-grid\">';\n        items.forEach(function(item){\n            html += '<div class=\"srp-card\" style=\"position:relative;overflow:hidden;\">';\n            if (item.image_url) {\n                html += '<img decoding=\"async\" src=\"' + item.image_url + '\" style=\"width:100%;height:200px;object-fit:cover;border-radius:var(--srp-radius);margin-bottom:16px;\">';\n            } else {\n                html += '<div style=\"width:100%;height:160px;background:var(--srp-darker);border-radius:var(--srp-radius);margin-bottom:16px;display:flex;align-items:center;justify-content:center;font-size:48px;\">\ud83d\udce6<\/div>';\n            }\n            html += '<div style=\"display:inline-block;padding:4px 10px;border-radius:50px;font-size:11px;font-weight:700;background:rgba(220,38,38,0.1);color:var(--srp-red);margin-bottom:8px;text-transform:uppercase;\">' + item.category.replace('vip_','VIP ') + '<\/div>';\n            html += '<h3 style=\"font-size:18px;font-weight:700;margin-bottom:8px;\">' + item.title + '<\/h3>';\n            if (item.description) {\n                html += '<p style=\"color:var(--srp-gray);font-size:14px;margin-bottom:16px;\">' + item.description + '<\/p>';\n            }\n            html += '<div style=\"display:flex;align-items:center;justify-content:space-between;margin-top:auto;\">';\n            html += '<span style=\"font-size:24px;font-weight:900;color:var(--srp-red);\">' + parseFloat(item.price).toFixed(2) + ' <small style=\"font-size:14px;color:var(--srp-gray);\">MAD<\/small><\/span>';\n            html += '<button class=\"srp-btn srp-btn-red\" style=\"padding:10px 20px;font-size:13px;\" onclick=\"srpOpenBuy(' + item.id + ',\\'' + item.title.replace(\/'\/g,\"\\\\'\") + '\\',\\'' + item.category + '\\',' + item.price + ')\">Buy Now<\/button>';\n            html += '<\/div><\/div>';\n        });\n        html += '<\/div>';\n        el.innerHTML = html;\n    })\n    .catch(function(){\n        el.innerHTML = '<p style=\"color:var(--srp-red);\">Failed to load items.<\/p>';\n    });\n}\n\nfunction srpOpenBuy(id, title, category, price) {\n    currentBuyItem = id;\n    document.getElementById('srpBuyTitle').textContent = title;\n    document.getElementById('srpBuyCat').textContent = category.replace('vip_','VIP ');\n    document.getElementById('srpBuyPrice').textContent = parseFloat(price).toFixed(2) + ' MAD';\n    document.getElementById('srpBuyResult').style.display = 'none';\n    document.getElementById('srpBuyConfirm').style.display = 'inline-flex';\n    document.getElementById('srpBuyModal').style.display = 'block';\n}\n\nfunction srpConfirmBuy() {\n    if (!currentBuyItem) return;\n    document.getElementById('srpBuyConfirm').innerHTML = '<span class=\"srp-loading\"><\/span> Sending...';\n    document.getElementById('srpBuyConfirm').disabled = true;\n\n    fetch(srpAjax.url + 'vip\/buy', {\n        method: 'POST',\n        headers: {'Content-Type': 'application\/json'},\n        credentials: 'same-origin',\n        body: JSON.stringify({item_id: currentBuyItem})\n    })\n    .then(function(r){return r.json().then(function(b){return{ok:r.ok,body:b};});})\n    .then(function(res){\n        document.getElementById('srpBuyConfirm').style.display = 'none';\n        var result = document.getElementById('srpBuyResult');\n        result.style.display = 'block';\n        if (res.ok) {\n            result.innerHTML = '<div style=\"padding:16px;background:rgba(34,197,94,0.1);border:1px solid #15803d;border-radius:8px;\"><h3 style=\"color:#22c55e;margin-bottom:8px;\">\u2705 Request Sent!<\/h3><p style=\"color:var(--srp-gray);font-size:14px;\">' + (res.body.message || 'Your request has been sent to our Discord. Wait for a staff member to contact you.') + '<\/p><\/div>';\n            srpToast('Purchase request sent!', 'success');\n        } else {\n            result.innerHTML = '<div style=\"padding:16px;background:rgba(220,38,38,0.1);border:1px solid #991b1b;border-radius:8px;\"><p style=\"color:#ef4444;\">' + (res.body.error || 'Failed to send request') + '<\/p><\/div>';\n        }\n    })\n    .catch(function(){\n        document.getElementById('srpBuyConfirm').innerHTML = 'Confirm Purchase';\n        document.getElementById('srpBuyConfirm').disabled = false;\n        document.getElementById('srpBuyResult').style.display = 'block';\n        document.getElementById('srpBuyResult').innerHTML = '<p style=\"color:#ef4444;\">Network error. Try again.<\/p>';\n    });\n}\n\ndocument.addEventListener('DOMContentLoaded', function(){\n    srpLoadStore('all');\n\n    var lang=(document.cookie.split(';').find(function(c){return c.trim().startsWith('srp_lang=');})||'').split('=')[1]||'en';\n    if(lang==='ar'){\n        document.getElementById('srpStoreSub').textContent='\u062d\u0632\u0645 VIP \u0645\u0645\u064a\u0632\u0629 \u0644\u0640 Angels & Devils Rp';\n        document.getElementById('srpStoreAll').textContent='\u0627\u0644\u0643\u0644';\n        document.getElementById('srpStoreCars').textContent='\u0633\u064a\u0627\u0631\u0627\u062a VIP';\n        document.getElementById('srpStoreMlo').textContent='\u062e\u0631\u0627\u0626\u0637 VIP';\n        document.getElementById('srpStoreProj').textContent='\u0645\u0634\u0627\u0631\u064a\u0639 VIP';\n        document.getElementById('srpBuyMsg').textContent='\u0628\u0639\u062f \u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0634\u0631\u0627\u0621\u060c \u0633\u064a\u062a\u0645 \u0625\u0631\u0633\u0627\u0644 \u0637\u0644\u0628\u0643 \u0644\u0633\u064a\u0631\u0641\u0631 \u0627\u0644\u062f\u064a\u0633\u0643\u0648\u0631\u062f. \u0633\u064a\u062a\u0648\u0627\u0635\u0644 \u0645\u0639\u0643 \u0639\u0636\u0648 \u0644\u0625\u062a\u0645\u0627\u0645 \u0627\u0644\u0634\u0631\u0627\u0621.';\n        document.getElementById('srpBuyConfirm').textContent='\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u0634\u0631\u0627\u0621';\n    }\n});\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-13","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/pages\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":0,"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/pages\/13\/revisions"}],"wp:attachment":[{"href":"https:\/\/angels-devils.adilbannar.my\/index.php\/wp-json\/wp\/v2\/media?parent=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}