Advertisement
Guest User

Untitled

a guest
May 4th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1.  
  2.  
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <title>KG Serverlist</title>
  8.  
  9. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  10. <style type="text/css">
  11. .jumbotron {
  12. margin-top: 30px;
  13. border-radius: 0;
  14. }
  15.  
  16. .table thead th {
  17. background-color: #428BCA;
  18. border-color: #428BCA !important;
  19. color: #FFF;
  20. }
  21. </style>
  22. </head>
  23.  
  24. <body>
  25. <div class="container">
  26. <div class="jumbotron">
  27. <h1>KG Serverlist</h1>
  28. </div>
  29. <div class="row">
  30. <div class="col-sm-6">
  31. <table class="table table-bordered table-striped">
  32. <thead>
  33. <tr>
  34. <th colspan="2">Server Info </th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38.  
  39.  
  40. <?php
  41. require __DIR__ . '/SourceQuery/SourceQuery.class.php';
  42.  
  43. include 'config/config.php';
  44. $query = mysqli_query($con, 'SELECT * FROM sb_servers');
  45. $num_results = mysqli_num_rows($query);
  46.  
  47. for ($i = 0; $i < $num_results; $i++) {
  48. $fetch = mysqli_fetch_assoc($query);
  49.  
  50. define( 'SQ_SERVER_ADDR', $fetch['ip'] );
  51. define( 'SQ_SERVER_PORT', $fetch['port'] );
  52. define( 'SQ_TIMEOUT', 3 );
  53. define( 'SQ_ENGINE', SourceQuery :: SOURCE );
  54.  
  55. $Query = new SourceQuery( );
  56.  
  57. $Info = Array( );
  58. $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE );
  59. $Info = $Query->GetInfo( );
  60. $Query->Disconnect( );
  61.  
  62.  
  63. foreach( $Info as $InfoKey => $InfoValue ) {
  64. echo "<tr><td>"; echo htmlspecialchars( $InfoValue );echo"</td></tr>";
  65. }
  66. }
  67. echo "</tbody></table></div></body></html>";
  68.  
  69. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement