مركز نتائج المباريات
بواسطة morbah |
|
جاري استدعاء البيانات من السيرفرات العالمية...
<div class="moplus-mega-kora" dir="rtl">
<!-- 1. الفلاتر والتحكم -->
<div class="kora-infinity-header">
<div class="kora-titles">
<h1>إمبراطورية الملاعب</h1>
<p>تغطية حية وشاملة لـ 150+ بطولة حول العالم</p>
</div>
<div class="kora-tabs-pill">
<button class="t-btn" data-offset="-1">أمس</button>
<button class="t-btn active" data-offset="0">اليوم</button>
<button class="t-btn" data-offset="1">غداً</button>
</div>
</div>
<!-- 2. حاوية العرض الرئيسية -->
<div id="kora-infinity-load">
<div class="k-loading-box">
<div class="k-spinner"></div>
<span>جاري استدعاء البيانات من السيرفرات العالمية...</span>
</div>
</div>
</div>
<style>
/* --- [CSS INFINITY PRO] --- */
/* إخفاء أدوات القالب المزعجة في هذه الصفحة */
.toc-container, #post-toc-container, .hs-title-wrapper, .single-post-meta, .post-share-container { display: none !important; }
.moplus-mega-kora { max-width: 1100px; margin: 0 auto; font-family: 'Tajawal', sans-serif; padding: 20px 10px; }
/* الهيدر الحديث */
.kora-infinity-header { text-align: center; margin-bottom: 40px; }
.kora-titles h1 { font-size: 40px; font-weight: 900; background: linear-gradient(to left, var(--accent-blue), #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; }
.kora-titles p { font-size: 16px; color: var(--text-secondary); opacity: 0.8; }
/* أزرار التبويب (Pill Style) */
.kora-tabs-pill { display: inline-flex; background: var(--bg-container); padding: 5px; border-radius: 50px; border: 1px solid var(--border-color); box-shadow: 0 10px 25px rgba(0,0,0,0.1); margin-top: 20px; position: sticky; top: 15px; z-index: 999; }
.t-btn { background: transparent; border: none; color: var(--text-primary); padding: 12px 35px; border-radius: 50px; cursor: pointer; font-weight: 800; font-size: 15px; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.t-btn.active { background: var(--accent-blue); color: #fff; box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4); }
/* مجموعات الدوريات */
.k-league-card { background: var(--bg-container); border: 1px solid var(--border-color); border-radius: 25px; margin-bottom: 30px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.03); transition: 0.3s; }
.k-league-card:hover { box-shadow: 0 15px 40px rgba(0,0,0,0.08); transform: translateY(-5px); }
/* هيدر الدوري (الاسم يمين واللوجو في النص) */
.k-league-head { background: var(--bg-hover); padding: 18px 25px; display: flex; align-items: center; justify-content: flex-start; position: relative; border-bottom: 1px solid var(--border-color); }
.k-league-head h2 { font-size: 17px; font-weight: 900; color: var(--text-primary); z-index: 2; margin: 0; text-align: right; }
.k-league-head img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); transition: 0.3s; }
.k-league-card:hover .k-league-head img { transform: translate(-50%, -55%) scale(1.1); }
/* صف المباراة */
.k-match-row { display: flex; align-items: center; padding: 25px; border-bottom: 1px solid var(--border-color); transition: 0.3s; text-decoration: none !important; color: inherit; }
.k-match-row:last-child { border-bottom: none; }
.k-match-row:hover { background: var(--bg-hover); }
.k-team { width: 38%; display: flex; align-items: center; gap: 15px; }
.k-team.home { justify-content: flex-start; }
.k-team.away { justify-content: flex-end; flex-direction: row-reverse; }
.k-team img { width: 45px; height: 45px; object-fit: contain; transition: 0.3s; }
.k-match-row:hover .k-team img { transform: scale(1.1); }
.k-team span { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.k-score-box { width: 24%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.k-score-num { font-size: 24px; font-weight: 900; color: var(--text-primary); letter-spacing: 3px; }
.k-status-pill { font-size: 10px; font-weight: 800; color: #fff; background: #64748b; padding: 5px 15px; border-radius: 50px; text-transform: uppercase; }
/* الحالات الخاصة */
.k-match-row.live-now .k-score-num { color: #ef4444; }
.k-match-row.live-now .k-status-pill { background: #ef4444; animation: k-pulse 1.5s infinite; }
@keyframes k-pulse { 50% { opacity: 0.6; } }
/* اللودر */
.k-loading-box { text-align: center; padding: 100px 20px; }
.k-spinner { width: 50px; height: 50px; border: 5px solid var(--bg-hover); border-top-color: var(--accent-blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 768px) {
.k-team span { font-size: 13px; }
.k-score-num { font-size: 18px; }
.k-team img { width: 30px; height: 30px; }
.kora-titles h1 { font-size: 28px; }
.t-btn { padding: 10px 20px; font-size: 13px; }
.k-league-head h2 { font-size: 14px; }
.k-league-head img { width: 30px; height: 30px; }
}
</style>
<script type='text/javascript'>
//<![CDATA[
const InfinityKora = {
// قائمة الدوريات لترتيب الصدارة (مصر، إنجلترا، إسبانيا، السعودية، أبطال أوروبا، أبطال أفريقيا)
priority: [552, 7, 11, 649, 572, 624, 17, 25, 35, 554, 555],
// نظام الكاش التوربيني
setCache: (k, v) => localStorage.setItem(k, JSON.stringify({val: v, exp: Date.now() + 600000})),
getCache: (k) => {
const d = localStorage.getItem(k);
if (!d) return null;
const item = JSON.parse(d);
return Date.now() > item.exp ? null : item.val;
},
getDates: (offset) => {
const d = new Date(); d.setDate(d.getDate() + offset);
return {
api: ("0" + d.getDate()).slice(-2) + "/" + ("0" + (d.getMonth() + 1)).slice(-2) + "/" + d.getFullYear(),
key: `inf_kora_${offset}_${d.getDate()}${d.getMonth()}`
};
},
fetch: async (offset = 0) => {
const container = document.getElementById('kora-infinity-load');
const dates = InfinityKora.getDates(offset);
// 1. تشغيل الكاش فوراً
const cached = InfinityKora.getCache(dates.key);
if (cached) { InfinityKora.render(cached); }
else { container.innerHTML = '<div class="k-loading-box"><div class="k-spinner"></div><span>جاري سحب البيانات المباشرة...</span></div>'; }
try {
// 2. طلب البيانات عبر البروكسي المعتمد
const api = `https://webws.365scores.com/web/games/allscores/?startDate=${dates.api}&endDate=${dates.api}&langId=27&appTypeId=5`;
const res = await fetch(`https://api.codetabs.com/v1/proxy?quest=${encodeURIComponent(api)}`);
const data = await res.json();
if (data && data.games) {
InfinityKora.setCache(dates.key, data);
InfinityKora.render(data);
}
} catch (e) {
if(!cached) container.innerHTML = '<div class="k-loading-box">تعذر الاتصال بالسيرفر، يرجى المحاولة لاحقاً.</div>';
}
},
render: (data) => {
const container = document.getElementById('kora-infinity-load');
const games = data.games || [];
const comps = data.competitions || [];
// تجميع ذكي
const grouped = games.reduce((acc, g) => {
if (!acc[g.competitionId]) acc[g.competitionId] = [];
acc[g.competitionId].push(g);
return acc;
}, {});
// ترتيب المجموعات (الدوريات المهمة أولاً)
const sortedCids = Object.keys(grouped).sort((a, b) => {
let pA = InfinityKora.priority.indexOf(parseInt(a));
let pB = InfinityKora.priority.indexOf(parseInt(b));
if (pA === -1) pA = 999; if (pB === -1) pB = 999;
return pA - pB;
});
let html = '';
const teamImg = (id) => `https://imagecache.365scores.com/image/upload/f_auto,w_96,h_96,q_auto:eco/v1/Competitors/${id}`;
const leagueImg = (id) => `https://imagecache.365scores.com/image/upload/f_auto,w_64,h_64,q_auto:eco/v1/Competitions/${id}`;
sortedCids.forEach(cid => {
const league = comps.find(c => c.id == cid) || {name: "بطولة متنوعة"};
html += `
<div class="k-league-card">
<div class="k-league-head">
<h2>${league.name}</h2>
<img src="${leagueImg(cid)}" onerror="this.style.display='none'"/>
</div>
<div class="k-league-body">
${grouped[cid].map(g => {
const h = g.homeCompetitor, a = g.awayCompetitor;
const isLive = g.statusId === 2 || g.statusId === 130;
const soon = (g.statusId === 1 || h.score < 0);
const scoreText = soon ? "VS" : `${h.score} - ${a.score}`;
let statusText = g.statusText;
if (soon) {
statusText = new Date(g.startTime).toLocaleTimeString('ar-EG', {hour:'2-digit', minute:'2-digit'});
}
return `
<a href="${g.matchviewUrl || '#'}" target="_blank" class="k-match-row ${isLive ? 'live-now' : ''}">
<div class="k-team home">
<img src="${teamImg(h.id)}" loading="lazy" onerror="this.src='https://i.imgur.com/R9J34z6.png'"/>
<span>${h.name}</span>
</div>
<div class="k-score-box">
<span class="k-score-num">${scoreText}</span>
<span class="k-status-pill">${statusText}</span>
</div>
<div class="k-team away">
<img src="${teamImg(a.id)}" loading="lazy" onerror="this.src='https://i.imgur.com/R9J34z6.png'"/>
<span>${a.name}</span>
</div>
</a>`;
}).join('')}
</div>
</div>`;
});
container.innerHTML = html || '<div class="k-loading-box">لا توجد مباريات جارية اليوم.</div>';
window.scrollTo({ top: 0, behavior: 'smooth' });
}
};
document.addEventListener('DOMContentLoaded', () => {
InfinityKora.fetch(0);
document.querySelectorAll('.t-btn').forEach(btn => {
btn.onclick = function() {
document.querySelectorAll('.t-btn').forEach(b => b.classList.remove('active'));
this.classList.add('active');
InfinityKora.fetch(parseInt(this.dataset.offset));
};
});
});
//]]>
</script>
انا مهتم بمجال التقنية والربح من الانترنت واتطلع لنشر المزيد من المقالات التي تفيدكم