<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<script>
 // If %NAN% on the games add more numbers inside this variable 

var x = [0, 609, 111,114,112,118,119,141,144,142,148,149,121,124,122,128,129,181,184,182,188,189,191,194,192,198,199,411,414,
412,418,419,441,444,442,448,449,421,424,422,428,429,481,484,482,488,489,491,494,492,498,499,211,214,212,218,219,241,244,242,
248,249,221,224,222,228,229,281,284,282,288,289,291,294,292,298,299,811,814,812,818,819,841,844,842,848,849,821,824,822,828,
829,881,884,882,888,889,891,894,892,898,899,911,914,912,918,919,941,944,942,948,949,921,924,922,928,929,981,984,982,988,989,
991,994,992,998, 5808, 1238, 1712, 88, 55, 5572, 8054, 2187, 99, 1237, 5544, 9057, 8548, 2451, 9051, 11,10,15,18,14,01,00,
05,08,04,51,50,55,58,54,81,80,85,88,84,41,40,45,48,44, 777,776,779,770,778,774,767,766,769,760,768,764,797,796,799,790,
798,794,707,706,709,700,708,704,787,786,789,780,788,784,747,746,749,740,748,744,677,676,679,670,678,674,667,666,669,
660,668,664,697,696,699,690,698,694,607,606,609,600,608,604,687,686,689,680,688,684,647,646,649,640,648,644,977,976,
979,970,978,974,967,966,969,960,968,964,997,996,999,990,998,994,907,906,909,900,908,904,987,986,989,980,988,984,947,
946,949,940,948,944,077,076,079,070,078,074,067,066,069,060,068,064,097,096,099,090,098,094,007,006,009,000,008,004,
087,086,089,080,088,084,047,046,049,040,048,044,877,876,879,870,878,874,867,866,869,860,868,864,897,896,899,890,898,
894,807,806,809,800,808,804,887,886,889,880,888,884,847,846,849,840,848,844,477,476,479,470,478,474,467,466,469,460,
468,464,497,496,499,490,498,494,407,406,409,400,408,404,487,486,489,480,488,484,447,446,449,440,448,444, 1458, 1519,
2687, 826, 62, 722, 2425, 2120, 1089, 1708, 588, 786, 2378, 2765, 329, 1388, 1045, 1847, 2500, 1761, 2383, 271, 733,
2884, 2913, 1569, 1436, 1448, 1987, 410, 1585, 99, 1234, 572, 66, 1290, 2189, 2870, 369, 537, 1532, 1570, 2125, 2947,
762, 580, 2567, 1041, 1573, 2783, 2608, 302, 1187, 2977, 2602, 890, 2816, 2378, 1452, 748, 757, 625, 2089, 1478, 563,
784, 539, 2092, 1240, 826, 2211, 837, 2673, 2233, 645, 1934, 105, 2036, 1554, 579, 1833, 2425, 1102, 2391, 2913, 2143,
1044, 1461, 1997, 2424, 1934, 904, 2195, 2069, 2369, 1672, 1620, 2195, 1552, 2454, 578, 2164, 2416, 1051, 2449, 1009,
2940, 332, 848, 1310, 2882, 2952, 18, 550, 1773, 700, 1968, 1041, 1364, 1271, 865, 2211, 1707, 1866, 2869, 1535, 2705,
2963, 918, 1316, 82, 34, 1352, 2622, 1662, 2490, 739, 2752, 2866, 1692, 1919, 1041, 821, 537, 2263, 1245, 317, 175, 16,
2638, 2155, 2110, 2468, 1713, 1428, 859, 834, 1510, 361, 285, 2681, 811, 242, 1758, 2741, 400, 615, 1659, 296, 1864,
1647, 376, 501, 566, 2092, 294, 2809, 1142, 262, 958, 2979, 830, 151, 1659, 29, 1756, 351, 2075, 1171, 1642, 1818, 158, 
2468, 2816, 2670, 291, 2407, 88, 153, 646, 280, 2824, 2803, 942, 106, 2611, 1399, 1839, 839, 953, 1896, 235, 2566, 1673, 
1074, 414, 1645, 1708, 2798, 1210, 287, 1275, 2234, 1760, 783, 1083, 2912, 800, 1110, 2976, 1838, 427, 2490, 2889, 2222, 
2455, 199, 834, 2662, 1371, 1178, 2935, 2947, 2388, 516, 1688, 1858, 295, 2587, 2479, 2456, 695, 2543, 2914, 2522, 1313, 
1004, 605, 2039, 423, 1563, 1048, 1212, 1794, 2134, 625, 856, 1715, 340, 2891, 1018, 444, 2753, 1887, 903, 2842, 50, 785,
2889, 37, 1232, 63, 1540, 932, 1091, 2526, 1507, 2235, 2912, 526, 2490, 2798, 1270, 1678, 269, 730, 61, 1450, 1025, 1257,
0057, 1234, 4571, 5076, 248, 074, 098, 0564, 8556, 8888,8883,8885,8884,8887,8838,8833,8835,8834,8837,8858,8853,8855,8854,
8857,8848,8843,8845,8844,8847,8878,8873,8875,8874,8877,8388,8383,8385,8384,8387,8338,8333,8335,8334,8337,8358,8353,8355,
8354,8357,8348,8343,8345,8344,8347,8378,8373,8375,8374,8377,8588,8583,8585,8584,8587,8538,8533,8535,8534,8537,8558,8553,
8555,8554,8557,8548,8543,8545,8544,8547,8578,8573,8575,8574,8577,8488,8483,8485,8484,8487,8438,8433,8435,8434,8437,8458,
8453,8455,8454,8457,8448,8443,8445,8444,8447,8478,8473,8475,8474,8477,8788,8783,8785,8784,8787,8738,8733,8735,8734,8737,
8758,8753,8755,8754,8757,8748,8743,8745,8744,8747,8778,8773,8775,8774,8777,3888,3883,3885,3884,3887,3838,3833,3835,3834,
3837,3858,3853,3855,3854,3857,3848,3843,3845,3844,3847,3878,3873,3875,3874,3877,3388,3383,3385,3384,3387,3338,3333,3335,
3334,3337,3358,3353,3355,3354,3357,3348,3343,3345,3344,3347,3378,3373,3375,3374,3377,3588,3583,3585,3584,3587,3538,3533,
3535,3534,3537,3558,3553,3555,3554,3557,3548,3543,3545,3544,3547,3578,3573,3575,3574,3577,3488,3483,3485,3484,3487,3438,
3433,3435,3434,3437,3458,3453,3455,3454,3457,3448,3443,3445,3444,3447,3478,3473,3475,3474,3477,3788,3783,3785,3784,3787,
3738,3733,3735,3734,3737,3758,3753,3755,3754,3757,3748,3743,3745,3744,3747,3778,3773,3775,3774,3777,5888,5883,5885,5884,
5887,5838,5833,5835,5834,5837,5858,5853,5855,5854,5857,5848,5843,5845,5844,5847,5878,5873,5875,5874,5877,5388,5383,5385,
5384,5387,5338,5333,5335,5334,5337,5358,5353,5355,5354,5357,5348,5343,5345,5344,5347,5378,5373,5375,5374,5377,5588,5583,
5585,5584,5587,5538,5533,5535,5534,5537,5558,5553,5555,5554,5557,5548,5543,5545,5544,5547,5578,5573,5575,5574,5577,5488,
5483,5485,5484,5487,5438,5433,5435,5434,5437,5458,5453,5455,5454,5457,5448,5443,5445,5444,5447,5478,5473,5475,5474,5477,
5788,5783,5785,5784,5787,5738,5733,5735,5734,5737,5758,5753,5755,5754,5757,5748,5743,5745,5744,5747,5778,5773,5775,5774,
5777,4888,4883,4885,4884,4887,4838,4833,4835,4834,4837,4858,4853,4855,4854,4857,4848,4843,4845,4844,4847,4878,4873,4875,
4874,4877,4388,4383,4385,4384,4387,4338,4333,4335,4334,4337,4358,4353,4355,4354,4357,4348,4343,4345,4344,4347,4378,4373,
4375,4374,4377,4588,4583,4585,4584,4587,4538,4533,4535,4534,4537,4558,4553,4555,4554,4557,4548,4543,4545,4544,4547,4578,
4573,4575,4574,4577,4488,4483,4485,4484,4487,4438,4433,4435,4434,4437,4458,4453,4455,4454,4457,4448,4443,4445,4444,4447,
4478,4473,4475,4474,4477,4788,4783,4785,4784,4787,4738,4733,4735,4734,4737,4758,4753,4755,4754,4757,4748,4743,4745,4744,
4747,4778,4773,4775,4774,4777,7888,7883,7885,7884,7887,7838,7833,7835,7834,7837,7858,7853,7855,7854,7857,7848,7843,7845,
7844,7847,7878,7873,7875,7874,7877,7388,7383,7385,7384,7387,7338,7333,7335,7334,7337,7358,7353,7355,7354,7357,7348,7343,
7345,7344,7347,7378,7373,7375,7374,7377,7588,7583,7585,7584,7587,7538,7533,7535,7534,7537,7558,7553,7555,7554,7557,7548,
7543,7545,7544,7547,7578,7573,7575,7574,7577,7488,7483,7485,7484,7487,7438,7433,7435,7434,7437,7458,7453,7455,7454,7457,
7448,7443,7445,7444,7447,7478,7473,7475,7474,7477,7788,7783,7785,7784,7787,7738,7733,7735,7734,7737,7758,7753,7755,7754,
7757,7748,7743,7745,7744,7747,7778,7773,7775,7774,7777, 555,556,550,551,553,565,566,560,561,563,505,506,500,501,503,515,
516,510,511,513,535,536,530,531,533,655,656,650,651,653,665,666,660,661,663,605,606,600,601,603,615,616,610,611,613,635,
636,630,631,633,055,056,050,051,053,065,066,060,061,063,005,006,000,001,003,015,016,010,011,013,035,036,030,031,033,155,
156,150,151,153,165,166,160,161,163,105,106,100,101,103,115,116,110,111,113,135,136,130,131,133,355,356,350,351,353,365,
366,360,361,363,305,306,300,301,303,315,316,310,311,313,335,336,330,331,333, 7777,7770,7776,7771,7772,7707,7700,7706,7701,
7702,7767,7760,7766,7761,7762,7717,7710,7716,7711,7712,7727,7720,7726,7721,7722,7077,7070,7076,7071,7072,7007,7000,7006,
7001,7002,7067,7060,7066,7061,7062,7017,7010,7016,7011,7012,7027,7020,7026,7021,7022,7677,7670,7676,7671,7672,7607,7600,
7606,7601,7602,7667,7660,7666,7661,7662,7617,7610,7616,7611,7612,7627,7620,7626,7621,7622,7177,7170,7176,7171,7172,7107,
7100,7106,7101,7102,7167,7160,7166,7161,7162,7117,7110,7116,7111,7112,7127,7120,7126,7121,7122,7277,7270,7276,7271,7272,
7207,7200,7206,7201,7202,7267,7260,7266,7261,7262,7217,7210,7216,7211,7212,7227,7220,7226,7221,7222,0777,0770,0776,0771,
0772,0707,0700,0706,0701,0702,0767,0760,0766,0761,0762,0717,0710,0716,0711,0712,0727,0720,0726,0721,0722,0077,0070,0076,
0071,0072,0007,0000,0006,0001,0002,0067,0060,0066,0061,0062,0017,0010,0016,0011,0012,0027,0020,0026,0021,0022,0677,0670,
0676,0671,0672,0607,0600,0606,0601,0602,0667,0660,0666,0661,0662,0617,0610,0616,0611,0612,0627,0620,0626,0621,0622,0177,
0170,0176,0171,0172,0107,0100,0106,0101,0102,0167,0160,0166,0161,0162,0117,0110,0116,0111,0112,0127,0120,0126,0121,0122,
0277,0270,0276,0271,0272,0207,0200,0206,0201,0202,0267,0260,0266,0261,0262,0217,0210,0216,0211,0212,0227,0220,0226,0221,
0222,6777,6770,6776,6771,6772,6707,6700,6706,6701,6702,6767,6760,6766,6761,6762,6717,6710,6716,6711,6712,6727,6720,6726,
6721,6722,6077,6070,6076,6071,6072,6007,6000,6006,6001,6002,6067,6060,6066,6061,6062,6017,6010,6016,6011,6012,6027,6020,
6026,6021,6022,6677,6670,6676,6671,6672,6607,6600,6606,6601,6602,6667,6660,6666,6661,6662,6617,6610,6616,6611,6612,6627,
6620,6626,6621,6622,6177,6170,6176,6171,6172,6107,6100,6106,6101,6102,6167,6160,6166,6161,6162,6117,6110,6116,6111,6112,
6127,6120,6126,6121,6122,6277,6270,6276,6271,6272,6207,6200,6206,6201,6202,6267,6260,6266,6261,6262,6217,6210,6216,6211,
6212,6227,6220,6226,6221,6222,1777,1770,1776,1771,1772,1707,1700,1706,1701,1702,1767,1760,1766,1761,1762,1717,1710,1716,
1711,1712,1727,1720,1726,1721,1722,1077,1070,1076,1071,1072,1007,1000,1006,1001,1002,1067,1060,1066,1061,1062,1017,1010,
1016,1011,1012,1027,1020,1026,1021,1022,1677,1670,1676,1671,1672,1607,1600,1606,1601,1602,1667,1660,1666,1661,1662,1617,
1610,1616,1611,1612,1627,1620,1626,1621,1622,1177,1170,1176,1171,1172,1107,1100,1106,1101,1102,1167,1160,1166,1161,1162,
1117,1110,1116,1111,1112,1127,1120,1126,1121,1122,1277,1270,1276,1271,1272,1207,1200,1206,1201,1202,1267,1260,1266,1261,
1262,1217,1210,1216,1211,1212,1227,1220,1226,1221,1222,2777,2770,2776,2771,2772,2707,2700,2706,2701,2702,2767,2760,2766,
2761,2762,2717,2710,2716,2711,2712,2727,2720,2726,2721,2722,2077,2070,2076,2071,2072,2007,2000,2006,2001,2002,2067,2060,
2066,2061,2062,2017,2010,2016,2011,2012,2027,2020,2026,2021,2022,2677,2670,2676,2671,2672,2607,2600,2606,2601,2602,2667,
2660,2666,2661,2662,2617,2610,2616,2611,2612,2627,2620,2626,2621,2622,2177,2170,2176,2171,2172,2107,2100,2106,2101,2102,
2167,2160,2166,2161,2162,2117,2110,2116,2111,2112,2127,2120,2126,2121,2122,2277,2270,2276,2271,2272,2207,2200,2206,2201,
2202,2267,2260,2266,2261,2262,2217,2210,2216,2211,2212,2227,2220,2226,2221,2222,];
// If %NAN% on the games add more numbers inside this variable

for (let i = 1; i <= 2510; i++) { //add more loops numbers according to the games %NAN% that u add in the variable
    const d = new Date();
    var date = d.getUTCDate();
    var day = d.getUTCDay() + 13;
    var year = d.getUTCFullYear();
    var month = d.getUTCMonth() + 1;
    var hour = d.getUTCHours();
    var min = d.getMinutes();
    if (min < 30) {
        min = 1;
    } else {
        min = 2;
    }
    var xx = day + year * month * date;
    xx = Math.pow(xx, hour * min);
    xx = xx * x[i];
    // xx = xx * 2 - 1;
    // xx = xx/2;

    if (i == 6 || i == 8 || i == 79 || i == 104 || i == 4 || i == 5 || i == 35 || i == 77 || i == 1 || i == 18 || i == 96) {
        xx = xx % 27;
        xx += 65;
    } else {
        xx = xx % 74;
        xx += 25;
    }
    const as = "percent-bar-" + i;
    const asd = "percent-txt-" + i;
    var percentTxt = document.getElementById("percent-txt-" + i);
    var bar = document.getElementById("percent-bar-" + i);
    var rtptxt = document.getElementById("rtptxt-" + i);
    percentTxt.innerHTML = 'RTP GACOR: ' +  xx + "%";
    rtptxt.innerHTML = xx + "%";
    $("#percent-bar-" + i)
        .attr("aria-valuenow", xx)
        .css("width", xx + "%");
    if (xx < 30) {
        bar.classList.add("bad");
    } else if (xx > 70) {
        bar.classList.add("great");
    } else {
        bar.classList.add("good");
    }
}

</script>

<?php
//error_reporting(0);
// include '../../webgets.php';
 require '../../data.php';
 require '../../config.php';
// //get Slots Images from Bosluna
// $page = file_get_html('https://64.227.174.136/?content=slot');

$gamename = 'pp';

  // $findpp =  $page->find('img');

  //get pola slot from other website
  //$page2 = file_get_html('https://content.yardmap.org/slot-gacor-hari-ini');

  //$findpola = $page2->find('td.pola-content');

  echo '<div class="row">';
  echo '<div class="col-lg-12 text-center">';
  switch($gamename) {
    case 'jg':
      echo '<h4>JOKER GAMING SLOT LIVE RTP</h4> <div>
      <h6><i class="fas fa-thumbs-up"></i> SUKA(5.0): <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i></h6>
    </div>';
    break;

    case 'pp':
      echo '<h4>PRAGMATIC PLAY SLOT LIVE RTP</h4>
      <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(5.9) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i></h6>
        </div>';
    break;

    case 'hb':
      echo '<h4>HABANERO SLOT LIVE RTP</h4>
      <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(5.1) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i></h6>
        </div>';
    break;

    case 'cq9':
      echo '<h4>CQ9 SLOT LIVE RTP</h4>
      <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4.7) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>';
    break;

    case 'pg':
      echo '<h4>POCKET GAMING SLOT LIVE RTP</h4>
      <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(5.8) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i></h6>
        </div>';
    break;

    case 'sg':
      echo '<h4>SPADE GAMING SLOT LIVE RTP</h4>
      <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4.0) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>';
    break;

    case 'mg':
      echo '<h4>MICRO GAMING SLOT LIVE RTP</h4>
      <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.8) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>';
    break;

    case 'idn':
        echo '<h4>IDN SLOT LIVE RTP</h4>
        <div>
            <h6><i class="fas fa-thumbs-up"></i> SUKA(3.8) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
          </div>';
      break;

    case 'ttg':
      echo '<h4>TOP TREND GAMING SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.5) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'isoft':
      echo '<h4>ISOFTBET SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'skywind':
      echo '<h4>SKYWIND SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.5) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'playngo':
      echo '<h4>PLAYNGO SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4.5) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'ygg':
      echo '<h4>YGGDRASIL SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(2.9) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'playson':
      echo '<h4>PLAYSON SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(2.7) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'boom':
      echo '<h4>BOOMING GAME SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.3) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'playtech':
      echo '<h4>PLAYTECH SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4.2) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'playstar':
      echo '<h4>PLAYSTAR SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.9) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'evoplay':
      echo '<h4>EVOPLAY SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(2.3) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'booongo':
      echo '<h4>BOOONGO SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.0) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'mancala':
      echo '<h4>MANCALA SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.0) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'eagaming':
      echo '<h4>EAGAMING SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.3) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'redtiger':
      echo '<h4>RED TIGER SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4.3) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'netent':
      echo '<h4>NETENT SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(4.0) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'ais':
      echo '<h4>AIS SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.0) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

    case 'gameplay':
      echo '<h4>GAMEPLAY SLOT LIVE RTP</h4>
        <div>
          <h6><i class="fas fa-thumbs-up"></i> SUKA(3.7) : <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-warning"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i> <i class="fas fa-star text-light"></i></h6>
        </div>
      ';
    break;

  }

  echo '</div>';

  if($gamename == 'pp') {
      $pprand = rand(1, 40);
      $rat = rand(1, 99);
    echo '<div class="col-lg-12 my-3" style="display: block;">
      <img class="rounded d-block mx-auto" width="150" height="130" src="https://img.pay4d.info/pp/images/1301.jpg">
      <div class="percent mt-2 w-25">
        <p style="z-index: 15">RTP CRASH: '.$pprand.'.'.$rat.'x</p>
        <div class="percent-bar ';
            if($pprand < 30) {
              echo 'bad';
            } else if($pprand > 40) {
              echo 'great';
            } else {
              echo 'good';
            }
        
        echo '" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="'.$pprand.'" style="width: '.$pprand.'%;"></div>
      </div>
    </div>';
}

