|
From: Alexander H. <ba...@us...> - 2009-04-08 16:12:47
|
Update of /cvsroot/phgstats/phgstats/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1664/templates Added Files: detail_ut.inc.php Log Message: unreal tournament support --- NEW FILE: detail_ut.inc.php --- <?php if (!defined('PHGDIR')) { exit(1); } echo <<<HTML_DETAIL_RULES <!-- phgstats server rules info --> <table class="phgListServers"> <tr> <td class="phgListRuleHost">Hostname:</td> <td class="phgListValueHost"> <a class="phgListLink" href="{$use_file}{$use_bind}sh_srv={$sh_srv}">{$srv->hostname}</a> </td> <td class="phgListPic"><img height="50" width="50" src="{$srv->mappic}" alt="{$srv->mapname}"></td> </tr> <tr> <td class="phgListRule">Address:</td> <td class="phgListValue">{$srv->address}:{$srv->gameport}</td> </tr> <tr> <td class="phgListRule">Gamename:</td> <td class="phgListValue">{$srv->gamename}</td> </tr> <tr> <td class="phgListRule">Gametype:</td> <td class="phgListValue">{$srv->gametype}</td> </tr> <tr> <td class="phgListRule">Mapname:</td> <td class="phgListValue">{$srv->mapname}</td> </tr> <tr> <td class="phgListRule">Players:</td> <td class="phgListValue">{$srv->numplayers} / {$srv->maxplayers} (-{$srv->prvplayers})</td> </tr> <tr> <td class="phgListRule">Version:</td> <td class="phgListValue">{$srv->gameversion}</td> </tr> </table> <!-- end of server rules --> HTML_DETAIL_RULES; echo "<!-- phgstats server players info -->\n"; if ($srv->numplayers != 0 && $srv->rules['team1'] != 0) { echo <<<HTML_DETAIL_PLAYER_HEAD <table class="phgListPlayers"> <tr> <th class="phgListPlayers">Rank</th> <th class="phgListPlayers">Name</th> <th class="phgListPlayers">Score</th> <th class="phgListPlayers">Secret</th> <th class="phgListPlayers">Mesh</th> <th class="phgListPlayers">Ping</th> <th class="phgListPlayers">Team</th> </tr> HTML_DETAIL_PLAYER_HEAD; for ($n = 0, $i = 1; $n < $srv->numplayers; $n++) { if ($srv->players[$n]['team'] == 0) { echo <<<HTML_DETAIL_PLAYER_TEAM1 <tr> <td class="phgListCount">{$i}</td> <td class="phgListName">{$srv->players[$n]['name']}</td> <td class="phgListScore">{$srv->players[$n]['score']}</td> <td class="phgListScore">{$srv->players[$n]['ngsecret']}</td> <td class="phgListScore">{$srv->players[$n]['mesh']}</td> <td class="phgListPing">{$srv->players[$n]['ping']}</td> <td class="phgListTeam">{$srv->players[$n]['team']}</td> </tr> HTML_DETAIL_PLAYER_TEAM1; $i++; } } echo <<<HTML_DETAIL_SCORE_TEAM1 <tr> <td class="phgListCount"></td> <td class="phgListName"></td> <td class="phgListScore">{$srv->rules['team_score1']}</td> <td class="phgListScore"></td> <td class="phgListScore"></td> <td class="phgListPing">{$srv->rules['team_ping1']}</td> <td class="phgListTeam"></td> </tr> </table> HTML_DETAIL_SCORE_TEAM1; } if ($srv->numplayers != 0 && $srv->rules['team2'] != 0) { echo <<<HTML_DETAIL_PLAYER_HEAD <table class="phgListPlayers"> <tr> <th class="phgListPlayers">Rank</th> <th class="phgListPlayers">Name</th> <th class="phgListPlayers">Score</th> <th class="phgListPlayers">Secret</th> <th class="phgListPlayers">Mesh</th> <th class="phgListPlayers">Ping</th> <th class="phgListPlayers">Team</th> </tr> HTML_DETAIL_PLAYER_HEAD; for ($n = 0, $i = 1; $n < $srv->numplayers; $n++) { if ($srv->players[$n]['team'] == 1) { echo <<<HTML_DETAIL_PLAYER_TEAM2 <tr align='center'> <td class="phgListCount">$i</td> <td class="phgListName">{$srv->players[$n]['name_clr']}</td> <td class="phgListScore">{$srv->players[$n]['score']}</td> <td class="phgListScore">{$srv->players[$n]['ngsecret']}</td> <td class="phgListScore">{$srv->players[$n]['mesh']}</td> <td class="phgListPing">{$srv->players[$n]['ping']}</td> <td class="phgListTeam">{$srv->players[$n]['team']}</td> </tr> HTML_DETAIL_PLAYER_TEAM2; $i++; } } echo <<<HTML_DETAIL_SCORE_TEAM2 <tr align='center'> <td class="phgListCount"></td> <td class="phgListName"></td> <td class="phgListScore">{$srv->rules['team_score2']}</td> <td class="phgListScore"></td> <td class="phgListScore"></td> <td class="phgListPing">{$srv->rules['team_ping2']}</td> <td class="phgListTeam"></td> </tr> </table> HTML_DETAIL_SCORE_TEAM2; } if ($srv->numplayers != 0 && $srv->rules['team3'] != 0) { echo <<<HTML_DETAIL_PLAYER_HEAD <table class="phgListPlayers"> <tr> <th class="phgListPlayers">Rank</th> <th class="phgListPlayers">Name</th> <th class="phgListPlayers">Score</th> <th class="phgListPlayers">Secret</th> <th class="phgListPlayers">Mesh</th> <th class="phgListPlayers">Ping</th> <th class="phgListPlayers">Team</th> </tr> HTML_DETAIL_PLAYER_HEAD; for ($n = 0, $i = 1; $n < $srv->numplayers; $n++) { if ($srv->players[$n]['team'] == 255) { echo <<<HTML_DETAIL_PLAYER_TEAM3 <tr align='center'> <td class="phgListCount">{$i}</td> <td class="phgListName">{$srv->players[$n]['name_clr']}</td> <td class="phgListScore">{$srv->players[$n]['score']}</td> <td class="phgListScore">{$srv->players[$n]['ngsecret']}</td> <td class="phgListScore">{$srv->players[$n]['mesh']}</td> <td class="phgListPing">{$srv->players[$n]['ping']}</td> <td class="phgListTeam">{$srv->players[$n]['team']}</td> </tr> HTML_DETAIL_PLAYER_TEAM3; $i++; } } echo <<<HTML_DETAIL_SCORE_TEAM3 <tr align='center'> <td class="phgListCount"></td> <td class="phgListName"></td> <td class="phgListScore">{$srv->rules['team_score3']}</td> <td class="phgListScore"></td> <td class="phgListScore"></td> <td class="phgListPing">{$srv->rules['team_ping3']}</td> <td class="phgListTeam"></td> </tr> </table> HTML_DETAIL_SCORE_TEAM3; } if ($srv->numplayers == 0) { echo <<<HTML_DETAIL_PLAYER_HEAD <table class="phgListPlayers"> <tr> <th class="phgListPlayers">Rank</th> <th class="phgListPlayers">Name</th> <th class="phgListPlayers">Score</th> <th class="phgListPlayers">Secret</th> <th class="phgListPlayers">Mesh</th> <th class="phgListPlayers">Ping</th> <th class="phgListPlayers">Team</th> </tr> </table> HTML_DETAIL_PLAYER_HEAD; } echo "<!-- end of server players -->\n"; ?> |