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


if($id) {
	$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `r_priz` WHERE `win`='" . $id."'"), 0);
	$winner_cup = mysql_query("SELECT * FROM `r_priz` WHERE `win`='".$id."' order by time ASC");
	$club = mysql_fetch_array(mysql_query("SELECT * FROM `fman_clubs` WHERE `id`='". $id ."' LIMIT 1;"));
echo '<div class="phdr">'.$club['name'].': Sovrinlar</div>';
echo'<div class="menu">';
if($total>0) {
while ($wc = mysql_fetch_array($winner_cup)) {

echo'<a href="'.$home.''.$wc['url'].'"><div class="img-t" style="background: url(../images/cup/b_'.$wc['id_cup'].'.jpg); background-size: 100%;" title="'.$wc['name'].'" alt="'.$wc['name'].'"></div></a>';

}
} else {echo"Bu klub hali sovrinlar yutmagan!!"; }
echo '</div><div class="gmenu">'.$lng['all'].': '.$total.'</div>
<div class="phdr"><a href="club.php?id='.$id.'">'.$club['name'].'</a><br>
<a href="index.php">'.$lng['fm'].'</a></div>';

} else {
	header('location: /?err');
exit;
}

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