<?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;background: rgb(213, 213, 213);" 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'] . '"> <span class="green"> [ON]</span> ID: ' . $uz['id'] . '
            <img style="float: right;width: 30px;" src="/images/msg.gif" />
        </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;background: rgb(213, 213, 213);" 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'] . '"> <span class="green"> [ON]</span> ID: ' . $uz['id'] . '
            <img style="float: right;width: 30px;" src="/images/msg.gif" />
        </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>';

?>