Advertisement
xImPrincee

Untitled

Jan 15th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. <?php
  2. ini_set('display_errors', 1);
  3.  
  4. // PHP file written by Wruczek for MoneySQL plugin (http://dev.bukkit.org/bukkit-plugins/moneysql/).
  5. // Image how this looks: http://dev.bukkit.org/media/images/76/90/site.png
  6. // Top ten richest players are just example. Taken from http://minecraft.aggenkeech.com/.
  7.  
  8. /*
  9. License:
  10. 1. Do not remove or edit license and informations about author.
  11. 2. Do not sell this file or part of this.
  12. 3. You cant distribute this. If you want to give it to another person - give link to offlcial file.
  13. 4. Do not remove footer.
  14. */
  15.  
  16. // CONFIGURATION - EDIT THIS
  17. $database_adress = "localhost";
  18. $database_user = "Feeling";
  19. $database_password = "rqhMUbVEmVz6M7uW";
  20. $database_name = "FeelingSystem";
  21.  
  22. // Optional - you dont need to edit this.
  23. $how_many = 1000;
  24. $title = "Clan Ranking";
  25. $page_title = "Clan Ranking";
  26. $page_width = "64%";
  27. // {balance} will be replaced with player balance.
  28.  
  29. $clanname_format = "{ClanName}";
  30. $clantag_format = "{ClanTag}";
  31. $clankills_format = "{Kills}";
  32. $clantode_format = "{Tode}";
  33. $clanowner_format = "{Owner}";
  34.  
  35.  
  36. // END OF CONFIGURATION
  37.  
  38. $con=mysqli_connect($database_adress,$database_user,$database_password,$database_name);
  39.  
  40. if (mysqli_connect_errno()) {
  41. echo "<center><h3>Verbindung zum Datenbankserver fehlgeschlagen.</h3></center>";
  42. die();
  43. }
  44. ?>
  45.  
  46. <html>
  47. <head>
  48. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  49. <link href="/clans/css/bootstrap.min.css" rel="stylesheet">
  50. <meta content="ItzSinix" name="author">
  51. </head>
  52. <body>
  53. <div style="width: <?php echo $page_width; ?>;margin: 0 auto;">
  54. <table class="table table-striped">
  55.  
  56. </br></br></br>
  57. <Center>
  58. <img src="/clans/images/ranking.png">
  59. </Center>
  60. </br>
  61.  
  62. <thead>
  63. <tr>
  64. <th>#</th>
  65. <th>ClanTag</th>
  66. <th>ClanName</th>
  67. <th>Clan-Owner</th>
  68. <th>Clan-Kills</th>
  69. <th>Clan-Tode</th>
  70. </tr>
  71. </thead>
  72. <tbody>
  73. <?php
  74. $num = 0;
  75.  
  76. $result = mysqli_query($con,"SELECT * FROM `FeelingClans` ORDER BY `Kills` DESC LIMIT $how_many");
  77.  
  78. if (!$result) {
  79. die("ERROR: Server not returned any data. " . mysql_error());
  80. }
  81.  
  82. while($row = mysqli_fetch_array($result)) {
  83. $num++;
  84.  
  85. $clanTag = $row['ClanTag'];
  86. $clanName = $row['ClanName'];
  87. $clanOwner = $row['Owner'];
  88. $clanKills = $row['Kills'];
  89. $clanTode = $row['Tode'];
  90.  
  91. echo "<tr><td>$num</td>";
  92. echo "<td>" . str_replace("{ClanTag}", $clanTag, $clantag_format) . "</td>";
  93. echo "<td>" . str_replace("{ClanName}", $clanName, $clanname_format) . "</td>";
  94. echo "<td>" . str_replace("{Owner}", $clanOwner, $clanowner_format) . "</td>";
  95. echo "<td>" . str_replace("{Kills}", $clanKills, $clankills_format) . "</td>";
  96. echo "<td>" . str_replace("{Tode}", $clanTode, $clantode_format) . "</td></tr>";
  97.  
  98.  
  99.  
  100. if($num == $how_many)
  101. break;
  102. }
  103.  
  104. mysqli_close($con);
  105. ?>
  106. </tbody>
  107. </table>
  108. &copy; Website by ItzSinix
  109. </div>
  110. </body>
  111. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement