mirror of
https://github.com/e107inc/e107.git
synced 2025-01-19 13:37:09 +01:00
34 lines
459 B
Python
34 lines
459 B
Python
global $loop_uid;
|
|
if($parm == "" && is_numeric($loop_uid))
|
|
{
|
|
$parm = $loop_uid;
|
|
}
|
|
if(is_numeric($parm))
|
|
{
|
|
if(intval($parm) == USERID)
|
|
{
|
|
$image = USERPHOTO;
|
|
}
|
|
else
|
|
{
|
|
$row = get_user_data(intval($parm));
|
|
$image=$row['user_sess'];
|
|
}
|
|
}
|
|
elseif($parm)
|
|
{
|
|
$image=$parm;
|
|
}
|
|
else
|
|
{
|
|
$image = USERPHOTO;
|
|
}
|
|
if($image && file_exists(e_FILE."public/avatars/".$image))
|
|
{
|
|
return "<img src='".e_FILE."public/avatars/{$image}' alt='' />";
|
|
}
|
|
else
|
|
{
|
|
return "";
|
|
}
|