<?

defined('_IN_JOHNCMS') or die('Error: restricted access');

$foydalanuvchi = functions::get_user($foydalanuvchi);

$brth = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `dayb` = '" . date('j', time()) . "' AND `monthb` = '" . date('n', time()) . "' AND `preg` = '1'"), 0);

if ($brth)
echo '
    <a href="users/index.php?act=birth">
        <div style="text-align: center;" class="menu">
            Bugun saytimizda (' . $brth . ') ta foydalanuvchining tug\'ilgan kuni!
        </div>
    </a>
';

if (!$user_id) { 
    echo '
        <div class="phdr"><b>Sistemaga Kirish</b> | <a href="registration.php"><b>A\'zo bo\'lsh</b></a></div>
        <div class ="end" style="text-align:center">
        	<div class="smenu">
        		<form action="login.php" method="post">
        			<input type="text" placeholder="' . $lng['login_name'] . '" name="n" value="' . htmlentities($user_login, ENT_QUOTES, 'UTF-8') . '" size="auto"/>
        			<input placeholder="' . $lng['password'] . '" type="text" name="p" size="auto"/><br />
        			<input type="submit" value="' . $lng['login'] . '"/>
        		</form>
        	</div>
        </div>
    '; 
} else {
    $user_club = mysql_query("SELECT `user_id`, `name`, `city`, `land`, `budj`, `stadion` FROM `fman_clubs` WHERE `user_id` = ' .$foydalanuvchi[id]. ' ");
    $result_club = mysql_fetch_assoc($user_club);
    echo '
        <div class="phdr">Mini profil</div>
        <div class="smenu">
            ' .$lng['hi']. ', <a href="/users/profile.php">' .$foydalanuvchi['imname']. ' ' .$foydalanuvchi['familya']. ' ' .$result_club. '</a> | 
            <a href="/users/profile.php?act=office">' .$lng['personal']. '</a> | 
            <a href="exit.php">' .$lng['exit']. '</a>
        </div> 
    ';
}

	//include 'table.php';

echo '
	<div class="phdr">  <b><div style="text-align: center;">Sayt Menyusi</div></b></div>
	<a href="info.php"><div class="menu">» Saytimizda yangimisiz?</div></a>
';
	//include 'news.php';
    //include 'news.php';



/*
echo '

    <div class="phdr">Club haqida</div>
    <a href="/club/index.php?id=3"><div class="menu">»  Club Tarixi</div></a>
    <a href="/chapionat/"><div class="menu">»  Club Trezidenti</div></a>
    <a href="/chapionat/"><div class="menu">»  Club Madhiyasi</div></a>
    <a href="/chapionat/"><div class="menu">»  Club Stadioni</div></a>
    <a href="/chapionat/"><div class="menu">»  Club Nishoni</div></a>
    <a href="/chapionat/"><div class="menu">»  Club Fudbolchilari</div></a>
    <a href="/chapionat/"><div class="menu">»  Club Afsonalari</div></a>
    <div class="phdr">Qo\'shimcha</div>
    <a href="/chapionat/"><div class="menu">»  Turnir jadvali</div></a>
    <a href="/chapionat/"><div class="menu">»  Tv Dasturlar</div></a>
    <a href="/chapionat/"><div class="menu">»  FIFA Reytinggi</div></a>
    <a href="/chapionat/"><div class="menu">»  UEFA Reytinggi</div></a>
    <a href="/chapionat/"><div class="menu">»  Chempionatlar</div></a>
    <a href="/chapionat/"><div class="menu">»  Online Natijalar</div></a>

	<a href="/chapionat/"><div class="menu">»  Chempionat</div></a>
	<a href="/guestbook/"><div class="menu">»  Mehmonxona (' . counters::guestbook() . ')</div></a>
	<a href="/forum/"><div class="menu">»  Forum (' . counters::forum() . ')</div></a>
	<a href="users/album.php"><div class="menu">»  Fotoalbom (' . counters::album() . ')</div></a>

';
*/
//include 'sport_haqida/boshqa.php';

/*
///////////////////////////////
$all_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
    echo '<div class="phdr">
                Muhlislar
                <span class="count">' .$all_user. '</span>
        </div>';
$us = mysql_query("SELECT `id`, `imname`, `familya`, `datereg` FROM `users` WHERE (sex='m') ORDER BY `datereg` DESC LIMIT 1; ");
$uz = mysql_fetch_array($us);
echo '
    <div class="menu">
        <img style="width: 30px;border: 1px solid rgb(197, 197, 197);vertical-align: middle;border-radius: 40px;" src="svd/barce.png" alt="erkak"/> 
        <a href="users/profile.php?user=' . $uz['id'] . '">
            ' . $uz['imname'] . ' ' . $uz['familya'] . '
        </a>
        <a href="/mail/index.php?act=write&amp;id=' . $uz['id'] . '">
            <img style="float: right;width: 30px;" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAMFBMVEXs8vSZmZnF2NzJzM2trq7Y3d7Cxcbj6OqusLHO0dPm7O6bm5ugoKHGycqlpqaztba0Cd/iAAAAXElEQVRo3mNQQgMMCgwogGlQCTwUBAM5uIAMROAgXGB7I4gvUQgXkF8GEsj6CBcQfBojKHg0ThAhIG3eKFK7EUlAUH7trY+CyAKCL+cJogqAAQkCGE4flIGMnhwAu5gb8p5h72sAAAAASUVORK5CYII=" />
        </a>
    </div>
';
///////////////////////////////
$us = mysql_query("SELECT `id`, `imname`, `familya`, `datereg` FROM `users` WHERE (sex='zh') ORDER BY `datereg` DESC LIMIT 1; ");
$uz = mysql_fetch_array($us);
echo '
    <div class="menu">
        <img style="width: 30px;border: 1px solid rgb(197, 197, 197);vertical-align: middle;border-radius: 40px;" src="svd/manyu_alltime.png" alt="ayol"/>
        <a href="users/profile.php?user=' . $uz['id'] . '">
            ' . $uz['imname'] . ' ' . $uz['familya'] . '
        </a>
        <a href="/mail/index.php?act=write&amp;id=' . $uz['id'] . '">
            <img style="float: right;width: 30px;" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAMFBMVEXs8vSZmZnF2NzJzM2trq7Y3d7Cxcbj6OqusLHO0dPm7O6bm5ugoKHGycqlpqaztba0Cd/iAAAAXElEQVRo3mNQQgMMCgwogGlQCTwUBAM5uIAMROAgXGB7I4gvUQgXkF8GEsj6CBcQfBojKHg0ThAhIG3eKFK7EUlAUH7trY+CyAKCL+cJogqAAQkCGE4flIGMnhwAu5gb8p5h72sAAAAASUVORK5CYII=" />
        </a>
    </div>
';
///////////////////////////////



$myu = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE (sex='zh')"), 0);
$barce = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE (sex='m')"), 0);
$umumiy = $myu + $barce;

echo '<div class="menu">';
echo $myu >= $barce ? 'Fan clubizmizda Manchester Yunayted ni muhlislari ko\'p! <br />' : 'Fan cllubimizda Barcelona ni muhlislari ko\'p!<br />';

echo 'Man-Yu: ' .$myu. ' | Barca: ' .$barce. ' | Umumiy: ' .$umumiy. '';

echo '</div>';

*/





?>
