Advertisement
jxsl13

Untitled

Apr 6th, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.17 KB | None | 0 0
  1. <div class="wrapper">
  2.  
  3. <?php
  4. require_once("./stats.php");
  5.  
  6.  
  7. $request = new TwRequest;
  8.  
  9.  
  10. $request->addServers(array(
  11. array("5.196.202.121", 8300),
  12. array("5.196.202.121", 8301),
  13. array("5.196.202.121", 8302),
  14.  array("5.196.202.120", 8300),
  15.  array("5.196.202.120", 8301),
  16.  array("5.196.202.120", 8302),
  17.  array("5.196.202.120", 8303),
  18.  array("5.196.202.120", 8304),
  19.  array("5.196.202.120", 8305),
  20.  array("5.196.202.120", 8306),
  21.  array("5.196.202.120", 8307),
  22.  array("5.196.202.120", 8308),
  23.  array("5.196.202.120", 8309),
  24. ));
  25.  
  26.  
  27. $request->loadServerInfo();
  28.  
  29.  
  30. foreach ($request->getServers() as $server) {
  31.  if (isset($server['version'])) {
  32.  
  33.  ?>
  34. <p class="navbar">
  35. <div class="span3">
  36. <div style="width: 83%" class="well">
  37. <h3 class="text-info"><?php echo $server['name']; ?></h3>
  38.  <p><span class="label label-success">ONLINE</span></p>
  39. <ul style="list-style-type: none">
  40. <li style="margin-top: 10px"><span class="label label-default">Gametype</span> <span class="label label-info"><?php echo $server['gametype']; ?></span></li>
  41. <li style="margin-top: 10px"><span class="label label-default">Map</span> <span class="label label-info"><?php echo $server['map']; ?></span></li>
  42. <li style="margin-top: 10px"><span class="label label-default">Players</span> <span class="label label-info"><?php echo $server['num_players']." / ".$server['max_players']; ?></span></li>
  43. </ul>
  44. <hr />
  45. <h4><?php echo $server[0].":".$server[1]; ?></h4>
  46. </div>
  47. </div>
  48.  
  49. <?php
  50.  }else
  51.  {
  52.  ?>
  53. <p class="navbar">
  54. <div class="span3">
  55. <div style="width: 83%" class="well">
  56. <h3 class="muted">Offline Server</h3>
  57.  <p><span class="label label-important">OFFLINE</span></p>
  58. <ul style="list-style-type: none">
  59. <li style="margin-top: 10px"><span class="label label-default">Gametype</span> <span class="label label-default">- - -</span></li>
  60. <li style="margin-top: 10px"><span class="label label-default">Map</span> <span class="label label-default">- - -</span></li>
  61. <li style="margin-top: 10px"><span class="label label-default">Players</span> <span class="label label-default">- / -</span></li>
  62. </ul>
  63. <hr />
  64. <h4><?php echo $server[0].":".$server[1]; ?></h4>
  65. </div>
  66. </div>
  67.  
  68. <?php
  69.  };
  70. };
  71. ?>
  72.  
  73. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement