Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $theme;
- if (!defined("IN_SB")) {
- echo "You should not be here. Only follow links!";
- die();
- }
- if ($GLOBALS['config']['config.enablecomms'] != "1") {
- CreateRedBox("Error", "This page is disabled. You should not be here.");
- PageDie();
- }
- ?>
- <table class="table table-hover table-bordered results">
- <thead>
- <tr>
- <th class="col-md-3 col-xs-3">Name</th>
- <th>score</th>
- <th>kills</th>
- <th>deaths</th>
- <th>assist</th>
- </tr>
- <tr class="warning no-result">
- <td colspan="4"><i class="fa fa-warning"></i> No result</td>
- </tr>
- </thead>
- <tbody>
- <?php
- $con=mysqli_connect("BLABLA","BLABLA","BLABLA","BLABLA");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $result = mysqli_query($con,"SELECT * FROM `rankme` ORDER BY score DESC");
- while($row = mysqli_fetch_array($result))
- {
- echo "<tr>";
- echo "<td>" . $row['name'] . "</td>";
- echo "<td>" . $row['score'] . "</td>";
- echo "<td>" . $row['kills'] . "</td>";
- echo "<td>" . $row['deaths'] . "</td>";
- echo "<td>" . $row['assist'] . "</td>";
- echo "</tr>";
- }
- echo "</table>";
- mysqli_close($con);
- ?>
- </tbody>
- </table>
- //----------------------------------------
- <?php
- unset($_SESSION['CountryFetchHndl']);
- $theme->assign('searchlink', $searchlink);
- $theme->assign('hidetext', $hidetext);
- $theme->assign('total_bans', $BanCount);
- $theme->assign('active_bans', $BanCount);
- $theme->assign('ban_nav', $ban_nav);
- $theme->assign('ban_list', $bans);
- $theme->assign('admin_nick', $userbank->GetProperty("user"));
- $theme->assign('admin_postkey', $_SESSION['banlist_postkey']);
- $theme->assign('hideadminname', (isset($GLOBALS['config']['banlist.hideadminname']) && $GLOBALS['config']['banlist.hideadminname'] == "1" && !$userbank->is_admin()));
- $theme->assign('general_unban', $userbank->HasAccess(ADMIN_OWNER | ADMIN_UNBAN | ADMIN_UNBAN_OWN_BANS | ADMIN_UNBAN_GROUP_BANS));
- $theme->assign('can_delete', $userbank->HasAccess(ADMIN_DELETE_BAN));
- $theme->assign('view_bans', ($userbank->HasAccess(ADMIN_OWNER | ADMIN_EDIT_ALL_BANS | ADMIN_EDIT_OWN_BANS | ADMIN_EDIT_GROUP_BANS | ADMIN_UNBAN | ADMIN_UNBAN_OWN_BANS | ADMIN_UNBAN_GROUP_BANS | ADMIN_DELETE_BAN)));
- $theme->display('page_leaderboard.tpl');
- ?>
RAW Paste Data