function getBlockCode_UpcomingPhoto()
 {
     $aEvent = $this->oDb->getUpcomingEvent(getParam('bx_events_main_upcoming_event_from_featured_only') ? true : false);
     if (!$aEvent) {
         return MsgBox(_t('_Empty'));
     }
     $aAuthor = getProfileInfo($aEvent['ResponsibleID']);
     $a = array('ID' => $aEvent['ResponsibleID'], 'Avatar' => $aEvent['PrimPhoto']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     bx_events_import('Voting');
     $oRating = new BxEventsVoting('bx_events', (int) $aEvent['ID']);
     $aVars = array('image_url' => !$aImage['no_image'] && $aImage['file'] ? $aImage['file'] : $this->oTemplate->getIconUrl('no-photo-110.png'), 'image_title' => !$aImage['no_image'] && $aImage['title'] ? $aImage['title'] : '', 'event_url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aEvent['EntryUri'], 'event_title' => $aEvent['Title'], 'event_start' => getLocaleDate($aEvent['EventStart']), 'event_start_in' => defineTimeInterval($aEvent['EventStart']), 'author_title' => _t('_From'), 'author_username' => $aAuthor['NickName'], 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aEvent['ID']) : '', 'participants' => $aEvent['FansCount'], 'country_city' => '<a href="' . $this->oConfig->getBaseUri() . 'browse/country/' . strtolower($aEvent['Country']) . '">' . _t($GLOBALS['aPreValues']['Country'][$aEvent['Country']]['LKey']) . '</a>' . (trim($aEvent['City']) ? ', ' . $aEvent['City'] : ''), 'place' => $aEvent['Place'], 'flag_image' => genFlag($aEvent['Country']));
     return $this->oTemplate->parseHtmlByName('main_event', $aVars);
 }
 function getBlockCode_UpcomingPhoto()
 {
     $aEvent = $this->oDb->getUpcomingEvent(getParam('bx_events_main_upcoming_event_from_featured_only') ? true : false);
     if (!$aEvent) {
         return false;
     }
     $aAuthor = getProfileInfo($aEvent['ResponsibleID']);
     $a = array('ID' => $aEvent['ResponsibleID'], 'Avatar' => $aEvent['PrimPhoto']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     bx_events_import('Voting');
     $oRating = new BxEventsVoting('bx_events', (int) $aEvent['ID']);
     $sEventUrl = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aEvent['EntryUri'];
     $aVars = array('bx_if:image' => array('condition' => !$aImage['no_image'] && $aImage['file'], 'content' => array('image_url' => !$aImage['no_image'] && $aImage['file'] ? $aImage['file'] : '', 'image_title' => !$aImage['no_image'] && $aImage['title'] ? $aImage['title'] : '', 'event_url' => $sEventUrl)), 'event_url' => $sEventUrl, 'event_title' => $aEvent['Title'], 'event_start_in' => $this->oMain->_formatDateInBrowse($aEvent), 'author_title' => _t('_From'), 'author_username' => getNickName($aAuthor['ID']), 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aEvent['ID']) : '', 'participants' => $aEvent['FansCount'], 'country_city' => $this->oMain->_formatLocation($aEvent, true, true), 'place' => $aEvent['Place']);
     return $this->oTemplate->parseHtmlByName('main_event', $aVars);
 }