コード例 #1
0
            <div class="row">
                <div class="col-lg-2 bor-right text-center">
                <h2>Rank</h2>
              </div>
                <div class="col-lg-6 bor-right">
                <h2>Player</h2>
              </div>
                <div class="col-lg-4 text-center">
                <h2>Score</h2>
              </div>
              </div>
          </div>
    <?php 
$i = 0;
$game_id = 1;
$sore_games = getGameScoreByScoreId($game_id);
if ($sore_games > 0) {
    while ($score_game = mysql_fetch_array($sore_games)) {
        $i++;
        $games_scores_user = getUserById($score_game['user_id']);
        $game_score_user = mysql_fetch_array($games_scores_user);
        ?>
    <div class="score-row">
    <div class="row">
    <div class="col-lg-2 bor-right-red text-center">
    <h2>
    <?php 
        echo $i;
        ?>
</h2>
    </div>
コード例 #2
0
        </div>
        </div>
         <div id="game_leader_board">
         <table class="highscore_table table-nonfluid table table-striped">
         <thead>
         <tr>
         <th>Rank</th>
         <th>Player</th>
         <th>Score</th>
         </tr>
         </thead>
         <tbody>             
    <?php 
$i = 0;
$active = "";
$sore_games = getGameScoreByScoreId($game_detail['game_id']);
if ($sore_games > 0) {
    while ($score_game = mysql_fetch_array($sore_games)) {
        $i++;
        $games_scores_user = getUserById($score_game['user_id']);
        $game_score_user = mysql_fetch_array($games_scores_user);
        ?>
             <?php 
        if (isset($_SESSION['user_loged_id'])) {
            $user_id = $_SESSION['user_loged_id'];
            if ($score_game['user_id'] == $user_id) {
                $active = "activeplayer";
            } else {
                $active = "";
            }
        }