nightpatrol

Banlist Code

Dec 24th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
  2. <script src="sorttable.js"></script>
  3. <style>
  4. body {
  5. background-color: #FFFFFF;
  6. }
  7. </style>
  8. <?php
  9.  
  10. $con=mysqli_connect("ip","username","password","databaseName");
  11. // Check connection
  12. if (mysqli_connect_errno())
  13. {
  14. echo "<h1><b>Sorry, our databases are currently offline.</b></h1>" . mysqli_connect_error();
  15. goto a;
  16. }
  17. $result = mysqli_query($con,"SELECT * FROM globalban");
  18. echo "
  19. <center>
  20. <table class='sortable pure-table'>
  21. <tr>
  22. <th>Ban #</th>
  23. <th>SteamID</th>
  24. <th>Sdmin</th>
  25. <th>Ban Message</th>
  26. <th>UnturnedName</th>
  27. <th>Duration</th>
  28. <th>Last Update</th>
  29. </tr>
  30. </center>
  31. ";
  32. while($row = mysqli_fetch_array($result))
  33. {
  34. echo "<tr>";
  35. echo "<td>" . $row['id'] . "</td>";
  36. echo "<td>" . $row['steamId'] . "</td>";
  37. echo "<td>" . $row['admin'] . "</td>";
  38. echo "<td>" . $row['banMessage'] . "</td>";
  39. echo "<td>" . $row['charactername'] . "</td>";
  40. echo "<td>" . $row['banDuration'] . "</td>";
  41. echo "<td>" . $row['banTime'] . "</td>";
  42. echo "</tr>";
  43. }
  44. mysqli_close($con);
  45. a:
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment