<?php
$Game_File_Path = "assets/games/$PageFileName/";
$CountGame = count(glob($Game_File_Path . "*"));

for ($i=0; $i < $CountGame; $i++) { 
    include "template/systems/games/$PageFileName.php";
    echo '<div class="games-box">
    <div class="games-box-content">
        <div class="games-header">
            <img src="assets/games/'. $PageFileName .'/'. $GamesList[$i][1] .'?ver='. $Version .'" alt="'. $GamesList[$i][0] .'" title="'. $GamesList[$i][0] .'">
            <div class="percent">
                <div class="percent-container">
                    <div id="percent-bar" class="percent-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="" style="width: 0;"></div>
                </div>
                <p class="percent-txt"></p>
            </div>
        </div>
        <div class="games-footer">
            <button class="pattern-btn">INFO POLA</button>
        </div>
    </div>
    <div class="modal">
        <div class="modal-content"><span class="btn-close">×</span>
           <h3>Jam & Pola '. $GamesList[$i][0] .'</h3>
           <div class="wrap-modal">
              <div class="left">
                    <img src="assets/games/'. $PageFileName .'/'. $GamesList[$i][1] .'?ver='. $Version .'">
              </div>
              <div class="right">
                    <div class="pattern-container">
                        <div class="jackpot-time">
                            <p class="title-jackpot">JAM GACOR</p>
                            <p class="jamgacorRange">XX - XX</p>
                        </div>
                        <div class="table-pattern">
                            <div class="pattern-title">
                                <p>POLA GACOR</p>
                            </div>
                            <div class="pattern">
                                <p class="pola1">xx</p>
                                <p class="pola2">xx</p>
                                <p class="pola3">xx</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-button">
                <a href="'. $Linklogin.'" title="Masuk" target="_blank">Masuk</a>
                <a href="'. $LinkRegister.'" title="Daftar" target="_blank">Daftar</a>
            </div>
        </div>
    </div>
    </div>';
};