Файл: setk/sys/fnc/status.php
Строк: 8
<?
function status($ID)
{
$avatar = mysql_fetch_array(mysql_query("SELECT id,id_gallery,ras FROM `gallery_foto` WHERE `id_user` = '$ID' AND `avatar` = '1' LIMIT 1"));
$ank = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $ID LIMIT 1"));
if (is_file(H."sys/gallery/50/$avatar[id].$avatar[ras]"))
{
if ($ank['pol'] == 1)
{
echo '<img class="avatar_m" src="/foto/foto50/' . $avatar['id'] . '.' . $avatar['ras'] . '" alt="Avatar" width="50" />';
}
else
{
echo '<img class="avatar_w" src="/foto/foto50/' . $avatar['id'] . '.' . $avatar['ras'] . '" alt="Avatar" width="50" />';
}
}
else
{
if ($ank['pol'] == 1)
{
echo '<img class="avatar_m" src="/style/user/m.png" width="50" alt="No Avatar" />';
}
else
{
echo '<img class="avatar_w" src="/style/user/w.png" width="50" alt="No Avatar" />';
}
}
}
?>