Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Untitled Document</title>
- <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Montserrat">
- </head>
- <body>
- <table>
- <tr style="background:#53C3E2;">
- <td>#</td>
- <td>Name</td>
- <td>Deaths</td>
- <td>Kills</td>
- <td>Wins</td>
- <td>Played</td>
- </tr>
- <style>
- table{
- width: 60%;
- margin-left:auto;
- margin-right:auto;
- font-family: 'Montserrat', serif;
- }
- td {
- padding:10px;
- }
- table tr:nth-child(2n+0) {
- background: #FCFCFB;
- }
- table tr:nth-child(2n+1) {
- background:#FAF9F8;
- }
- table tr:last-child td:first-child {
- -moz-border-radius-bottomleft:10px;
- -webkit-border-bottom-left-radius:10px;
- border-bottom-left-radius:10px
- }
- table tr:last-child td:last-child {
- -moz-border-radius-bottomright:10px;
- -webkit-border-bottom-right-radius:10px;
- border-bottom-right-radius:10px
- }
- </style>
- </body>
- </html>
- <?php
- mysql_connect("localhost","root","");
- mysql_select_db("coding");
- $sql = "SELECT * FROM kyuzi ORDER BY wins DESC LIMIT 100 ";
- $run = mysql_query($sql);
- $rank = 0;
- $rows = 0;
- while ($row = mysql_fetch_assoc($run)){
- $rows++;
- $rank = $rows;
- $uuid = $row['uuid'];
- $death = $row['death'];
- $kills = $row['kills'];
- $wins = $row['wins'];
- $played = $row['played'];
- $content = file_get_contents('http://api.mcplayerindex.com/name/'.$uuid);
- $json = json_decode($content);
- $name = $json->name;
- $number = mysql_num_rows($run);
- echo '
- <tr>
- <td>'.$rank.'</td>
- <td>'.$name.'</td>
- <td>'.$death.'</td>
- <td>'.$kills.'</td>
- <td>'.$wins.'</td>
- <td>'.$played.'</td>
- </tr>
- ';
- }
- ?>
- <?php
- $num = 1;
- $num++
- ?>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement