Advertisement
Guest User

Untitled

a guest
Jan 30th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. <?php
  2.  
  3. $host = 'xxxxxxxxxxxxxxx' ;
  4. $user = 'xxxxxxxxxxxxxxxxx' ;
  5. $password = 'xxxxxxxxxxxxxxxxxx' ;
  6. $database = 'xxxxxxxxxxxxxxxxxx' ;
  7. $entry_count = 25;
  8. ?>
  9. <!DOCTYPE HTML>
  10. <html>
  11. <head>
  12. <meta charset="UTF-8">
  13. <title>Reichste Spieler</title>
  14. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  15. <style>
  16. body {
  17.  
  18. }
  19. .page-width {
  20. width: 60%;
  21. margin: auto;
  22. margin-top: 10px;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <div class="panel panel-default page-width">
  28. <div class="panel-body">
  29. <table class="table">
  30. <thead>
  31. <tr>
  32. <th>#</th>
  33. <th></th>
  34. <th>Spieler</th>
  35. <th>Vermögen</th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <?php
  40. $connection = new mysqli($host, $user, $password, $database);
  41. if ($connection->connect_error) {
  42. die("Connection failed: " . $connection->connect_error);
  43. }
  44. $sql = "SELECT * FROM `iConomy` ORDER BY `balance` DESC LIMIT ".$entry_count;
  45. $result = $connection->query($sql);
  46. $i = 1;
  47. while($row = mysqli_fetch_assoc($result)){
  48. $mc_name = ucfirst(strtolower($row['username']));
  49. $mc_money = $row['balance'];
  50. echo "
  51. <tr>
  52. <td> $i</td>
  53. <td><img src=\"https://crafatar.com/avatars/$mc_name/?size=22\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"$mc_name\" /></td>
  54. <td>$mc_name</td>
  55. <td>$ $mc_money</td>
  56. </tr>
  57. ";
  58. $i++;
  59. }
  60. ?>
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
  66. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
  67. <script>
  68. $(document).ready(function(){
  69. $('[data-toggle="tooltip"]').tooltip();
  70. });
  71. </script>
  72. </body>
  73. <!-- Author: https://www.spigotmc.org/members/krustylv.30905/ -->
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement