<?PHP
/*----------------------------------------------------------------------------------------------------------\
| |
| [ LIVE GAME SERVER LIST ] [ © RICHARD PERRY FROM GREYCUBE.COM ] |
| |
| Released under the terms and conditions of the GNU General Public License Version 3 (http://gnu.org) |
| |
|-------------------------------------------------------------------------------------------------------------
| [ EDITOR STYLE SETTINGS: LUCIDA CONSOLE, SIZE 10, TAB = 2 SPACES, BOLD GLOBALLY TURNED OFF ] |
\-----------------------------------------------------------------------------------------------------------*/
//------------------------------------------------------------------------------------------------------------+
{
}
require ENGINE_DIR . "/modules/lgsl/lgsl_files/lgsl_class.php";
//------------------------------------------------------------------------------------------------------------+
$lookup = lgsl_lookup_id($_REQUEST['s']);
if (!$lookup)
{
$output .= "";
msgbox($lang['all_info'], $lgsl_lang['mid']);
return;
}
$server = lgsl_query_cached($lookup['ip'], $lookup['q_port'], $lookup['c_port'], $lookup['s_port'], $lookup['type'], "sep");
$server = lgsl_sort_players($server);
$server = lgsl_sort_extras($server);
$misc = lgsl_server_misc($server);
$server = lgsl_server_html($server);
//------------------------------------------------------------------------------------------------------------+
// COLUMN NAMING AND ORDER TO SHOW ON THE PLAYER LIST
$player_field_list = array (
"name" => "Name",
"score" => "Score",
"deaths" => "Deaths",
"ping" => "Ping",
"team" => "Team",
"time" => "Time",
"bot" => "Bot",
"xp" => "XP",
"enemy" => "Enemy",
"goal" => "Goal",
"honor" => "Honor",
"kia" => "K.I.A.",
"leader" => "Leader",
"roe" => "R.O.E.",
"skill" => "Skill",
"skin" => "Skin",
"stats" => "Stats",
"rate" => "Rate",
"keyhash" => "Key Hash",
//"pid" => "Player ID",
//"pbguid" => "PB GUID",
"" => ""
);
//------------------------------------------------------------------------------------------------------------+
$output .= "
<div style='text-align:center'>";
//------------------------------------------------------------------------------------------------------------+
// STANDARD INFO
$output .= "
<table border=0 style='margin:auto;'>
<tr>
<td colspan='3' style='text-align:center'>
<h3 style='color:#1D4EA7;'> <strong>{$server['s']['name']}</strong> </h3>
<br /> </td>
</tr>
<tr>
<td style='vertical-align:middle;'>
<table class='lgsl_tb' style='margin:auto; border: 1px double silver; width:300px; '>
<tr style='".lgsl_bg()."'><td> <div><b> {$lgsl_lang['sts']} </b></div> </td> <td style='white-space:nowrap'> <div style='color:green;'>{$misc['text_status']}</div></td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['adr']} </b></div> </td> <td style='white-space:nowrap'> <div><a href='{$misc['software_link']}'>{$server['b']['ip']}</a></div> </td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['cpt']} </b></div> </td> <td style='white-space:nowrap'> <div>{$server['b']['c_port']}</div> </td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['qpt']} </b></div> </td> <td style='white-space:nowrap'> <div>{$server['b']['q_port']}</div> </td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['typ']} </b></div> </td> <td style='white-space:nowrap'> <div>{$server['b']['type']} </div> </td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['gme']} </b></div> </td> <td style='white-space:nowrap'> <div>{$server['s']['game']} </div> </td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['map']} </b></div> </td> <td style='white-space:nowrap'> <div>{$server['s']['map']} </div> </td> </tr>
<tr style='".lgsl_bg()."'> <td> <div><b> {$lgsl_lang['plr']} </b></div> </td> <td style='white-space:nowrap'> <div>{$server['s']['players']} / {$server['s']['playersmax']} </div> </td> </tr>
</table>
</td>
<td style='vertical-align:middle;'>
<div style='padding:5px; background-image:url({$misc['image_map']}); background-repeat:no-repeat; background-position:center'>
<img alt='' style='border:none' src='{$misc['image_map_password']}' title='{$misc['text_type_game']}' />
</div>
</td>
</tr>
</table>
<div style='height:20px'><br /></div>";
//------------------------------------------------------------------------------------------------------------+
$output .= "<div id='cat-title' style='padding-bottom:15px;'><h2>Игроки Онлайн</h2></div>";
//------------------------------------------------------------------------------------------------------------+
// PLAYER INFO
if (!$server['p'])
{
$output .= "
<div style='padding-bottom:15px;'>{$lgsl_lang['npi']}</div><div style='height:20px'><br /></div>";
}
else
{
$used_field_list = array();
foreach ($player_field_list as $field => $title)
{
foreach ($server['p'] as $player)
{
if (isset($player[$field])) {
$used_field_list[$field] = $title;
}
}
}
$output .= "
<table style='margin:auto;'>
<tr style='background:#86d452'>
<td width='20' style='background:#86d452 url({THEME}/images/tb_l.jpg) no-repeat'> </td>";
foreach ($used_field_list as $field => $title)
{
$output .= "
<td> <div style='padding: 5px 5px 5px 5px;'><b>{$title}</b></div> </td>";
}
$output .= "<td width='20' style='background:#86d452 url({THEME}/images/tb_r.jpg) no-repeat top right;'> </td>
</tr>";
foreach ($server['p'] as $player_key => $player)
{
$output .= "
<tr style='".lgsl_bg()."'><td></td>";
foreach ($used_field_list as $field => $title)
{
$output .= "<td> <div style='padding: 5px 5px 5px 5px;'>{$player[$field]}</div> </td>";
}
$output .= "<td></td>
</tr>";
}
$output .= "
</table>
<div style='height:20px'><br /></div>";
}
//------------------------------------------------------------------------------------------------------------+
$output .= "
<div id='cat-title' style='padding-bottom:15px;'><h2>Настройки Сервера</h2></div>
<div style='height:20px'><br /></div>";
//------------------------------------------------------------------------------------------------------------+
// EXTRA INFO
if (!$server['e'])
{
$output .= " <div style='padding-bottom:15px;'>{$lgsl_lang['nei']}</div><div style='height:20px'><br /></div>";
}
else
{
$output .= "
<table style='margin-left:auto; margin-right:auto;'>
<tr style='background:#86d452;'><td width='20' style='background:#86d452 url({THEME}/images/tb_l.jpg) no-repeat;'></td>
<td> <div style='padding: 5px 5px 5px 5px;'><b>Setting</b></div> </td>
<td> <div style='padding: 5px 5px 5px 5px;'><b>Value </b></div> </td>
<td width='20' style='background:#86d452 url({THEME}/images/tb_r.jpg) no-repeat top right;'></td>
</tr>";
foreach ($server['e'] as $field => $value)
{
$color = lgsl_bg();
$output .= "
<tr><td style='{$color}'></td>
<td style='{$color}'> <div style='padding: 2px 5px 2px 5px;'>{$field}</div> </td>
<td style='{$color}'> <div style='padding: 2px 5px 2px 5px;'>{$value}</div> </td>
<td style='{$color}'></td>
</tr>";
}
$output .= "
</table>
<div style='height:20px'><br /></div>";
}
//------------------------------------------------------------------------------------------------------------+
$output .= "
</div>";
$tpl->load_template('static.tpl');
$tpl->set('{description}', $lgsl_lang['titl_det']);
$tpl->set('{pages}', '');
$tpl->set('{static}', $output);
$tpl->compile('content');
$tpl->clear();
?>