Файл: vsime.com/system/functions/show_avatar.php
Строк: 26
<?
function show_avatar($user_id, $size, $link=0, $show=0)
{
global $dbi, $config;
$prev = array();
if ($size == 'big') {
$prev['width'] = WapWeb_show(65, 70);
$prev['height'] = WapWeb_show(65, 70);
} else {
$prev['width'] = 65;
$prev['height'] = 65;
}
$ank = profile($user_id);
if ($show == 0 && $config['web']==false)
{
} else {
if ($ank['id'] != 0)
{
if ($ank['avatar'] != 0 && mysqli_result("SELECT COUNT(*) FROM `foto` WHERE `id` = '$ank[avatar]'") != 0)
{
$avatar = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `foto` WHERE `id` = '$ank[avatar]'"));
echo ($link == 1?"<a href='/fotos/?foto=$avatar[id]'>":NULL);
echo ffs_screen($avatar['id'], 'foto', $prev['width'], $prev['height'], 1, " class='avatar'");
echo ($link == 1?"</a>":NULL)."n";
} else {
if ($ank['anketa']['pol'] == 0)echo "<img src='/i/user_no_avatar/female.png' class='avatar' />n";
else echo "<img src='/i/user_no_avatar/male.png' class='avatar' />n";
}
} else echo "<img src='/i/user_no_avatar/female.png' class='avatar' />n";
}
}
?>