<?
//----------------аватарка в списках--------------//
function status($id){
	global $set;
	$p = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id`='$id'  LIMIT 1"));
	$a = mysql_fetch_array(mysql_query("SELECT * FROM `gallery_foto` WHERE `id_user`='$id' AND `avatar`='1' LIMIT 1"));
	
	if (is_file(H."sys/gallery/50/$a[id].$a[ras]"))
	echo "<img class='status' src='/foto/foto50/$a[id].$a[ras]' alt='$a[name]' width='45'> ";
	elseif ($id == 0)
	echo "<img src='/style/user/system.png' alt='avatar' width='45'> ";
	else
	echo "<img src='/style/icons/avatar.png' alt='avatar' width='45'> ";
	
}
//------------------------------------------------//
?>
