<?
function aut()
{
global $set;
if ($set['web']==false)
{
global $user;
if (isset($user))
{
}
else
{
echo "<div class='title'>";
echo "<a href='/aut.php'>[Вход]</a> <a href='/reg.php'>[Регистрация]</a><br />\n";
echo "</div>\n";
}
$knj=mysql_result(mysql_query("SELECT COUNT(*) FROM `present_jurnal` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0);
if ($knj>0)
echo "<a href=\"/present/jurnal.php\" title=\"Вам подарок\">Вам подарок ($knj)</a><br />\n";
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE `to` = '$user[id]' LIMIT 1"), 0) > 0)
{
echo '<a href="/frend_new.php">Предложение дружбы</a><br />';
}
}
}
?>