Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = 'xxxxxxxxxxxxxxx' ;
- $user = 'xxxxxxxxxxxxxxxxx' ;
- $password = 'xxxxxxxxxxxxxxxxxx' ;
- $database = 'xxxxxxxxxxxxxxxxxx' ;
- $entry_count = 25;
- ?>
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Reichste Spieler</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
- <style>
- body {
- }
- .page-width {
- width: 60%;
- margin: auto;
- margin-top: 10px;
- }
- </style>
- </head>
- <body>
- <div class="panel panel-default page-width">
- <div class="panel-body">
- <table class="table">
- <thead>
- <tr>
- <th>#</th>
- <th></th>
- <th>Spieler</th>
- <th>Vermögen</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $connection = new mysqli($host, $user, $password, $database);
- if ($connection->connect_error) {
- die("Connection failed: " . $connection->connect_error);
- }
- $sql = "SELECT * FROM `iConomy` ORDER BY `balance` DESC LIMIT ".$entry_count;
- $result = $connection->query($sql);
- $i = 1;
- while($row = mysqli_fetch_assoc($result)){
- $mc_name = ucfirst(strtolower($row['username']));
- $mc_money = $row['balance'];
- echo "
- <tr>
- <td> $i</td>
- <td><img src=\"https://crafatar.com/avatars/$mc_name/?size=22\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"$mc_name\" /></td>
- <td>$mc_name</td>
- <td>$ $mc_money</td>
- </tr>
- ";
- $i++;
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
- <script>
- $(document).ready(function(){
- $('[data-toggle="tooltip"]').tooltip();
- });
- </script>
- </body>
- <!-- Author: https://www.spigotmc.org/members/krustylv.30905/ -->
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement