本文整理汇总了PHP中Phpfox::getPhraseT方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::getPhraseT方法的具体用法?PHP Phpfox::getPhraseT怎么用?PHP Phpfox::getPhraseT使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::getPhraseT方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
/**
* Controller
*/
public function process()
{
list($aGroups, $aModules, $aProductGroups) = Phpfox::getService('admincp.setting.group')->get();
$aCond = array();
$aUrl = array();
$sSettingTitle = '';
if ($sSettingId = $this->request()->get('setting-id')) {
$aCond[] = " AND setting.setting_id = " . (int) $sSettingId;
$aUrl = array('setting', 'edit', 'setting-id' => $sSettingId);
}
if ($sGroupId = $this->request()->get('group-id')) {
$aCond[] = " AND setting.group_id = '" . Phpfox_Database::instance()->escape($sGroupId) . "' AND setting.is_hidden = 0 ";
$aUrl = array('setting', 'edit', 'group-id' => $sGroupId);
foreach ($aGroups as $aGroup) {
if ($aGroup['group_id'] == $sGroupId) {
$sSettingTitle = $aGroup['var_name'];
break;
}
}
}
if ($iModuleId = $this->request()->get('module-id')) {
$aCond[] = " AND setting.module_id = '" . Phpfox_Database::instance()->escape($iModuleId) . "' AND setting.is_hidden = 0 ";
$aUrl = array('setting', 'edit', 'module-id' => $iModuleId);
foreach ($aModules as $aModule) {
if ($aModule['module_id'] == $iModuleId) {
$sSettingTitle = $aModule['module_id'];
break;
}
}
}
if ($sProductId = $this->request()->get('product-id')) {
$aCond[] = " AND setting.product_id = '" . Phpfox_Database::instance()->escape($sProductId) . "' AND setting.is_hidden = 0 ";
$aUrl = array('setting', 'edit', 'product-id' => $sProductId);
foreach ($aProductGroups as $aProduct) {
if ($aProduct['product_id'] == $sProductId) {
$sSettingTitle = $aProduct['var_name'];
break;
}
}
}
$aSettings = Phpfox::getService('admincp.setting')->get($aCond);
if ($aVals = $this->request()->getArray('val')) {
if (Phpfox::getService('admincp.setting.process')->update($aVals)) {
// $this->url()->send('admincp', $aUrl, Phpfox::getPhrase('admincp.updated'));
return ['updated' => true];
}
}
$sWatermarkImage = Phpfox::getParam('core.url_watermark') . sprintf(Phpfox::getParam('core.watermark_image'), '') . '?v=' . uniqid();
if (!file_exists(Phpfox::getParam('core.dir_watermark') . sprintf(Phpfox::getParam('core.watermark_image'), '')) && Phpfox::getParam('core.allow_cdn')) {
$sWatermarkImage = Phpfox::getLib('cdn')->getUrl(str_replace(PHPFOX_DIR, '', $sWatermarkImage));
}
if (Phpfox::isModule($sSettingTitle)) {
$sSettingTitle = Phpfox_Locale::instance()->translate($sSettingTitle, 'module');
}
$this->template()->setSectionTitle($sSettingTitle);
$this->template()->setBreadCrumb(Phpfox::getPhrase('admincp.manage_settings'), $this->url()->makeUrl('admincp.setting'))->setBreadCrumb(Phpfox::getPhraseT($sSettingTitle, 'module'), null, true)->setTitle(Phpfox::getPhrase('admincp.manage_settings'))->assign(array('aGroups' => $aGroups, 'aModules' => $aModules, 'aProductGroups' => $aProductGroups, 'aSettings' => $aSettings, 'sSettingTitle' => $sSettingTitle, 'sWatermarkImage' => $sWatermarkImage));
($sPlugin = Phpfox_Plugin::get('admincp.component_controller_setting_edit_process')) ? eval($sPlugin) : false;
}
示例2: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$oUser = Phpfox::getService('user');
$aUser = $oUser->getByUserName($this->request()->get('user_name'));
$bIsPage = $aUser['profile_page_id'] > 0 ? true : false;
if ($bIsPage) {
$aUser['page'] = Phpfox::getService('pages')->getPage($aUser['profile_page_id']);
// list($iTotalMembers, $aMembers) = Phpfox::getService('pages')->getMembers($aUser['page']['page_id']);
// $aUser['page_members'] = $aMembers;
}
$aUser['birthday_time_stamp'] = $aUser['birthday'];
$aUser['birthday'] = $oUser->age($aUser['birthday']);
$aUser['gender_name'] = $oUser->gender($aUser['gender']);
$aUser['birthdate_display'] = $oUser->getProfileBirthDate($aUser);
$aUser['location'] = Phpfox::getPhraseT(Phpfox::getService('core.country')->getCountry($aUser['country_iso']), 'country');
if (isset($aUser['country_child_id']) && $aUser['country_child_id'] > 0) {
$aUser['location_child'] = Phpfox::getService('core.country')->getChild($aUser['country_child_id']);
}
$aUser['is_friend'] = false;
$iTotal = 0;
$aMutual = array();
if ($aUser['user_id'] != Phpfox::getUserId() && !$bIsPage) {
if (Phpfox::isUser() && Phpfox::isModule('friend')) {
$aUser['is_friend'] = Phpfox::getService('friend')->isFriend(Phpfox::getUserId(), $aUser['user_id']);
if (!$aUser['is_friend']) {
$aUser['is_friend'] = Phpfox::getService('friend.request')->isRequested(Phpfox::getUserId(), $aUser['user_id']) ? 2 : false;
}
}
list($iTotal, $aMutual) = Phpfox::getService('friend')->getMutualFriends($aUser['user_id'], 4);
}
$bShowBDayInput = false;
if (!empty($aUser['birthday'])) {
$iDays = Phpfox::getLib('date')->daysToDate($aUser['birthday'], null, false);
} else {
$iDays = 999;
}
if ($iDays < 1 && $iDays > 0) {
$bShowBDayInput = true;
}
if (empty($aUser['dob_setting'])) {
switch (Phpfox::getParam('user.default_privacy_brithdate')) {
case 'month_day':
$aUser['dob_setting'] = '1';
break;
case 'show_age':
$aUser['dob_setting'] = '2';
break;
case 'hide':
$aUser['dob_setting'] = '3';
break;
}
}
($sPlugin = Phpfox_Plugin::get('user.component_block_tooltip_1')) ? eval($sPlugin) : false;
$this->template()->assign(array('bIsPage' => $bIsPage, 'aUser' => $aUser, 'iMutualTotal' => $iTotal, 'aMutualFriends' => $aMutual, 'bShowBDay' => $bShowBDayInput));
}
示例3: getChild
public function getChild($iChildId)
{
static $bIsChecked = false;
if ($bIsChecked === false) {
$sCacheId = $this->cache()->set('country_child_' . Phpfox_Locale::instance()->getLangId());
if (!($this->_aChildren = $this->cache()->get($sCacheId))) {
$aRows = $this->database()->select('child_id, name')->from(Phpfox::getT('country_child'))->execute('getRows');
foreach ($aRows as $aRow) {
$this->_aChildren[$aRow['child_id']] = Phpfox_Locale::instance()->isPhrase('core.translate_country_child_' . strtolower($aRow['child_id'])) ? Phpfox::getPhrase('core.translate_country_child_' . strtolower($aRow['child_id'])) : $aRow['name'];
}
$this->cache()->save($sCacheId, $this->_aChildren);
}
$bIsChecked = true;
}
return isset($this->_aChildren[$iChildId]) ? Phpfox::getPhraseT($this->_aChildren[$iChildId], 'country_child') : '';
}
示例4: process
/**
* Controller
*/
public function process()
{
$aUser = Phpfox::getService('user')->get($this->request()->get('req1'), false);
if (!isset($aUser['user_id'])) {
return Phpfox_Module::instance()->setController('error.404');
}
define('PHPFOX_IS_USER_PROFILE', true);
$sImage = Phpfox::getLib('image.helper')->display(array_merge(array('user' => Phpfox::getService('user')->getUserFields(true, $aUser)), array('title' => $aUser['full_name'], 'path' => 'core.url_user', 'file' => $aUser['user_image'], 'suffix' => '_120', 'max_width' => 120, 'max_height' => 120, 'no_default' => Phpfox::getUserId() == $aUser['user_id'] ? false : true, 'no_link' => true)));
$oUser = Phpfox::getService('user');
$aUser['gender_name'] = $oUser->gender($aUser['gender']);
$aUser['birthday_time_stamp'] = $aUser['birthday'];
$aUser['birthday'] = $oUser->age($aUser['birthday']);
$aUser['location'] = Phpfox::getPhraseT(Phpfox::getService('core.country')->getCountry($aUser['country_iso']), 'country');
if (isset($aUser['country_child_id']) && $aUser['country_child_id'] > 0) {
$aUser['location_child'] = Phpfox::getService('core.country')->getChild($aUser['country_child_id']);
}
$this->setParam('aUser', $aUser);
$this->template()->setMobileHeader(array('profile.css' => 'style_css'));
if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'profile.view_profile')) {
return Phpfox_Module::instance()->setController('profile.private');
}
Phpfox::getUserParam('profile.can_view_users_profile', true);
$aProfileMenu = array($this->url()->makeUrl($aUser['user_name']) => Phpfox::getPhrase('profile.wall'));
if (Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'profile.basic_info')) {
$aProfileMenu[$this->url()->makeUrl($aUser['user_name'], 'info')] = Phpfox::getPhrase('profile.info');
}
$this->template()->assign(array('aUser' => $aUser, 'sProfileImage' => $sImage, 'bMobileProfileIsActive' => true, 'aMobileSubMenus' => $aProfileMenu, 'sActiveMobileSubMenu' => $this->url()->makeUrl($aUser['user_name'], $this->request()->get('req2') == '' ? null : $this->request()->get('req2'))));
if ($this->request()->get('req2') == 'info') {
return Phpfox_Module::instance()->setController('profile.info-mobile');
}
if ($aVals = $this->request()->getArray('val')) {
Phpfox::isUser(true);
if (isset($aVals['status'])) {
if (!empty($aVals['status'])) {
if ($iId = Phpfox::getService('user.process')->updateStatus(Phpfox::getUserId(), $aVals['status'])) {
$this->url()->send($aUser['user_name']);
}
}
} else {
Phpfox::getUserParam('comment.can_post_comments', true);
if (!Phpfox::getService('user.privacy')->hasAccess($aVals['item_id'], 'comment.add_comment')) {
Phpfox_Error::set(Phpfox::getPhrase('feed.you_do_not_have_permission_to_add_a_comment_on_this_persons_profile'));
}
if (($iFlood = Phpfox::getUserParam('comment.comment_post_flood_control')) !== 0) {
$aFlood = array('action' => 'last_post', 'params' => array('field' => 'time_stamp', 'table' => Phpfox::getT('feed'), 'condition' => 'type_id = \'comment_profile_my\' AND user_id = ' . Phpfox::getUserId(), 'time_stamp' => $iFlood * 60));
// actually check if flooding
if (Phpfox::getLib('spam')->check($aFlood)) {
Phpfox_Error::set(Phpfox::getPhrase('feed.posting_a_comment_a_little_too_soon') . ' ' . Phpfox::getLib('spam')->getWaitTime());
}
}
if (Phpfox::getLib('parse.format')->isEmpty($aVals['feed_text'])) {
Phpfox_Error::set(Phpfox::getPhrase('feed.add_some_text_to_your_comment'));
}
if (Phpfox_Error::isPassed() && ($iId = Phpfox::getService('feed.process')->addComment($aVals))) {
$this->url()->send($aUser['user_name']);
}
}
}
$bHideFeedOnProfile = false;
if (Phpfox::isModule('feed')) {
$iFeedPage = $this->request()->get('page', 1);
list($iFeedCount, $aFeeds) = Feed_Service_Feed::instance()->get($aUser['user_id'], null, $iFeedPage);
if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'feed.display_on_profile')) {
$iFeedCount = 0;
$aFeeds = array();
$bHideFeedOnProfile = true;
}
$iTotalFeeds = (int) Phpfox::getComponentSetting(Phpfox::getUserId(), 'feed.feed_display_limit_dashboard', Phpfox::getParam('feed.feed_display_limit'));
Phpfox_Pager::instance()->set(array('page' => $iFeedPage, 'size' => $iTotalFeeds, 'count' => $iFeedCount));
$this->template()->setMobileHeader(array('feed.css' => 'module_feed'))->assign(array('aFeeds' => $aFeeds));
}
$this->template()->assign(array('bHideFeedOnProfile' => $bHideFeedOnProfile));
}
示例5: process
//.........这里部分代码省略.........
header('HTTP/1.1 301 Moved Permanently');
$this->url()->send($aActualUser['user_name'], $aActualRequests);
}
}
}
// $this->url()->send(Phpfox::getUserBy('user_name'), $this->request()->get('req2'));
}
if (Phpfox::isModule('pages') && Phpfox::getService('pages')->isPage($this->request()->get('req1'))) {
return Phpfox::getLib('module')->setController('pages.view');
}
return Phpfox::getLib('module')->setController('error.404');
}
if (($sSection == 'info' && $this->request()->get('req3') == 'design' || $sSection == 'designer') && $aRow['user_id'] == Phpfox::getUserId() && Phpfox::getUserParam('profile.can_custom_design_own_profile')) {
define('PHPFOX_IN_DESIGN_MODE', true);
define('PHPFOX_CAN_MOVE_BLOCKS', true);
}
$oUser = Phpfox::getService('user');
if (empty($aRow['dob_setting'])) {
switch (Phpfox::getParam('user.default_privacy_brithdate')) {
case 'month_day':
$aRow['dob_setting'] = '1';
break;
case 'show_age':
$aRow['dob_setting'] = '2';
break;
case 'hide':
$aRow['dob_setting'] = '3';
break;
}
}
$aRow['gender_name'] = $oUser->gender($aRow['gender']);
$aRow['birthday_time_stamp'] = $aRow['birthday'];
$aRow['birthday'] = $oUser->age($aRow['birthday']);
$aRow['location'] = Phpfox::getPhraseT(Phpfox::getService('core.country')->getCountry($aRow['country_iso']), 'country');
if (isset($aRow['country_child_id']) && $aRow['country_child_id'] > 0) {
$aRow['location_child'] = Phpfox::getService('core.country')->getChild($aRow['country_child_id']);
}
$aRow['birthdate_display'] = Phpfox::getService('user')->getProfileBirthDate($aRow);
$aRow['is_user_birthday'] = empty($aRow['birthday_time_stamp']) ? false : (int) floor(Phpfox::getLib('date')->daysToDate($aRow['birthday_time_stamp'], null, false)) === 0 ? true : false;
if (empty($aRow['landing_page'])) {
$aRow['landing_page'] = Phpfox::getParam('profile.profile_default_landing_page');
}
$this->setParam('aUser', $aRow);
define('PHPFOX_CURRENT_TIMELINE_PROFILE', $aRow['user_id']);
$this->template()->setHeader('cache', array('profile.css' => 'style_css'))->assign(array('aUser' => $aRow, 'aProfileLinks' => Phpfox::getService('profile')->getProfileMenu($aRow), 'bIsBlocked' => Phpfox::isUser() ? Phpfox::getService('user.block')->isBlocked(Phpfox::getUserId(), $aRow['user_id']) : false, 'bOwnProfile' => $aRow['user_id'] == Phpfox::getUserId()));
if (Phpfox::getService('user.block')->isBlocked($aRow['user_id'], Phpfox::getUserId()) && !Phpfox::getUserParam('user.can_override_user_privacy')) {
return Phpfox::getLib('module')->setController('profile.private');
}
Phpfox::getUserParam('profile.can_view_users_profile', true);
// Set it globaly that we are viewing a users profile, sometimes variables don't help.
if (!defined('PHPFOX_IS_USER_PROFILE')) {
define('PHPFOX_IS_USER_PROFILE', true);
}
if ($aRow['designer_style_id']) {
$this->template()->setHeader('<script type="text/javascript">bCanByPassClick = true; sClickProfileName = \'' . $aRow['user_name'] . '\';</script>')->setStyle(array('style_id' => $aRow['designer_style_id'], 'style_folder_name' => $aRow['designer_style_folder'], 'theme_folder_name' => $aRow['designer_theme_folder'], 'theme_parent_id' => $aRow['theme_parent_id'], 'total_column' => $aRow['total_column'], 'l_width' => $aRow['l_width'], 'c_width' => $aRow['c_width'], 'r_width' => $aRow['r_width']));
}
if (!empty($aRow['css_hash'])) {
define('PHPFOX_TEMPLATE_CSS_FILE', Phpfox::getService('theme')->getCss(array('table' => 'user_css', 'field' => 'user_id', 'value' => $aRow['user_id'], 'hash' => $aRow['css_hash'], 'table_code' => 'user_css_code')));
}
($sPlugin = Phpfox_Plugin::get('profile.component_controller_index_process_is_sub_section')) ? eval($sPlugin) : false;
if (Phpfox::isModule('friend') && Phpfox::getParam('friend.friends_only_profile') && empty($aRow['is_friend']) && !Phpfox::getUserParam('user.can_override_user_privacy') && $aRow['user_id'] != Phpfox::getUserId()) {
return Phpfox::getLib('module')->setController('profile.private');
}
if ($bIsSubSection === true) {
$this->template()->setUrl(Phpfox::callback($sSection . '.getProfileLink'));
return Phpfox::getLib('module')->setController($sSection . '.profile');
示例6: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
// $aUser = (PHPFOX_IS_AJAX ? Phpfox::getService('user')->get(Phpfox::getUserId(), true) : $this->getParam('aUser'));
$aUser = $this->getParam('aUser');
/*
if (PHPFOX_IS_AJAX)
{
$aUser['gender_name'] = Phpfox::getService('user')->gender($aUser['gender']);
$aUser['birthday_time_stamp'] = $aUser['birthday'];
$aUser['birthday'] = Phpfox::getService('user')->age($aUser['birthday']);
$aUser['location'] = Phpfox::getService('core.country')->getCountry($aUser['country_iso']);
$this->template()->assign('aUser', $aUser);
}
*/
if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'profile.basic_info')) {
return false;
}
$aUser['bRelationshipHeader'] = true;
$sRelationship = Phpfox::getService('custom')->getRelationshipPhrase($aUser);
$aUserDetails = array();
if (!empty($aUser['gender'])) {
$aUserDetails[Phpfox::getPhrase('profile.gender')] = '<a href="' . $this->url()->makeUrl('user.browse', array('gender' => $aUser['gender'])) . '">' . $aUser['gender_name'] . '</a>';
}
$aUserDetails = array_merge($aUserDetails, $aUser['birthdate_display']);
$sExtraLocation = '';
if (!empty($aUser['city_location'])) {
$sExtraLocation .= '<div class="p_2"><a href="' . $this->url()->makeUrl('user.browse', array('location' => $aUser['country_iso'], 'state' => $aUser['country_child_id'], 'city-name' => $aUser['city_location'])) . '">' . Phpfox::getLib('parse.output')->clean($aUser['city_location']) . '</a> »</div>';
}
if ($aUser['country_child_id'] > 0) {
$sExtraLocation .= '<div class="p_2"><a href="' . $this->url()->makeUrl('user.browse', array('location' => $aUser['country_iso'], 'state' => $aUser['country_child_id'])) . '">' . Phpfox::getService('core.country')->getChild($aUser['country_child_id']) . '</a> »</div>';
}
if (!empty($aUser['country_iso'])) {
$aUserDetails[Phpfox::getPhrase('profile.location')] = $sExtraLocation . '<a href="' . $this->url()->makeUrl('user.browse', array('location' => $aUser['country_iso'])) . '">' . Phpfox::getPhraseT($aUser['location'], 'country') . '</a>';
}
if ((int) $aUser['last_login'] > 0 && (!$aUser['is_invisible'] || Phpfox::getUserParam('user.can_view_if_a_user_is_invisible') && $aUser['is_invisible'])) {
$aUserDetails[Phpfox::getPhrase('profile.last_login')] = Phpfox::getLib('date')->convertTime($aUser['last_login'], 'core.profile_time_stamps');
}
if ((int) $aUser['joined'] > 0) {
$aUserDetails[Phpfox::getPhrase('profile.member_since')] = Phpfox::getLib('date')->convertTime($aUser['joined'], 'core.profile_time_stamps');
}
if (Phpfox::getUserGroupParam($aUser['user_group_id'], 'profile.display_membership_info')) {
$aUserDetails[Phpfox::getPhrase('profile.membership')] = (empty($aUser['icon_ext']) ? '' : '<img src="' . Phpfox::getParam('core.url_icon') . $aUser['icon_ext'] . '" class="v_middle" alt="' . Phpfox::getLib('locale')->convert($aUser['title']) . '" title="' . Phpfox::getLib('locale')->convert($aUser['title']) . '" /> ') . $aUser['prefix'] . Phpfox::getLib('locale')->convert($aUser['title']) . $aUser['suffix'];
}
$aUserDetails[Phpfox::getPhrase('profile.profile_views')] = $aUser['total_view'];
if (Phpfox::isModule('rss') && Phpfox::getParam('rss.display_rss_count_on_profile') && Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'rss.display_on_profile')) {
$aUserDetails[Phpfox::getPhrase('profile.rss_subscribers')] = $aUser['rss_count'];
}
$sEditLink = '';
if ($aUser['user_id'] == Phpfox::getUserId()) {
$sEditLink = '<div class="js_edit_header_bar">';
$sEditLink .= '<span id="js_user_basic_info" style="display:none;"><img src="' . $this->template()->getStyle('image', 'ajax/small.gif') . '" alt="" class="v_middle" /></span>';
$sEditLink .= '<a href="' . Phpfox::getLib('url')->makeUrl('user.profile') . '" id="js_user_basic_edit_link">';
$sEditLink .= '<img src="' . $this->template()->getStyle('image', 'misc/page_white_edit.png') . '" alt="" class="v_middle" />';
$sEditLink .= '</a>';
$sEditLink .= '</div>';
}
// Get the Smoker and Drinker details
$aUserPanel = Phpfox::getService('custom')->getUserPanelForUser($aUser['user_id']);
foreach ($aUserPanel as $sName => $aField) {
//$aUserDetails[Phpfox::getPhrase($aField['phrase_var_name'])] = Phpfox::getPhrase($aField['phrase_chosen']);
}
$this->template()->assign(array('aUserDetails' => $aUserDetails, 'sBlockJsId' => 'profile_basic_info', 'sRelationship' => $sRelationship));
$this->setParam('aRatingCallback', array('type' => 'user', 'total_rating' => Phpfox::getPhrase('profile.total_rating_ratings', array('total_rating' => $aUser['total_rating'])), 'default_rating' => $aUser['total_score'], 'item_id' => $aUser['user_id'], 'stars' => range(1, 10)));
($sPlugin = Phpfox_Plugin::get('profile.component_block_info')) ? eval($sPlugin) : false;
if (!Phpfox::isMobile()) {
$this->template()->assign(array('sHeader' => $sEditLink . Phpfox::getPhrase('profile.basic_info'), 'sEditLink' => $sEditLink));
return 'block';
}
}
示例7: process
/**
* Class process method wnich is used to execute this component.
*/
public function process()
{
$oUser = Phpfox::getService('user');
$aUser = $oUser->getByUserName($this->request()->get('user_name'));
$bIsPage = ($aUser['profile_page_id'] > 0 ? true : false);
if ($bIsPage)
{
$aUser['page'] = Phpfox::getService('pages')->getPage($aUser['profile_page_id']);
// list($iTotalMembers, $aMembers) = Phpfox::getService('pages')->getMembers($aUser['page']['page_id']);
// $aUser['page_members'] = $aMembers;
}
$aUser['birthday_time_stamp'] = $aUser['birthday'];
$aUser['birthday'] = $oUser->age($aUser['birthday']);
$aUser['gender_name'] = $oUser->gender($aUser['gender']);
$aUser['birthdate_display'] = $oUser->getProfileBirthDate($aUser);
$aUser['location'] = Phpfox::getPhraseT(Phpfox::getService('core.country')->getCountry($aUser['country_iso']), 'country');
if (isset($aUser['country_child_id']) && $aUser['country_child_id'] > 0)
{
$aUser['location_child'] = Phpfox::getService('core.country')->getChild($aUser['country_child_id']);
}
$aUser['is_friend'] = false;
$iTotal = 0;
$aMutual = array();
if ($aUser['user_id'] != Phpfox::getUserId() && !$bIsPage)
{
if (Phpfox::isUser() && Phpfox::isModule('friend'))
{
$aUser['is_friend'] = Phpfox::getService('friend')->isFriend(Phpfox::getUserId(), $aUser['user_id']);
if (!$aUser['is_friend'])
{
$aUser['is_friend'] = (Phpfox::getService('friend.request')->isRequested(Phpfox::getUserId(), $aUser['user_id']) ? 2 : false);
}
}
list($iTotal, $aMutual) = Phpfox::getService('friend')->getMutualFriends($aUser['user_id'], 4);
}
$bShowBDayInput = false;
if (!empty($aUser['birthday']))
{
$iDays = Phpfox::getLib('date')->daysToDate($aUser['birthday'], null, false);
}
else
{
$iDays = 999;
}
if ($iDays < 1 && $iDays > 0)
{
$bShowBDayInput = true;
}
$this->template()->assign(array(
'bIsPage' => $bIsPage,
'aUser' => $aUser,
'iMutualTotal' => $iTotal,
'aMutualFriends' => $aMutual,
'bShowBDay' => $bShowBDayInput
)
);
}