Advertisement
jxsl13

Untitled

Apr 6th, 2015
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1.  
  2. <link rel="stylesheet" type="text/css" href="http://uptee.net/templates/protostar/css/template.css">
  3.  
  4.  
  5. <style>
  6. #right{
  7. float:right;
  8. }
  9. #left{
  10. float:left;
  11. }
  12. #clearfloat{
  13. float:clear;
  14. }
  15. //#maiin {
  16. // background-color: grey;
  17. // text-align: center;
  18. //}
  19. #hidden {
  20. display:hidden;
  21. color:;
  22. }
  23. #clearfloat:hover + #hidden {
  24. display:block;
  25. }
  26. </style>
  27. <div class="wrapper">
  28.  
  29. <?php
  30. require_once("./stats.php");
  31.  
  32.  
  33. $request = new TwRequest;
  34.  
  35.  
  36. $request->addServers(array(
  37. array("5.196.202.121", 8300),
  38. array("5.196.202.121", 8301),
  39. array("5.196.202.121", 8302),
  40. array("5.196.202.120", 8300),
  41. array("5.196.202.120", 8301),
  42. array("5.196.202.120", 8302),
  43. array("5.196.202.120", 8303),
  44. array("5.196.202.120", 8304),
  45. array("5.196.202.120", 8305),
  46. array("5.196.202.120", 8306),
  47. array("5.196.202.120", 8307),
  48. array("5.196.202.120", 8308),
  49. array("5.196.202.120", 8309),
  50. ));
  51.  
  52.  
  53. $request->loadServerInfo();
  54.  
  55.  
  56. foreach ($request->getServers() as $server) {
  57. if (isset($server['version'])) {
  58.  
  59. ?>
  60. <p class="navbar">
  61. <div class="span3">
  62. <div style="width: 83%" class="well">
  63. <h3 class="text-info"><?php echo $server['name']; ?></h3>
  64. <p><span class="label label-success">ONLINE</span></p>
  65. <ul style="list-style-type: none">
  66. <li style="margin-top: 10px"><span class="label label-default">Gametype</span> <span class="label label-info"><?php echo $server['gametype']; ?></span></li>
  67. <li style="margin-top: 10px"><span class="label label-default">Map</span> <span class="label label-info"><?php echo $server['map']; ?></span></li>
  68. <li style="margin-top: 10px" id="maiin"><span class="label label-default">Players</span> <span class="label label-info"><?php echo $server['num_players']." / ".$server['max_players']; ?></span>
  69. <span id="clearfloat">
  70. <select style='margin-top:10px;width:80%;' id="shown">
  71. <option><b>Player list</b></option>
  72. <?php
  73. foreach ($server['players'] as $player) {
  74. //echo "<select style='width:80%;'>\n";
  75. //echo "<option><b>Player list</b></option>";
  76. echo "<option>".$player['name']."<br>\n";
  77. echo " - ".$player['clan']."\n";
  78. if($player['score']!= "-9999"){
  79. echo " (".$player['score'].") ";
  80. }
  81. // this is 0.6 only
  82. if ($server[2] == TwRequest::VERSION_06) {
  83. //echo ":".$player['clan']."<br>\n";
  84. echo "[ ".TwRequest::getCountryCode($player['country']);//.
  85. //" / ".TwRequest::getCountryName($player['country'])."<br>\n";
  86. if ($player['ingame']) {
  87. echo " ] (Ingame)\n";
  88. } else {
  89. echo " ] (Spectating)\n";
  90. }
  91. }
  92. //echo "</select>\n";
  93. }
  94. $server['num_players']." / ".$server['max_players'];
  95.  
  96. ?></select></span>
  97. </li>
  98. </ul>
  99. <hr />
  100. <h4><?php echo $server[0].":".$server[1]; ?></h4>
  101. </div>
  102. </div>
  103.  
  104. <?php
  105. }else
  106. {
  107. ?>
  108. <p class="navbar">
  109. <div class="span3">
  110. <div style="width: 83%" class="well">
  111. <h3 class="muted">Offline Server</h3>
  112. <p><span class="label label-important">OFFLINE</span></p>
  113. <ul style="list-style-type: none">
  114. <li style="margin-top: 10px"><span class="label label-default">Gametype</span> <span class="label label-default">- - -</span></li>
  115. <li style="margin-top: 10px"><span class="label label-default">Map</span> <span class="label label-default">- - -</span></li>
  116. <li style="margin-top: 10px"><span class="label label-default">Players</span> <span class="label label-default">- / -</span></li>
  117. </ul>
  118. <hr />
  119. <h4><?php echo $server[0].":".$server[1]; ?></h4>
  120. </div>
  121. </div>
  122.  
  123. <?php
  124. };
  125. };
  126. ?>
  127.  
  128. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement