Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka rarmv9v25 dodana przez Gość, 14.08.2013 19:29
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133.
<?php if ( ! defined( 'IN_IPB' ) ) { print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } class public_dodatki_dodatki_protokol extends ipsCommand { public function doExecute( ipsRegistry $registry ) { /* tytul strony */ $this->registry->output->setTitle( "Protokół - " . ipsRegistry::$settings['board_name']); /* nawigacja */ $this->registry->output->addNavigation( "Dodatki", "app=dodatki", "dodatki", "app=dodatki"); $this->registry->output->addNavigation( "Protokół", "app=dodatki&module=dodatki§ion=protokol", "protokol", "protokol"); /* tagi meta */ $this->registry->output->addMetaTag( 'keywords', 'hlds, informacje, dproto, protokół, amxx, metamod, counter-strike, cs', TRUE ); $this->registry->output->addMetaTag( 'description', 'Sprawdzanie protokołu serwera oraz innych podstawowych informacji', TRUE ); $this->registry->output->addMetaTag( 'author', 'Pavulon' ); $this->registry->output->addToDocumentHead('inlinecss', "input { border: 1px solid #000000; font: normal 11px Verdana, Arial, Helvetica, sans-serif;} .wrong {background-color:#00FF00; color:#FF0000} #server td {border-top:1px solid #666666; }"); $form = $this->registry->output->buildSEOUrl( "app=dodatki&module=dodatki§ion=protokol", "public", "protokol", "protokol"); $ip = trim($this->request['ip']); $html = '<div style="width:90%;position:relative;left:80px"><br/><br/><div> <p class="desc">Wprowadź IP serwera o którym chcesz uzyskać informacje</p> <span style="float: left"><form method="get" action="'.$form.'"><p><strong>IP:</strong> <input type="text" class="input_text" name="ip" size="30" value="'.$ip.'"> </span><input type="submit" class="input_submit" value="Sprawdź"></form> </div><br/><br/>'; if ($ip!='') { require_once( '/home/hiroshima/htdocs/GameQ.php' ); list($conf_ip, $conf_port) = explode(":", $ip); $servers = array( 'server' => array('cs', $conf_ip, intval($conf_port) ? intval($conf_port) : 27015 ) ); $gq = new GameQ(); $gq->addServers($servers); $gq->setOption('timeout', 200); $gq->setFilter('normalise'); $gq->setFilter('sortplayers', array('gq_score', false)); $results = $gq->requestData(); $typ = ''; if ($results['server']['dp_version']) $typ = 'S+NS (dproto: '.$results['server']['dp_version'].')'; else if ($results['server']['protocol']!=48) $typ = 'Non Steam'; else $typ = 'Steam'; // Prowizorka dla CS:GO if($results['server']['protocol']=='csgo' || $results['server']['steamappid'] == 730 || $results['server']['steamappid'] == 1800) $typ = 'Steam'; if ($typ!='Steam') $typ = '<td class="wrong">'.$typ.'</td>'; else $typ = '<td>'.$typ.'</td>'; // <tr class="row1"><td>Ping</td><td>'.$info['ping'].'</td></tr> $html .= '<table id="server" style="width:90%;">'; if ($results['server']['gq_online']) { $html .= '<tr class="maintitle"><td>Nazwa</td><td>'.htmlspecialchars($results['server']['gq_hostname']).'</td></tr> <tr class="row1"><td>IP</td><td>'.htmlspecialchars($results['server']['gq_address']).'</td></tr> <tr class="row2 altrow"><td>Port</td><td>'.($results['server']['gq_port']).'</td></tr> <tr class="row2 altrow"><td>Protokół</td>'.$typ.'</tr> <tr class="row1"><td>Mapa</td><td>'.htmlspecialchars($results['server']['gq_mapname']).'</td></tr> './*<tr><td>Gamedir</td><td>'.$info['gamedir'].'</td></tr>*/' <tr class="row2 altrow"><td>Gra</td><td>'.htmlspecialchars($results['server']['game_descr']).'</td></tr> <tr class="row1"><td>Liczba graczy</td><td>'.$results['server']['gq_numplayers'].'</td></tr> <tr class="row2 altrow"><td>Max graczy</td><td>'.$results['server']['gq_maxplayers'].'</td></tr> <tr class="row1"><td>Hasło</td>'.(($results['server']['gq_password'])?'<td class="wrong">Tak</td>':'<td>Nie</td>').'</tr>'; if ($results['server']['gq_numplayers']>0) { $html .= '<tr><td colspan=2> </td></tr>'; $html .= '<tr class="header"><td>Gracz</td><td>Zabójstw</td></tr>'; $i = 0; foreach ($results['server']['players'] as $player) { $html .= '<tr class="'.(($i++%2)?'row2 altrow':'row1').'"><td>'.$player['gq_name'].'</td><td>'.$player['gq_score'].'</td></tr>'; } } $html .= '<tr><td colspan=2> </td></tr>'; $html .= '<tr class="header"><td>Zmienna</td><td>Wartość</td></tr>'; $data = $results['server']; foreach ($data as $key => $val) { if (is_array($val)) continue; if (substr($key, 0, 3) == 'gq_') { continue; } $html .= "<tr><td>{$key}</td><td>{$val}</td></tr>n"; } } else { $html .= '<tr><td class="maintitle wrong">Serwer Nie Odpowiada !</td></tr>'; } $html .= '<tr><td colspan="2" style="text-align:center;"><form method="get" action="'.$form.'"><input type="hidden" name="ip" value="'.$ip.'"><input type="submit" class="input_submit" value="Odśwież"></form></td></tr> </table>'; } $html .= '<br/><br/></div>'; $this->registry->output->addContent( $html ); $this->registry->output->sendOutput(); } } ?>
Dodanych wklejek: 11179
Powered By (Pav32) Pastebin © 2011