<div class="side-panel mt-5">
	<div class="panel-bg">
		<div class="panel-title">
			<span><?php print $lang['players']; ?></span>
		</div>
		<p class="panel-subtitle">Player Ranking of <span class="highlight">Metin2Top</span></p>
		<table class="table top10-table table-sm table-hover">
			<tbody>
			<?php
			if (!$offline) {
				$top = array();
				$top = top10players();

				$i = 1;

				foreach ($top as $player) {
					if($i == 1){ $i++;?>
						<div class="first-player mb-3">
							<div class="row px-2">
								<div class="col-3">
									<div class="player-icon">
										<img src="<?php print $site_url; ?>images/pos.png" alt="Player Icon">
									</div>
								</div>
								<div class="col-8 player-stats">
									<div class="stats">
										<p class="mb-0"><?php print $player['name']; ?> <span class="empire-<?php print $empire = get_player_empire($player['account_id']); ?>">[<?php print emire_name($empire); ?>]</span></p>
									</div>
								</div>
							</div>
						</div>
					<?php } else { ?>
					<tr>
						<td></td>
						<th scope="row"><?php print $i++; ?></th>
						<td><?php print $player['name']; ?></td>
						<td>
							<span class="empire-<?php print $empire = get_player_empire($player['account_id']); ?>"><?php print emire_name($empire); ?></span>
						</td>
						<td><span class="empire-">Lvl.</span><?php print $player['level']; ?></td>
					</tr>
				<?php }
				}
			} else print $offline_players;
			?>
			</tbody>
		</table>

		<center>
			<?php if (!$offline) { ?>
				<a href="<?php print $site_url; ?>ranking/players" class="btn-image" >Top 100 &raquo;</a>
			<?php } else print '<span class="tag tag-danger">' . $lang['server-offline'] . '</span></br><span class="tag tag-danger">' . $lang['last-update'] . ': ' . $offline_date . '</span>'; ?>
		</center>
		</br>
	</div>
</div>
