<?php
include_once('../inclfiles/core.php');
$title = 'Таблица рекордов';
include_once('../inclfiles/head.php');
$rec_money = mysql_fetch_array(mysql_query("SELECT * FROM `countries` WHERE `zahvatil` = 0 ORDER BY `money` DESC LIMIT 1"));
if($rec_money) t('Самое богатое государство: '.$rec_money['name'].' ('.chislo($rec_money['money'],'монета','монеты','монет').')');
$rec_territory = mysql_fetch_array(mysql_query("SELECT * FROM `countries` WHERE `zahvatil` = 0 ORDER BY `territory` DESC LIMIT 1"));
if($rec_territory) t('Самое большое государство: '.$rec_territory['name'].' ('.$rec_territory['territory'].' км<sup>2</sup>)');
$rec_resurses = mysql_fetch_array(mysql_query("SELECT * FROM `countries` WHERE `zahvatil` = 0 ORDER BY (`wood` + `stone` + `iron` + `grain`+ `oil`) DESC LIMIT 1"));
if($rec_resurses) t('Больше всего ресурсов: '.$rec_resurses['name'].' ('.chislo($rec_resurses['wood'] + $rec_resurses['stone'] + $rec_resurses['iron'] + $rec_resurses['grain'] + $rec_resurses['oil'], 'единица','единицы','единиц').')');
$rec_peoples = mysql_fetch_array(mysql_query("SELECT * FROM `countries` WHERE `zahvatil` = 0 ORDER BY (`wood` + `stone` + `iron` + `grain`) DESC LIMIT 1"));
if($rec_peoples) t('Больше всего рабочих: '.$rec_peoples['name'].' ('.chislo($rec_peoples['peoples'], 'рабочий','рабочих','рабочих').')');
$rec_academics = mysql_fetch_array(mysql_query("SELECT * FROM `countries` WHERE `zahvatil` = 0 ORDER BY `academics` DESC LIMIT 1"));
if($rec_academics) t('Больше всего ученых: '.$rec_academics['name'].' ('.chislo($rec_academics['academics'], 'ученый','ученых','ученых').')');
$star_general = mysql_fetch_array(mysql_query("SELECT * FROM `generals` WHERE `status` = 'activen' ORDER BY `vozrast` DESC LIMIT 1"));
if($star_general) t('Самый старый генерал: '.$star_general['name'].' ('.declination($star_general['vozrast'], 'год', 'года', 'лет').')');
a('index.php?','Информация об игре','info');
include_once('../inclfiles/foot.php');
?>