Advertisement
Guest User

Untitled

a guest
Jul 12th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. <?PHP
  2.  
  3. /* SETTINGS */
  4. /*________________________________________________________________________________________________________________*/
  5.  
  6. $_db_host = ""; /* MYSQL host */
  7. $_db_username = "root"; /* MYSQL username */
  8. $_db_password = ""; /* MYSQL password */
  9. $_db_database = "swr"; /* Mysql database */
  10. $_db_table = "swreloaded_player"; /* Database table */
  11.  
  12. $sort = "playername"; /* Default sort (wins, games, kills, deaths, beds) */
  13.  
  14. /*________________________________________________________________________________________________________________*/
  15.  
  16. /* DO NOT EDIT */
  17. if(@$_GET['order']){
  18. $order = @$_GET['order'];
  19. }else{
  20. $order = @$_GET['order'] = $sort;
  21. }
  22. $_link = mysql_connect($_db_host, $_db_username, $_db_password);
  23. mysql_select_db($_db_database, $_link);
  24. $_sql = "SELECT * FROM `$_db_table` ORDER BY `$order` DESC";
  25. $_resultat = mysql_query($_sql, $_link);
  26.  
  27. ?>
  28. <html>
  29. <head>
  30. <link rel="stylesheet" href="https://bootswatch.com/readable/bootstrap.css" media="screen">
  31. <link rel="stylesheet" href="https://bootswatch.com/assets/css/bootswatch.min.css">
  32. <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
  33. </head>
  34. <body>
  35. <div class="container" style="background-color: white;-20pxmargin-top: -20px;margin-bottom: -20px;border-left: 4px solid #e74c3c;border-right: 4px solid #e74c3c;">
  36. <table class="table table-striped">
  37. <thead>
  38. <tr>
  39. <th><a href="?order=playername">Jugador <?PHP if(@$_GET['order'] == 'playername'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></th>
  40. <th><a href="?order=games_won">Ganadas <?PHP if(@$_GET['order'] == 'games_won'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></a></th>
  41. <th><a href="?order=games_played">P.Jugadas <?PHP if(@$_GET['order'] == 'games_played'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></a></th>
  42. <th><a href="?order=kills">Asesinatos <?PHP if(@$_GET['order'] == 'kills'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></a></th>
  43. <th><a href="?order=deaths">Muertes <?PHP if(@$_GET['order'] == 'deaths'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></a></th>
  44. <th><a href="?order=killdeath">K/D <?PHP if(@$_GET['order'] == 'killdeath'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></th>
  45. <th><a href="?order=score">Puntuación <?PHP if(@$_GET['order'] == 'score'){ echo "<i class=\"fa fa-arrow-up\"></i>"; }?></a></th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <?PHP while ($row = @mysql_fetch_array( $_resultat, MYSQL_ASSOC)) {?>
  50. <tr>
  51. <td><img src="http://cravatar.eu/helmhead/<?php echo $row['playername']; ?>/35.png"> <?php echo $row['playername']; ?></td>
  52. <td><?php echo $row['games_won']; ?></td>
  53. <td><?php echo $row['games_played']; ?></td>
  54. <td><?php echo $row['kills']; ?></td>
  55. <td><?php echo $row['deaths']; ?></td>
  56. <td><?php echo $row['killdeath']; ?></td>
  57. <td><?php echo $row['score']; ?></td>
  58. </tr>
  59. <?PHP } ?>
  60. </tbody>
  61. </table>
  62. <p><a class="btn btn-default" href="http://176.12.49.94" role="button">Volver</a></p>
  63. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement