Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>KG Serverlist</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
- <style type="text/css">
- .jumbotron {
- margin-top: 30px;
- border-radius: 0;
- }
- .table thead th {
- background-color: #428BCA;
- border-color: #428BCA !important;
- color: #FFF;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="jumbotron">
- <h1>KG Serverlist</h1>
- </div>
- <div class="row">
- <div class="col-sm-6">
- <table class="table table-bordered table-striped">
- <thead>
- <tr>
- <th colspan="2">Server Info </th>
- </tr>
- </thead>
- <tbody>
- <?php
- require __DIR__ . '/SourceQuery/SourceQuery.class.php';
- include 'config/config.php';
- $query = mysqli_query($con, 'SELECT * FROM sb_servers');
- $num_results = mysqli_num_rows($query);
- for ($i = 0; $i < $num_results; $i++) {
- $fetch = mysqli_fetch_assoc($query);
- define( 'SQ_SERVER_ADDR', $fetch['ip'] );
- define( 'SQ_SERVER_PORT', $fetch['port'] );
- define( 'SQ_TIMEOUT', 3 );
- define( 'SQ_ENGINE', SourceQuery :: SOURCE );
- $Query = new SourceQuery( );
- $Info = Array( );
- $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE );
- $Info = $Query->GetInfo( );
- $Query->Disconnect( );
- foreach( $Info as $InfoKey => $InfoValue ) {
- echo "<tr><td>"; echo htmlspecialchars( $InfoValue );echo"</td></tr>";
- }
- }
- echo "</tbody></table></div></body></html>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement