Hallo, Ich habe ein kleines Problem:
Wenn ich auf meinen Test Webspace unter: http://reallife-of-world.co.de/ucp/server.php
Gehe Ist unter dem Login sach etc. so ein Kästchen mit den ganzen Server Infos, wie bekomme
ich das in die Mitte und das Online Spieler rechts daneben steht ?
Hier mein Code:
PHP
<?phpinclude "SampQueryAPI.php";include "style.tpl";$query = new SampQueryAPI('83.136.86.143', 8192);if($query->isOnline()){ $aInformation = $query->getInfo(); $aServerRules = $query->getRules(); ?> <div id="layout"> <b>Server Informationen</b> <table width="200" margin="auto" > <tr> <td>Server Name</td> <td><?= htmlentities($aInformation['hostname']) ?></td> </tr> <tr> <td>Spieler</td> <td><?= $aInformation['players'] ?> / <?= $aInformation['maxplayers'] ?></td> </tr> <tr> <td>Map</td> <td><?= htmlentities($aInformation['mapname']) ?></td> </tr> <tr> <td>Wetter</td> <td><?= $aServerRules['weather'] ?></td> </tr> <tr> <td>Uhrzeit</td> <td><?= $aServerRules['worldtime'] ?></td> </tr> <tr> <td>Server-Version</td> <td><?= $aServerRules['version'] ?></td> </tr> <tr> <td>Password</td> <td><?= $aInformation['password'] ? 'Yes' : 'No' ?></td> </tr> </table> </html> <br /> <b>Online Spieler</b> </div> <?php $aPlayers = $query->getDetailedPlayers(); if(!is_array($aPlayers) || count($aPlayers) == 0) { echo '<br /><i>None</i>'; } else { ?> <table width="400" > <tr> <td><b>Spieler ID</b></td> <td><b>Name</b></td> <td><b>Level</b></td> <td><b>Ping</b></td> </tr> <?php foreach($aPlayers as $sValue) { ?> <tr> <td><?= $sValue['playerid'] ?></td> <td><?= htmlentities($sValue['nickname']) ?></td> <td><?= $sValue['score'] ?></td> <td><?= $sValue['ping'] ?></td> </tr> <?php } echo '</table>'; }}?>
MFG Arendium