Advertisement
Guest User

Untitled

a guest
Feb 1st, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. require "applications/panel/sources/SampQueryAPI.php";
  2. $query = new SampQueryAPI("80.72.47.182", "3644");
  3. $aInformation = $query->getInfo();
  4. $aServerRules = $query->getRules();
  5. $aPlayers = $query->getDetailedPlayers();
  6. echo "<div class=\"ipsfocusBox\">";
  7. echo "<h2 class=\"ipsType_sectionTitle ipsType_reset ipsType_blendLinks cForumTitle\">Lista serwerów</h2>";
  8. echo "<div class=\"ipsfocusBackground\">";
  9. echo "<table class=\"ipsTable ipsTable_responsive ipsTable_zebra ipsBox\">";
  10. echo "<thead><tr>";
  11. echo "<th style=\"text-align: center;\">Gra</th>";
  12. echo "<th style=\"text-align: center;\">Nazwa</th>";
  13. echo "<th style=\"text-align: center;\">Adres</th>";
  14. echo "<th style=\"text-align: center;\">Gracze</th>";
  15. echo "<th style=\"text-align: center;\">Menu</th>";
  16. echo "</tr></thead>";
  17. echo "<tbody><tr>";
  18. echo "<td style=\"text-align: center;\"><img src=\"http://i.imgur.com/Jlcx90r.png\" style=\"border-radius: 4px;\"></td>";
  19. echo "<td style=\"text-align: center;\">".htmlentities($aInformation["hostname"])."</td>";
  20. echo "<td style=\"text-align: center;\">Już Niedługo!</td>";
  21. echo "<td style=\"text-align: center;\"><a href=\"#elTabelaSamp_menu\" id=\"elTabelaSamp\" data-ipsMenu> ".$aInformation["players"]." / ".$aInformation["maxplayers"]." <i class=\"fa fa-caret-down\"></i></a>";
  22. echo "<ul id=\"elTabelaSamp_menu\" class=\"ipsMenu ipsHide\">";
  23. echo "<li class=\"ipsMenu_title\">Lista Graczy Online</li>";
  24.  
  25. if($query->isOnline())
  26. {
  27. if(!is_array($aPlayers) || count($aPlayers) == 0)
  28. {
  29. echo "<li class=\"ipsMenu_item\" data-ipsMenuValue=\"itemID\"><a>Brak graczy na serwerze! :(</a></li>";
  30. }
  31. else
  32. {
  33. foreach($aPlayers as $sValue)
  34. {
  35. echo "<li class=\"ipsMenu_item\" data-ipsMenuValue=\"itemID\"><a href=\"#\" name=\"player_name\" data-ipsDialog data-ipsDialog-url=\"applications/panel/sources/statygraczapopup.php?'. htmlentities($sValue['nickname'])... .']'"\" >".htmlentities($sValue["nickname"])."</a></li>";
  36. }
  37. }
  38. }
  39. else
  40. {
  41. echo "<li class=\"ipsMenu_item\" data-ipsMenuValue=\'itemID\'><a href=\'#\'>Brak graczy na serwerze! :(</a></li>";
  42. }
  43. echo "</ul>";
  44. echo "</td>";
  45. echo "<td style=\"text-align: center;\">";
  46. echo "<a href=\"http://files.sa-mp.com/sa-mp-0.3.7-install.exe\" data-ipsdialog-title=\"Pobierz demo\" class=\"ipsButton ipsButton_primary ipsButton_verySmall\"><i class=\"fa fa-download\"></i> SAMP 0.3.7</a> ";
  47. echo "<a href=\"samp://ip\" data-ipsdialog-title=\"Połącz z serwerem\" class=\"ipsButton ipsButton_primary ipsButton_verySmall\"><i class=\"fa fa-play-circle-o\"></i> Połącz</a>";
  48. echo "</td>";
  49. echo "</tr></tbody>";
  50. echo "</table></div></div>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement