BxBaseServiceProfiles.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinCore Dolphin Core
  7. * @{
  8. */
  9. /**
  10. * System service for profiles handling functionality.
  11. */
  12. class BxBaseServiceProfiles extends BxDol {
  13. public function __construct() {
  14. parent::__construct();
  15. }
  16. public function serviceProfilesList ($iAccountId = 0) {
  17. bx_import('BxDolProfileQuery');
  18. $oProfilesQuery = BxDolProfileQuery::getInstance();
  19. $aProfiles = $oProfilesQuery->getProfilesByAccount($iAccountId ? $iAccountId : getLoggedId());
  20. if (!$aProfiles)
  21. return false;
  22. $s = '';
  23. foreach ($aProfiles as $aProfile)
  24. if ($aProfile['type'] != 'system')
  25. $s .= BxDolService::call($aProfile['type'], 'profile_thumb', array($aProfile['content_id']));
  26. if (!$s)
  27. $s = MsgBox(_t('_sys_txt_empty'));
  28. return $s . '<div class="bx-clear"></div>';
  29. }
  30. }
  31. /** @} */