<?php
include('cfg.php');
$total_people=$user['workers']+$user['scientists']+$user['solders']+$user['horses']+$user['archers'];
echo '<link rel="stylesheet" type="text/css" href="style.css"/><div class="head">'.$user['country'].'</div>';
//Хавка)))
    $count_teach=mysql_fetch_row(mysql_query("SELECT sum(amount+sc) FROM `teach` WHERE id_user='$user[id]'"));//сума обучающихся солдат
    $count_work=mysql_fetch_row(mysql_query("SELECT sum(workers) FROM `res_get` WHERE id_user='$user[id]'"));
    $count_free=mysql_fetch_row(mysql_query("SELECT sum(workers+scientists+solders+horses+archers) FROM `users` WHERE id='$user[id]'"));
    $count_wars=mysql_fetch_row(mysql_query("SELECT sum(solders+horses+archers) FROM `wars` WHERE id_attacker='$user[id]'"));
    $food_need=intval(($count_teach[0]+$count_work[0]+$count_free[0]+$count_wars[0]));
?>
<div class="info">
Население (<b><?=$total_people;?></b>)<br />
Рабочие: <b><?=$user['workers'];?></b><br />
Ученые: <b><?=$user['scientists'];?></b><br />
Ежегодно все население съедает: <b><?=$food_need;?></b> зерна<br />
<img src="./images/warrior.png" alt=*> Пехотинцы: <b><?=$user['solders'];?></b><br />
<img src="./images/horse.png" alt=*> Кавалеристы: <b><?=$user['horses'];?></b><br />
<img src="./images/bow.png" alt=*> Стрелки: <b><?=$user['archers'];?></b><br />
</div>
<?
echo '
<a class="razd" href="game.php">'.$iback.' Назад</a>
<a class="razd" href="exit.php">'.$iexit.' Выход</a>
<div class="footer">
<a href="http://wapworld.pp.ua">© WapWorld Games</a><br/><br />
</div>
</body></html>';
?>