Файл: core/cuctema/function/avatar.php
Строк: 25
<?
function avatar($id, $a_h=NULL, $big=NULL)
{
global $set;
?>
<style>
.avatar {
border: 1px solid rgb(206, 206, 206);
padding: 1px 1px 1px 1px;
}
.avatar:hover {
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Для Firefox */
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Для Safari и Chrome */
box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Параметры тени */
}
</style>
<?
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$id'"));
if($ank['avatar']!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id` = '$ank[avatar]'"),0)!=0)
{
$foto=mysql_fetch_array(mysql_query("SELECT * FROM `gallery_foto` WHERE `id` = '$ank[avatar]'"));
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `id` = '$foto[id_gallery]' AND `id_user` = '$ank[id]'"),0)!=0)
{
echo "".($a_h==1?"<a href='/foto/$foto[id_gallery]/$foto[id]/'>":null)."<img ".($a_h==1?"class='avatar'":null)." src='/foto/foto".($big==1?"128":"48")."/$foto[id].$foto[ras]' alt='$ank[nick]' title='".$foto['name']."'/>".($a_h==1?"</a>":null)."";
}
else echo "<img src='/images/no_avatar/".($ank['pol']==0?"wo":null)."man.png'/>";
}
else echo "<img src='/images/no_avatar/".($ank['pol']==0?"wo":null)."man.png'/>";
}
?>