Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link rel="stylesheet" type="text/css" href="http://uptee.net/templates/protostar/css/template.css">
- <style>
- #right{
- float:right;
- }
- #left{
- float:left;
- }
- #clearfloat{
- float:clear;
- }
- //#maiin {
- // background-color: grey;
- // text-align: center;
- //}
- #hidden {
- display:hidden;
- color:;
- }
- #clearfloat:hover + #hidden {
- display:block;
- }
- </style>
- <div class="wrapper">
- <?php
- require_once("./stats.php");
- $request = new TwRequest;
- $request->addServers(array(
- array("5.196.202.121", 8300),
- array("5.196.202.121", 8301),
- array("5.196.202.121", 8302),
- array("5.196.202.120", 8300),
- array("5.196.202.120", 8301),
- array("5.196.202.120", 8302),
- array("5.196.202.120", 8303),
- array("5.196.202.120", 8304),
- array("5.196.202.120", 8305),
- array("5.196.202.120", 8306),
- array("5.196.202.120", 8307),
- array("5.196.202.120", 8308),
- array("5.196.202.120", 8309),
- ));
- $request->loadServerInfo();
- foreach ($request->getServers() as $server) {
- if (isset($server['version'])) {
- ?>
- <p class="navbar">
- <div class="span3">
- <div style="width: 83%" class="well">
- <h3 class="text-info"><?php echo $server['name']; ?></h3>
- <p><span class="label label-success">ONLINE</span></p>
- <ul style="list-style-type: none">
- <li style="margin-top: 10px"><span class="label label-default">Gametype</span> <span class="label label-info"><?php echo $server['gametype']; ?></span></li>
- <li style="margin-top: 10px"><span class="label label-default">Map</span> <span class="label label-info"><?php echo $server['map']; ?></span></li>
- <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>
- <span id="clearfloat">
- <select style='margin-top:10px;width:80%;' id="shown">
- <option><b>Player list</b></option>
- <?php
- foreach ($server['players'] as $player) {
- //echo "<select style='width:80%;'>\n";
- //echo "<option><b>Player list</b></option>";
- echo "<option>".$player['name']."<br>\n";
- echo " - ".$player['clan']."\n";
- if($player['score']!= "-9999"){
- echo " (".$player['score'].") ";
- }
- // this is 0.6 only
- if ($server[2] == TwRequest::VERSION_06) {
- //echo ":".$player['clan']."<br>\n";
- echo "[ ".TwRequest::getCountryCode($player['country']);//.
- //" / ".TwRequest::getCountryName($player['country'])."<br>\n";
- if ($player['ingame']) {
- echo " ] (Ingame)\n";
- } else {
- echo " ] (Spectating)\n";
- }
- }
- //echo "</select>\n";
- }
- $server['num_players']." / ".$server['max_players'];
- ?></select></span>
- </li>
- </ul>
- <hr />
- <h4><?php echo $server[0].":".$server[1]; ?></h4>
- </div>
- </div>
- <?php
- }else
- {
- ?>
- <p class="navbar">
- <div class="span3">
- <div style="width: 83%" class="well">
- <h3 class="muted">Offline Server</h3>
- <p><span class="label label-important">OFFLINE</span></p>
- <ul style="list-style-type: none">
- <li style="margin-top: 10px"><span class="label label-default">Gametype</span> <span class="label label-default">- - -</span></li>
- <li style="margin-top: 10px"><span class="label label-default">Map</span> <span class="label label-default">- - -</span></li>
- <li style="margin-top: 10px"><span class="label label-default">Players</span> <span class="label label-default">- / -</span></li>
- </ul>
- <hr />
- <h4><?php echo $server[0].":".$server[1]; ?></h4>
- </div>
- </div>
- <?php
- };
- };
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement