Esempio n. 1
0
 public static function fillProfileArray($a, $sImage = 'icon', $iIdViewer = 0)
 {
     if (!$iIdViewer) {
         $iIdViewer = (int) $_COOKIE['memberID'];
     }
     $sImageKey = ucfirst($sImage);
     $sImage = BxDolXMLRPCUtil::getThumbLink($a['ID'], $sImage);
     bx_import('BxDolAlbums');
     $oBxDolXMLRPCMedia = new BxDolXMLRPCMedia();
     $aRet = array('user_title' => new xmlrpcval($GLOBALS['oFunctions']->getUserTitle($a['ID'])), 'user_info' => new xmlrpcval($GLOBALS['oFunctions']->getUserInfo($a['ID']) . ' '), 'user_location' => new xmlrpcval(BxDolXMLRPCUtil::getUserLocation($a) . ' '), 'user_friend' => new xmlrpcval(is_friends($a['ID'], (int) $iIdViewer) ? 1 : 0), 'ID' => new xmlrpcval($a['ID']), 'Title' => new xmlrpcval($GLOBALS['oFunctions']->getUserTitle($a['ID'])), 'Nick' => new xmlrpcval($a['NickName']), 'Sex' => new xmlrpcval($a['Sex']), 'Age' => new xmlrpcval(age($a['DateOfBirth'])), 'Country' => new xmlrpcval(_t($GLOBALS['aPreValues']['Country'][$a['Country']]['LKey'])), 'City' => new xmlrpcval($a['City']), 'CountPhotos' => new xmlrpcval($oBxDolXMLRPCMedia->_getMediaCount('photo', $iId, $iIdViewer)), 'CountVideos' => new xmlrpcval($oBxDolXMLRPCMedia->_getMediaCount('video', $iId, $iIdViewer)), 'CountSounds' => new xmlrpcval($oBxDolXMLRPCMedia->_getMediaCount('music', $iId, $iIdViewer)), 'CountFriends' => new xmlrpcval(getFriendNumber($a['ID'])), $sImageKey => new xmlrpcval($sImage));
     bx_import('BxDolAlerts');
     $oZ = new BxDolAlerts('mobile', 'user_info2', $a['ID'], $iIdViewer, array('profile' => &$a, 'return_data' => &$aRet));
     $oZ->alert();
     return $aRet;
 }