$dirname = $_SERVER['DOCUMENT_ROOT']."/blog-to-dy/images/games/";
$imgdir = glob($dirname.'*.{jpg,png,gif,jpeg,}', GLOB_BRACE);

$counter = 1;
$counter2 = 1;
$counter3 = 1;
$counter4 = 1;
$counter5 = 1;
$counter6 = 1;
$counter7 = 1;
$counter8 = 1;
$counter9 = 1;

if($gamename == 'pp') {
for($t = 0; $t <= 3; $t++) {

    echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
    <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
      <div class="percent">
        <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
        <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
      </div>
    </div>
  </div> 
  
  <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
  
}
}

if($gamename == 'pg') {
  for($t = 0; $t <= 25; $t++) {
  
      echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
      <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
        <div class="percent">
          <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
          <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
        </div>
      </div>
    </div> 
    
    <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
    
  }
  }

  if($gamename == 'hb') {
    for($t = 0; $t <= 45; $t++) {
    
        echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
        <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
          <div class="percent">
            <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
            <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
          </div>
        </div>
      </div> 
      
      <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
      
    }
    }

    if($gamename == 'idn') {
      for($t = 0; $t <= 67; $t++) {
      
          echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
          <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
            <div class="percent">
              <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
              <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
            </div>
          </div>
        </div> 
        
        <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
        
      }
      }

      if($gamename == 'sg') {
        for($t = 0; $t <= 86; $t++) {
        
            echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
            <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
              <div class="percent">
                <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
              </div>
            </div>
          </div> 
          
          <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
          
        }
        }

        if($gamename == 'mg') {
          for($t = 0; $t <= 99; $t++) {
          
              echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
              <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                <div class="percent">
                  <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                  <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                </div>
              </div>
            </div>
            
            <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
            
          }
          }

          if($gamename == 'jg') {
            for($t = 0; $t <= 119; $t++) {
            
                echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                  <div class="percent">
                    <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                    <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                  </div>
                </div>
              </div> 
              
              <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
              
            }
            }



            if($gamename == 'ttg') {
              for($t = 0; $t <= 146; $t++) {
              
                  echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                  <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                    <div class="percent">
                      <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                      <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                    </div>
                  </div>
                </div>
                
                <!-- Pola Slots -->
                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                  <div class="modal-dialog modal-lg modal-dialog-centered">
                    <div class="modal-content border-0 bg-transparent">
                      <div class="modal-body">

                      		<h6 id="rtptxt-'.$counter5++.'"></h6>

    
                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                      </div>
                                  </div>
 					</div>
                              </div>';
                
                
              }

              }


              if($gamename == 'ais') {
                for($t = 0; $t <= 166; $t++) {
                
                    echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                    <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                      <div class="percent">
                        <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                        <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                      </div>
                    </div>
                  </div>
                  
                  <!-- Pola Slots -->
                  <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                    <div class="modal-dialog modal-lg modal-dialog-centered">
                      <div class="modal-content border-0 bg-transparent">
                        <div class="modal-body">
  
                            <h6 id="rtptxt-'.$counter5++.'"></h6>
  
      
                                                <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                        </div>
                                    </div>
             </div>
                                </div>';
                  
                  
                }
  
                }

                if($gamename == 'boom') {
                  for($t = 0; $t <= 184; $t++) {
                  
                      echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                      <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                        <div class="percent">
                          <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                          <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                        </div>
                      </div>
                    </div>
                    
                    <!-- Pola Slots -->
                    <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                      <div class="modal-dialog modal-lg modal-dialog-centered">
                        <div class="modal-content border-0 bg-transparent">
                          <div class="modal-body">
    
                              <h6 id="rtptxt-'.$counter5++.'"></h6>
    
        
                                                  <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                          </div>
                                      </div>
               </div>
                                  </div>';
                    
                    
                  }
    
                  }


                  if($gamename == 'booongo') {
                    for($t = 0; $t <= 172; $t++) {
                    
                        echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                        <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                          <div class="percent">
                            <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                            <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                          </div>
                        </div>
                      </div>
                      
                      <!-- Pola Slots -->
                      <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                        <div class="modal-dialog modal-lg modal-dialog-centered">
                          <div class="modal-content border-0 bg-transparent">
                            <div class="modal-body">
      
                                <h6 id="rtptxt-'.$counter5++.'"></h6>
      
          
                                                    <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                            </div>
                                        </div>
                 </div>
                                    </div>';
                      
                      
                    }
      
                    }


                    if($gamename == 'eagaming') {
                      for($t = 0; $t <= 197; $t++) {
                      
                          echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                          <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                            <div class="percent">
                              <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                              <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                            </div>
                          </div>
                        </div>
                        
                        <!-- Pola Slots -->
                        <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                          <div class="modal-dialog modal-lg modal-dialog-centered">
                            <div class="modal-content border-0 bg-transparent">
                              <div class="modal-body">
        
                                  <h6 id="rtptxt-'.$counter5++.'"></h6>
        
            
                                                      <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                              </div>
                                          </div>
                   </div>
                                      </div>';
                        
                        
                      }
        
                      }


                      if($gamename == 'evoplay') {
                        for($t = 0; $t <= 219; $t++) {
                        
                            echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                            <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                              <div class="percent">
                                <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                              </div>
                            </div>
                          </div>
                          
                          <!-- Pola Slots -->
                          <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                            <div class="modal-dialog modal-lg modal-dialog-centered">
                              <div class="modal-content border-0 bg-transparent">
                                <div class="modal-body">
          
                                    <h6 id="rtptxt-'.$counter5++.'"></h6>
          
              
                                                        <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                </div>
                                            </div>
                     </div>
                                        </div>';
                          
                          
                        }
          
                        }

                        if($gamename == 'gameplay') {
                          for($t = 0; $t <= 233; $t++) {
                          
                              echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                              <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                <div class="percent">
                                  <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                  <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                </div>
                              </div>
                            </div>
                            
                            <!-- Pola Slots -->
                            <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                              <div class="modal-dialog modal-lg modal-dialog-centered">
                                <div class="modal-content border-0 bg-transparent">
                                  <div class="modal-body">
            
                                      <h6 id="rtptxt-'.$counter5++.'"></h6>
            
                
                                                          <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                  </div>
                                              </div>
                       </div>
                                          </div>';
                            
                            
                          }
            
                          }


                          if($gamename == 'isoft') {
                            for($t = 0; $t <= 253; $t++) {
                            
                                echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                  <div class="percent">
                                    <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                    <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                  </div>
                                </div>
                              </div>
                              
                              <!-- Pola Slots -->
                              <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                <div class="modal-dialog modal-lg modal-dialog-centered">
                                  <div class="modal-content border-0 bg-transparent">
                                    <div class="modal-body">
              
                                        <h6 id="rtptxt-'.$counter5++.'"></h6>
              
                  
                                                            <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                    </div>
                                                </div>
                         </div>
                                            </div>';
                              
                              
                            }
              
                            }

                            if($gamename == 'mancala') {
                              for($t = 0; $t <= 277; $t++) {
                              
                                  echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                  <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                    <div class="percent">
                                      <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                      <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                    </div>
                                  </div>
                                </div>
                                
                                <!-- Pola Slots -->
                                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                  <div class="modal-dialog modal-lg modal-dialog-centered">
                                    <div class="modal-content border-0 bg-transparent">
                                      <div class="modal-body">
                
                                          <h6 id="rtptxt-'.$counter5++.'"></h6>
                
                    
                                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                      </div>
                                                  </div>
                           </div>
                                              </div>';
                                
                                
                              }
                
                              }

                              if($gamename == 'netent') {
                                for($t = 0; $t <= 293; $t++) {
                                
                                    echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                    <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                      <div class="percent">
                                        <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                        <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                      </div>
                                    </div>
                                  </div>
                                  
                                  <!-- Pola Slots -->
                                  <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                    <div class="modal-dialog modal-lg modal-dialog-centered">
                                      <div class="modal-content border-0 bg-transparent">
                                        <div class="modal-body">
                  
                                            <h6 id="rtptxt-'.$counter5++.'"></h6>
                  
                      
                                                                <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                        </div>
                                                    </div>
                             </div>
                                                </div>';
                                  
                                  
                                }
                  
                                }

                                if($gamename == 'nolimit') {
                                  for($t = 0; $t <= 317; $t++) {
                                  
                                      echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                      <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                        <div class="percent">
                                          <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                          <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                        </div>
                                      </div>
                                    </div>
                                    
                                    <!-- Pola Slots -->
                                    <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                      <div class="modal-dialog modal-lg modal-dialog-centered">
                                        <div class="modal-content border-0 bg-transparent">
                                          <div class="modal-body">
                    
                                              <h6 id="rtptxt-'.$counter5++.'"></h6>
                    
                        
                                                                  <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                          </div>
                                                      </div>
                               </div>
                                                  </div>';
                                    
                                    
                                  }
                    
                                  }

                                  if($gamename == 'playngo') {
                                    for($t = 0; $t <= 341; $t++) {
                                    
                                        echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                        <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                          <div class="percent">
                                            <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                            <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                          </div>
                                        </div>
                                      </div>
                                      
                                      <!-- Pola Slots -->
                                      <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                        <div class="modal-dialog modal-lg modal-dialog-centered">
                                          <div class="modal-content border-0 bg-transparent">
                                            <div class="modal-body">
                      
                                                <h6 id="rtptxt-'.$counter5++.'"></h6>
                      
                          
                                                                    <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                            </div>
                                                        </div>
                                 </div>
                                                    </div>';
                                      
                                      
                                    }
                      
                                    }

                                    if($gamename == 'playson') {
                                      for($t = 0; $t <= 369; $t++) {
                                      
                                          echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                          <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                            <div class="percent">
                                              <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                              <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                            </div>
                                          </div>
                                        </div>
                                        
                                        <!-- Pola Slots -->
                                        <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                          <div class="modal-dialog modal-lg modal-dialog-centered">
                                            <div class="modal-content border-0 bg-transparent">
                                              <div class="modal-body">
                        
                                                  <h6 id="rtptxt-'.$counter5++.'"></h6>
                        
                            
                                                                      <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                              </div>
                                                          </div>
                                   </div>
                                                      </div>';
                                        
                                        
                                      }
                        
                                      }

                                      if($gamename == 'playstar') {
                                        for($t = 0; $t <= 384; $t++) {
                                        
                                            echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                            <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                              <div class="percent">
                                                <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                                <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                              </div>
                                            </div>
                                          </div>
                                          
                                          <!-- Pola Slots -->
                                          <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                            <div class="modal-dialog modal-lg modal-dialog-centered">
                                              <div class="modal-content border-0 bg-transparent">
                                                <div class="modal-body">
                          
                                                    <h6 id="rtptxt-'.$counter5++.'"></h6>
                          
                              
                                                                        <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                                </div>
                                                            </div>
                                     </div>
                                                        </div>';
                                          
                                          
                                        }
                          
                                        }

                                        if($gamename == 'playtech') {
                                          for($t = 0; $t <= 424; $t++) {
                                          
                                              echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                              <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                                <div class="percent">
                                                  <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                                  <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                                </div>
                                              </div>
                                            </div>
                                            
                                            <!-- Pola Slots -->
                                            <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                              <div class="modal-dialog modal-lg modal-dialog-centered">
                                                <div class="modal-content border-0 bg-transparent">
                                                  <div class="modal-body">
                            
                                                      <h6 id="rtptxt-'.$counter5++.'"></h6>
                            
                                
                                                                          <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                                  </div>
                                                              </div>
                                       </div>
                                                          </div>';
                                            
                                            
                                          }
                            
                                          }

                                          if($gamename == 'redtiger') {
                                            for($t = 0; $t <= 451; $t++) {
                                            
                                                echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                                <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                                  <div class="percent">
                                                    <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                                    <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                                  </div>
                                                </div>
                                              </div>
                                              
                                              <!-- Pola Slots -->
                                              <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                                <div class="modal-dialog modal-lg modal-dialog-centered">
                                                  <div class="modal-content border-0 bg-transparent">
                                                    <div class="modal-body">
                              
                                                        <h6 id="rtptxt-'.$counter5++.'"></h6>
                              
                                  
                                                                            <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                                    </div>
                                                                </div>
                                         </div>
                                                            </div>';
                                              
                                              
                                            }
                              
                                            }

                                            if($gamename == 'skywind') {
                                              for($t = 0; $t <= 484; $t++) {
                                              
                                                  echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                                  <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                                    <div class="percent">
                                                      <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                                      <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                                    </div>
                                                  </div>
                                                </div>
                                                
                                                <!-- Pola Slots -->
                                                <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                                  <div class="modal-dialog modal-lg modal-dialog-centered">
                                                    <div class="modal-content border-0 bg-transparent">
                                                      <div class="modal-body">
                                
                                                          <h6 id="rtptxt-'.$counter5++.'"></h6>
                                
                                    
                                                                              <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                                      </div>
                                                                  </div>
                                           </div>
                                                              </div>';
                                                
                                                
                                              }
                                
                                              }

                                              if($gamename == 'ygg') {
                                                for($t = 0; $t <= 514; $t++) {
                                                
                                                    echo '<div class="col-lg-3 col-6 '.$counter9++.' d-none my-3">
                                                    <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
                                                      <div class="percent">
                                                        <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                                                        <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
                                                      </div>
                                                    </div>
                                                  </div>
                                                  
                                                  <!-- Pola Slots -->
                                                  <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
                                                    <div class="modal-dialog modal-lg modal-dialog-centered">
                                                      <div class="modal-content border-0 bg-transparent">
                                                        <div class="modal-body">
                                  
                                                            <h6 id="rtptxt-'.$counter5++.'"></h6>
                                  
                                      
                                                                                <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                                                        </div>
                                                                    </div>
                                             </div>
                                                                </div>';
                                                  
                                                  
                                                }
                                  
                                                }
  



  foreach($imgdir as $imagess){
    $realsrc = trim(str_replace("C:/xampp/htdocs/", "", $imagess));

      $ppone = basename($realsrc);

      if(strpos($ppone, $gamename.'-') !== false && !strpos($ppone, $gamename.'-i') == true) {

          echo '
          <div class="col-6 col-sm-4 col-md-3 col-lg-2 showgames my-3">
            <div data-bs-toggle="modal" data-bs-target="#polaslots-'.$counter++.'">
              <img  class="rounded d-block mx-auto" width="130" src="../../../'.$realsrc .'" />
              <div class="percent">
                <p id="percent-txt-'.$counter2++.'" style="z-index: 15"></p>
                <div id="percent-bar-'.$counter3++.'" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0"></div>
              </div>
            </div>
          </div>
          
            <!-- Pola Slots -->
            <div class="modal fade" id="polaslots-'.$counter4++.'" tabindex="-1" >
              <div class="modal-dialog modal-lg modal-dialog-centered">
                <div class="modal-content border-0 bg-transparent">
                  <div class="modal-body">

                              <div class="card">
                                  <div class="card-body">
                                          <div class="row">
                                                <div class="col-lg-4 align-self-center">
                                                  <img class="img-thumbnail d-block mx-auto" src="../../../'.$realsrc .'" />
                                                  <a target="_blank" href="'.ftab("link_daftarbo", "web_setting", "link_daftarbo").'" class="btn d-block my-2 mx-auto btn-warning"><i class="fas fa-play"></i> MAINKAN SEKARANG</a>
                                                </div>

                                                <div class="col-lg-8">
                                                      <table style=" font-size: 10pt;" class="table d-block mx-auto">
                                                        <tbody>
                                                              <tr>
                                                                <td>Jam Gacor:</td>
                                                                <td class="text-center" colspan="2">';

                                                                  $sjamrtp = "SELECT jam_rtp, jam_rtp_2 FROM jam_gacor_rtp WHERE jam_nomor =". $counter9++; 
                                                                  $qjamrtp = mysqli_query($data, $sjamrtp);

                                                                  if(mysqli_num_rows($qjamrtp) > 0) {
                                                                    $fjamrtp = mysqli_fetch_assoc($qjamrtp);
                                                                    echo $fjamrtp['jam_rtp']. " - " . $fjamrtp['jam_rtp_2'];
                                                                    echo '<p class="fw-bold">WIB</p>';
                                                                  }
                                                                

                                                            echo' 

                                                                </td>
                                                              </tr>


                                                            <tr>
                                                                <td>Pola Slots: </td>
                                                                <td style="whitespace: pre;" class="text-center">';

                                                                $pola = ['<i class="fas fa-check text-light"></i>', '<i class="fas fa-times text-light"></i>' ];
                                                                $dcbet = ['1000', '500', '100', '70', '50', '30', '20', '10'];
                                                                $moneybet1 = [ '270', '200', '1000', '250', '500', '264' ];
                                                                $moneybet2 = ['1380', '6000', '2000', '4833', '5980', '4488', '4140', '1800'];

                                                                  echo '<div class="row text-center">';
                                                                  $mo1 = rand(0, 5);
                                                                  $mo2 = rand(0, 7);

                                                                    for($x = 0; $x <= 2; $x++) {
                                                                      $po1 = rand(0, 1);
                                                                      $po2 = rand(0, 1);
                                                                      $po3 = rand(0, 1);

                                                                      $dc1 = rand(0, 7);
                                                                  

                                                                      echo '<div class="col-2">
                                                                      </div>
                                                                      <div class="col-2 align-self-center border ';
                                                                          if($po1 == 0 && $po2 != 0) {
                                                                            echo 'bg-success';
                                                                          } else {
                                                                            echo 'bg-danger';
                                                                          }
                                                                      echo '">
                                                                      <div class="py-2">';
                                                                      if($po1 == 0 && $po2 != 0) {
                                                                        echo $pola['0'];
                                                                      } else {
                                                                        echo $pola['1'];
                                                                      }
                                                                      echo '</div>
                                                                    </div>
                                                                    

                                                                    <div class="col-2 align-self-center border ';
                                                                    if($po2 == 0 && $po1 != 0 && $po3 == 1) {
                                                                      echo 'bg-success';
                                                                    } else {
                                                                      echo 'bg-danger';
                                                                    }
                                                                echo '">
                                                                      <div class="py-2">';
                                                                      if($po2 == 0 && $po1 != 0 && $po3 == 1) {
                                                                        echo $pola['0'];
                                                                      } else {
                                                                        echo $pola['1'];
                                                                      }

                                                                      echo '</div>
                                                                  </div>

                                                                    <div class="col-2 align-self-center border ';
                                                                    if($po3 == 0) {
                                                                      echo 'bg-success';
                                                                    } else {
                                                                      echo 'bg-danger';
                                                                    }
                                                                echo '">
                                                                    <div class="py-2">
                                                                    '.$pola[$po3].'
                                                                    </div>
                                                                  </div>

                                                                    <div class="col-4 align-self-center">
                                                                      <h6 class="dc-f">- '.$dcbet[$dc1].'</h6>
                                                                    </div> ';

                                                                   }
                                                                    
                                                                    echo '<div class="col-3">
                                                                    </div>
                                                                    <div class="col-6 text-center">
                                                                      <h6 class="dc-f">* BET : '.$moneybet1[$mo1].' - '.$moneybet2[$mo2].'</h6>
                                                                    </div>
                                                                    <div class="col-3">
                                                                    </div>';
                                                                    

                                                                   
                                                                   echo' </div>';


                                                               echo '</td>
                                                            </tr>
                                                            <tr>
                                                                <td>RTP: </td>
                                                                <td class="text-center" colspan="2"><h6 class="dc-f" id="rtptxt-'.$counter5++.'"></h6></td>
                                                            </tr>
                                                        </tbody>
                                                      </table>
                                                </div>

                                          </div>

                                          <button type="button" data-bs-dismiss="modal" class="btn btn-danger float-end"><i class="fas fa-times-circle"></i> Tutup</button>
                                  </div>
                              </div>

                    
                  </div>

                </div>
              </div>
            </div>



          ';
         }

  }

  echo '<div class="col-lg-12">
  <button type="button" class="btn d-block mx-auto fw-bold my-2 btn-sm btn-warning" id="loadmore"><i class="fas fa-eye"></i> TAMPIL BANYAK</button>
  <button onclick="rtpGames( \''.$gamename.'\')" class="btn mx-auto d-block btn-sm btn-secondary"><i class="fas fa-image"></i> Gambar tidak muncul? klik disini</button>
  </div>
  
  </div>';

?>

<script >
    $(document).ready(function() {
        $(".showgames").slice(0, 12).show();
        if ($(".showgames:hidden").length != 0) {
            $("#loadmore").show();
        }
        $("#loadmore").on("click", function(e) {
            e.preventDefault();
            $(".showgames:hidden").slice(0, 24).slideDown();
            if ($(".showgames:hidden").length == 0) {
                $("#loadmore").text("No More to view").fadOut("slow");
            }
        });
    }) 
</script>