Файл: gamestat.php
Строк: 41
<?php
include_once("settings.php");
include_once("players.php");
include_once("common_func.php");
//create player class
$players = new CPlayers($db);
//get count players
$count_player = $players->getCountPlayers();
$smarty->assign('COUNT_PLAYER',$count_player);
$count_online_players = $players->getOnlinePlayers();
$smarty->assign('COUNT_ONLINE_PLAYER',$count_online_players);
//get list online players
$list_online_players = $players->getOnlinePlayersList();
foreach ($list_online_players as $v)
{
$smarty->append("players_online",array(
'VNUM' => $v['vnum'],
'ACTIVE' => date("H:i d:m",$v['active']),
'NAME' => $v['name'],
'STATE_TXT' => getStateText($v['state']),
));
}
$header=$smarty->fetch($templ_path.'/index_head.tpl');
$smarty->assign('HEADER',$header);
$text=$smarty->fetch($templ_path.'/gamestat.tpl');
echo($text);
$text=$smarty->fetch($templ_path.'/counter.tpl');
echo($text);
?>