Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>Untitled Document</title>
  6. <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Montserrat">
  7. </head>
  8.  
  9. <body>
  10.  
  11. <table>
  12.  
  13.  
  14.  
  15. <tr style="background:#53C3E2;">
  16. <td>#</td>
  17. <td>Name</td>
  18. <td>Deaths</td>
  19. <td>Kills</td>
  20. <td>Wins</td>
  21. <td>Played</td>
  22.  
  23. </tr>
  24.  
  25.  
  26.  
  27.  
  28.  
  29. <style>
  30.  
  31. table{
  32.  
  33. width: 60%;
  34. margin-left:auto;
  35. margin-right:auto;
  36. font-family: 'Montserrat', serif;
  37.  
  38.  
  39. }
  40. td {
  41.  
  42. padding:10px;
  43. }
  44.  
  45.  
  46. table tr:nth-child(2n+0) {
  47. background: #FCFCFB;
  48. }
  49. table tr:nth-child(2n+1) {
  50. background:#FAF9F8;
  51. }
  52.  
  53. table tr:last-child td:first-child {
  54. -moz-border-radius-bottomleft:10px;
  55. -webkit-border-bottom-left-radius:10px;
  56. border-bottom-left-radius:10px
  57. }
  58.  
  59. table tr:last-child td:last-child {
  60. -moz-border-radius-bottomright:10px;
  61. -webkit-border-bottom-right-radius:10px;
  62. border-bottom-right-radius:10px
  63. }
  64.  
  65. </style>
  66.  
  67. </body>
  68. </html>
  69.  
  70.  
  71.  
  72. <?php
  73.  
  74. mysql_connect("localhost","root","");
  75. mysql_select_db("coding");
  76.  
  77. $sql = "SELECT * FROM kyuzi ORDER BY wins DESC LIMIT 100 ";
  78. $run = mysql_query($sql);
  79.  
  80. $rank = 0;
  81. $rows = 0;
  82.  
  83.  
  84. while ($row = mysql_fetch_assoc($run)){
  85. $rows++;
  86. $rank = $rows;
  87. $uuid = $row['uuid'];
  88. $death = $row['death'];
  89. $kills = $row['kills'];
  90. $wins = $row['wins'];
  91. $played = $row['played'];
  92.  
  93. $content = file_get_contents('http://api.mcplayerindex.com/name/'.$uuid);
  94. $json = json_decode($content);
  95.  
  96. $name = $json->name;
  97.  
  98.  
  99.  
  100.  
  101.  
  102. $number = mysql_num_rows($run);
  103.  
  104.  
  105.  
  106. echo '
  107.  
  108. <tr>
  109. <td>'.$rank.'</td>
  110. <td>'.$name.'</td>
  111. <td>'.$death.'</td>
  112. <td>'.$kills.'</td>
  113. <td>'.$wins.'</td>
  114. <td>'.$played.'</td>
  115. </tr>
  116.  
  117. ';
  118.  
  119.  
  120.  
  121. }
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. ?>
  134.  
  135.  
  136.  
  137. <?php
  138.  
  139.  
  140.  
  141. $num = 1;
  142. $num++
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. ?>
  150.  
  151. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement