$id = (int)$_REQUEST['id'];
$db = Zend_Db_Table::getDefaultAdapter();
$sql ="select ud.header,ud.description, u.cms_user_id as id,ud.name,
(select value from cms_user_communication as uc where uc.user_id=ud.user_id and ud.deleted=0 and type=1 order by sorting limit 1 ) as phone,
(select value from cms_user_communication as uc2 where uc2.user_id=ud.user_id and ud.deleted=0 and type=4 order by sorting limit 1 ) as email,
(select value from cms_user_communication as uc2 where uc2.user_id=ud.user_id and ud.deleted=0 and type=5 order by sorting limit 1 ) as www
from cms_users as u, cms_user_data as ud, cms_users_groups as ug
where
u.cms_user_id= ud.user_id and u.deleted=0 and
u.cms_user_id=ug.user_id and u.cms_user_id=$id and ud.deleted=0 ";
$res =$db->fetchRow($sql);
$sql = "select * from cms_user_addresses as a where a.user_id=$id and a.deleted=0 order by sorting limit 1 ";
$add =$db->fetchRow($sql);
?>
echo $res['description'];?>
echo $res['name'];?>
ul. echo $add['street'];?>
echo $add['zipcode'];?> echo $add['city'];?>
tel: echo $res['phone'];?>
e-mail: echo $res['email'];?>
www: echo $res['www'];?>
echo $res['description'];?>