SHARE
TWEET

page_leaderboard.php

a guest Sep 21st, 2019 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. global $theme;
  3. if (!defined("IN_SB")) {
  4.     echo "You should not be here. Only follow links!";
  5.     die();
  6. }
  7. if ($GLOBALS['config']['config.enablecomms'] != "1") {
  8.     CreateRedBox("Error", "This page is disabled. You should not be here.");
  9.     PageDie();
  10. }
  11. ?>
  12.   <table class="table table-hover table-bordered results">
  13.     <thead>
  14.       <tr>
  15.         <th class="col-md-3 col-xs-3">Name</th>
  16.         <th>score</th>
  17.         <th>kills</th>
  18.         <th>deaths</th>
  19.         <th>assist</th>
  20.       </tr>
  21.       <tr class="warning no-result">
  22.         <td colspan="4"><i class="fa fa-warning"></i> No result</td>
  23.       </tr>
  24.     </thead>
  25.     <tbody>
  26. <?php
  27. $con=mysqli_connect("BLABLA","BLABLA","BLABLA","BLABLA");
  28. // Check connection
  29. if (mysqli_connect_errno())
  30. {
  31. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  32. }
  33.  
  34. $result = mysqli_query($con,"SELECT * FROM `rankme` ORDER BY score DESC");
  35. while($row = mysqli_fetch_array($result))
  36. {
  37. echo "<tr>";
  38. echo "<td>" . $row['name'] . "</td>";
  39. echo "<td>" . $row['score'] . "</td>";
  40. echo "<td>" . $row['kills'] . "</td>";
  41. echo "<td>" . $row['deaths'] . "</td>";
  42. echo "<td>" . $row['assist'] . "</td>";
  43. echo "</tr>";
  44. }
  45. echo "</table>";
  46.  
  47. mysqli_close($con);
  48. ?>
  49.     </tbody>
  50.   </table>
  51. //----------------------------------------
  52. <?php
  53. unset($_SESSION['CountryFetchHndl']);
  54.  
  55. $theme->assign('searchlink', $searchlink);
  56. $theme->assign('hidetext', $hidetext);
  57. $theme->assign('total_bans', $BanCount);
  58. $theme->assign('active_bans', $BanCount);
  59.  
  60. $theme->assign('ban_nav', $ban_nav);
  61. $theme->assign('ban_list', $bans);
  62. $theme->assign('admin_nick', $userbank->GetProperty("user"));
  63.  
  64. $theme->assign('admin_postkey', $_SESSION['banlist_postkey']);
  65. $theme->assign('hideadminname', (isset($GLOBALS['config']['banlist.hideadminname']) && $GLOBALS['config']['banlist.hideadminname'] == "1" && !$userbank->is_admin()));
  66. $theme->assign('general_unban', $userbank->HasAccess(ADMIN_OWNER | ADMIN_UNBAN | ADMIN_UNBAN_OWN_BANS | ADMIN_UNBAN_GROUP_BANS));
  67. $theme->assign('can_delete', $userbank->HasAccess(ADMIN_DELETE_BAN));
  68. $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)));
  69. $theme->display('page_leaderboard.tpl');
  70. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top