Incorrect accessYou 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 = '


Wprowadź IP serwera o którym chcesz uzyskać informacje

IP:  



'; 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 = ''.$typ.''; else $typ = ''.$typ.''; // Ping'.$info['ping'].' $html .= ''; if ($results['server']['gq_online']) { $html .= ''.$typ.' './**/' '.(($results['server']['gq_password'])?'':'').''; if ($results['server']['gq_numplayers']>0) { $html .= ''; $html .= ''; $i = 0; foreach ($results['server']['players'] as $player) { $html .= ''; } } $html .= ''; $html .= ''; $data = $results['server']; foreach ($data as $key => $val) { if (is_array($val)) continue; if (substr($key, 0, 3) == 'gq_') { continue; } $html .= "n"; } } else { $html .= ''; } $html .= '
Nazwa'.htmlspecialchars($results['server']['gq_hostname']).'
IP'.htmlspecialchars($results['server']['gq_address']).'
Port'.($results['server']['gq_port']).'
Protokół
Mapa'.htmlspecialchars($results['server']['gq_mapname']).'
Gamedir'.$info['gamedir'].'
Gra'.htmlspecialchars($results['server']['game_descr']).'
Liczba graczy'.$results['server']['gq_numplayers'].'
Max graczy'.$results['server']['gq_maxplayers'].'
HasłoTakNie
 
GraczZabójstw
'.$player['gq_name'].''.$player['gq_score'].'
 
ZmiennaWartość
{$key}{$val}
Serwer Nie Odpowiada !
'; } $html .= '

'; $this->registry->output->addContent( $html ); $this->registry->output->sendOutput(); } } ?>