<?php
define('_IN_JOHNCMS', 1);
$headmod = 'manager';
$textl='Mablag`lar';
require_once("../incfiles/core.php");
require_once("../incfiles/head.php");
require_once("manfunc.php"); 

$q=mysql_query("select * from fman_clubs where id=$id;");
$a=mysql_fetch_array($q);

echo"<h2 align='center'> $a[name] Jamoalar mablag`lari</h2>
<div class='menu'>Byudjet: <b>$".number_format($a[budj],0,'.',' ')."</b></div>";

$qp=mysql_query("select * from fman_players where team_id=$id;");
$n=0;
while($aj=mysql_fetch_array($qp))
{
	$markt=(1000000*$aj[rait])+(($aj[u]+$aj[vyn]+$aj[ig]+$aj[otb]+$aj[drib]+($aj[gk]*4)+$aj[f]+$aj[toch]+$aj[priem]+$aj[pas])*500000);
	$zarplat=round($markt/800);
	$n=$n+$zarplat;
}
echo"<div class='menu'>O`yinchilarning maoshlari: $".number_format($n,0,'.',' ')." virtual xaftada</div>
<div class='menu'>O`yingohni saqlash harajatlari: $".number_format(($a[stadv]*20),0,'.',' ')." virtual xaftada</div>
<div class='menu'>Qurilishlardan tushgan daromad: $".number_format($a[plus],0,'.',' ')." virtual xaftada</div>
";

echo"<div class='phdr'><a href='club.php?id=$id'>$a[name]</a><br/><a href='index.php'>Futbol menejer</a></div>";

require_once("../incfiles/end.php"); 
?>
