本文整理汇总了PHP中getMyFriendsEx函数的典型用法代码示例。如果您正苦于以下问题:PHP getMyFriendsEx函数的具体用法?PHP getMyFriendsEx怎么用?PHP getMyFriendsEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMyFriendsEx函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: response
/**
* Overwtire the method of parent class.
*
* @param BxDolAlerts $oAlert an instance of alert.
*/
function response($oAlert)
{
$sKey = $oAlert->sUnit . '_' . $oAlert->sAction;
$iCommentId = 0;
switch ($oAlert->sAction) {
case 'delete':
case 'delete_poll':
case 'delete_post':
$this->_oModule->_oDb->deleteActivityByObject($oAlert->sUnit, $oAlert->iObject);
return;
case 'commentPost':
if (!isset($oAlert->aExtras['comment_id']) || (int) $oAlert->aExtras['comment_id'] == 0) {
return;
}
$iCommentId = (int) $oAlert->aExtras['comment_id'];
break;
case 'commentRemoved':
if (!isset($oAlert->aExtras['comment_id']) || (int) $oAlert->aExtras['comment_id'] == 0) {
return;
}
$this->_oModule->_oDb->deleteActivityByObject($oAlert->sUnit, $oAlert->iObject, (int) $oAlert->aExtras['comment_id']);
return;
}
// call defined method;
if (!is_array($this->aInternalHandlers) || !array_key_exists($sKey, $this->aInternalHandlers)) {
return;
}
if (!BxDolRequest::serviceExists($this->aInternalHandlers[$sKey]['module_uri'], $this->aInternalHandlers[$sKey]['module_method'])) {
return;
}
// define functions parameters;
$aParams = array('action' => $oAlert->sAction, 'object_id' => $oAlert->iObject, 'sender_id' => $oAlert->iSender, 'extra_params' => $oAlert->aExtras);
$aResult = BxDolService::call($this->aInternalHandlers[$sKey]['module_uri'], $this->aInternalHandlers[$sKey]['module_method'], $aParams);
if (empty($aResult)) {
return;
}
// create new event;
// define recipent id;
$iRecipientId = isset($aResult['recipient_id']) ? $aResult['recipient_id'] : $oAlert->iObject;
if (isset($aResult['spy_type']) && $aResult['spy_type'] == 'content_activity' && $iRecipientId == $oAlert->iSender) {
$iRecipientId = 0;
}
$iEventId = 0;
if ($oAlert->iSender || !$oAlert->iSender && $this->_oModule->_oConfig->bTrackGuestsActivites) {
$iEventId = $this->_oModule->_oDb->createActivity($oAlert->sUnit, $oAlert->sAction, $oAlert->iObject, $iCommentId, $oAlert->iSender, $iRecipientId, $aResult);
}
if (!$iEventId) {
return;
}
// try to define all profile's friends;
$aFriends = getMyFriendsEx($oAlert->iSender);
if (empty($aFriends) || !is_array($aFriends)) {
return;
}
// attach event to friends;
foreach ($aFriends as $iFriendId => $aItems) {
$this->_oModule->_oDb->attachFriendEvent($iEventId, $oAlert->iSender, $iFriendId);
}
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:64,代码来源:BxSpyResponseContent.php
示例2: friends
function friends($aToken)
{
$iProfileId = (int) bx_get('id');
if (!($oProfile = $this->_getProfileWithAccessChecking($iProfileId))) {
return;
}
$this->output(array('user_id' => $iProfileId, 'friends' => getMyFriendsEx($iProfileId)));
}
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxOAuthAPI.php
示例3: response
/**
* Overwtire the method of parent class.
*
* @param BxDolAlerts $oAlert an instance of alert.
*/
function response($oAlert)
{
$sKey = $oAlert->sUnit . '_' . $oAlert->sAction;
// call defined method;
if (array_key_exists($sKey, $this->aInternalHandlers)) {
if (BxDolRequest::serviceExists($this->aInternalHandlers[$sKey]['module_uri'], $this->aInternalHandlers[$sKey]['module_method'])) {
// define functions parameters;
$aParams = array('action' => $oAlert->sAction, 'object_id' => $oAlert->iObject, 'sender_id' => $oAlert->iSender, 'extra_params' => $oAlert->aExtras);
$aResult = BxDolService::call($this->aInternalHandlers[$sKey]['module_uri'], $this->aInternalHandlers[$sKey]['module_method'], $aParams);
if ($aResult) {
// create new event;
//define recipent id;
$iRecipientId = isset($aResult['recipient_id']) ? $aResult['recipient_id'] : $oAlert->iObject;
if (isset($aResult['spy_type']) && $aResult['spy_type'] == 'content_activity' && $iRecipientId == $oAlert->iSender) {
$iRecipientId = 0;
}
$iEventId = 0;
if ($oAlert->iSender == 0 || !$oAlert->iSender) {
if ($this->_oModule->_oConfig->bTrackGuestsActivites) {
$iEventId = $this->_oModule->_oDb->createActivity($oAlert->iSender, $iRecipientId, $aResult);
}
} else {
$iEventId = $this->_oModule->_oDb->createActivity($oAlert->iSender, $iRecipientId, $aResult);
}
if ($iEventId) {
// try to define all profile's friends;
$aFriends = getMyFriendsEx($oAlert->iSender);
if ($aFriends && is_array($aFriends)) {
foreach ($aFriends as $iFriendId => $aItems) {
// attach event to friends;
$this->_oModule->_oDb->attachFriendEvent($iEventId, $oAlert->iSender, $iFriendId);
}
}
}
}
}
}
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:43,代码来源:BxSpyResponse.php
示例4: getBlockCode_Friends
function getBlockCode_Friends()
{
$iLimit = 10;
$sContent = $sPaginate = '';
$sAllFriends = 'viewFriends.php?iUser=' . $this->iMember;
// count all friends ;
$iCount = getFriendNumber($this->iMember);
if ($iCount == 0) {
return;
}
$iPages = ceil($iCount / $iLimit);
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1;
if ($iPage < 1) {
$iPage = 1;
}
if ($iPage > $iPages) {
$iPage = $iPages;
}
$sSqlFrom = ($iPage - 1) * $iLimit;
$sSqlLimit = "LIMIT {$sSqlFrom}, {$iLimit}";
$aFriends = getMyFriendsEx($this->iMember, '', 'image', $sSqlLimit);
$aTmplParams['bx_repeat:friends'] = array();
foreach ($aFriends as $iId => $aFriend) {
$aTmplParams['bx_repeat:friends'][] = array('content' => get_member_thumbnail($iId, 'none', true, 'visitor', array('is_online' => $aFriend[5])));
}
$sContent = $GLOBALS['oSysTemplate']->parseHtmlByName('member_friends.html', $aTmplParams);
$oPaginate = new BxDolPaginate(array('page_url' => BX_DOL_URL_ROOT . 'member.php', 'count' => $iCount, 'per_page' => $iLimit, 'page' => $iPage, 'on_change_page' => 'return !loadDynamicBlock({id}, \'member.php?page={page}&per_page={per_page}\');'));
$sPaginate = $oPaginate->getSimplePaginate($sAllFriends);
return array($sContent, array(), $sPaginate);
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:30,代码来源:BxBaseAccountView.php
示例5: serviceViewBlockAccount
function serviceViewBlockAccount($mixed, $iStart = -1, $iPerPage = -1, $sFilter = '', $sTimeline = '', $sType = 'id', $aModules = array())
{
$sContent = '';
$aOwner = $this->_oDb->getUser($mixed, $sType);
$this->_iOwnerId = $aOwner['id'];
$aFriends = getMyFriendsEx($this->_iOwnerId, '', '', 'LIMIT 20');
if (empty($aFriends)) {
return $this->_oTemplate->getEmpty(true);
}
$this->_iOwnerId = array_keys($aFriends);
if ($iStart == -1) {
$iStart = 0;
}
if ($iPerPage == -1) {
$iPerPage = $this->_oConfig->getPerPage('account');
}
if (empty($sFilter)) {
$sFilter = BX_WALL_FILTER_ALL;
}
//--- Prepare JavaScript paramaters ---//
$oJson = new Services_JSON();
$sOwnerId = implode(BX_WALL_DIVIDER_ID, $this->_iOwnerId);
ob_start();
?>
var <?php
echo $this->_sJsViewObject;
?>
= new BxWallView({
sActionUrl: '<?php
echo BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
?>
',
sObjName: '<?php
echo $this->_sJsViewObject;
?>
',
iOwnerId: '<?php
echo $sOwnerId;
?>
',
sAnimationEffect: '<?php
echo $this->_oConfig->getAnimationEffect();
?>
',
iAnimationSpeed: '<?php
echo $this->_oConfig->getAnimationSpeed();
?>
',
oRequestParams: <?php
echo $oJson->encode(array('WallOwnerId' => $sOwnerId, 'WallStart' => $iStart, 'WallPerPage' => $iPerPage, 'WallFilter' => $sFilter, 'WallTimeline' => $sTimeline, 'WallModules' => $aModules));
?>
});
<?php
$sJsContent = ob_get_clean();
//--- Is used with common Pagination
//$oPaginate = $this->_getPaginate($sFilter, $sTimeline, $aModules);
$aVariables = array('timeline' => $this->_getTimeline($iStart, $iPerPage, $sFilter, $sTimeline, $aModules), 'content' => $this->_getPosts('desc', $iStart, $iPerPage, $sFilter, $sTimeline, $aModules), 'view_js_content' => $sJsContent);
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView(array());
$oForm->addCssJs(true, true);
$this->_oTemplate->addCss(array('forms_adv.css', 'view.css'));
$this->_oTemplate->addJs(array('main.js', 'view.js'));
return array($this->_oTemplate->parseHtmlByName('view.html', $aVariables), array(), LoadingBox('bx-wall-view-loading'), false, 'getBlockCaptionMenu');
}
开发者ID:noormcs,项目名称:studoro,代码行数:64,代码来源:BxWallModule.php
示例6: showBlockFriends
function showBlockFriends($sCaption, $oParent, $bNoDB = false)
{
$iLimit = $this->iFriendsPerPage;
$sAllFriends = 'viewFriends.php?iUser=' . $this->_iProfileID;
$sProfileLink = getProfileLink($this->_iProfileID);
// count all friends ;
$iCount = getFriendNumber($this->_iProfileID);
$sPaginate = '';
if ($iCount) {
$iPages = ceil($iCount / $iLimit);
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1;
if ($iPage < 1) {
$iPage = 1;
}
if ($iPage > $iPages) {
$iPage = $iPages;
}
$sqlFrom = ($iPage - 1) * $iLimit;
if ($sqlFrom < 1) {
$sqlFrom = 0;
}
$sqlLimit = "LIMIT {$sqlFrom}, {$iLimit}";
} else {
return;
}
$aAllFriends = getMyFriendsEx($this->_iProfileID, '', 'image', $sqlLimit);
$iCurrCount = count($aAllFriends);
$aTmplVars = array('bx_repeat:friends' => array());
foreach ($aAllFriends as $iFriendID => $aFriendsPrm) {
$aTmplVars['bx_repeat:friends'][] = array('content' => get_member_thumbnail($iFriendID, 'none', true, 'visitor', array('is_online' => $aFriendsPrm[5])));
}
$sOutputHtml = $GLOBALS['oSysTemplate']->parseHtmlByName('profile_friends.html', $aTmplVars);
$oPaginate = new BxDolPaginate(array('page_url' => BX_DOL_URL_ROOT . 'profile.php', 'count' => $iCount, 'per_page' => $iLimit, 'page' => $iPage, 'on_change_page' => 'return !loadDynamicBlock({id}, \'' . $sProfileLink . '?page={page}&per_page={per_page}\');'));
$sPaginate = $oPaginate->getSimplePaginate($sAllFriends);
return array($sOutputHtml, array(), $sPaginate, true);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:36,代码来源:BxBaseProfileView.php
示例7: response
function response(&$o)
{
$iActivityId = 0;
$iSenderId = $o->iSender;
$iRecipientId = $o->iObject;
$aParams = array();
// get new instance;
$this->oSpy = BxDolModule::getInstance('BxSpyModule');
// define profile's nickname;
$sNickName = getNickName($iRecipientId);
$sProfileLink = getProfileLink($iRecipientId);
if ($o->sUnit == 'profile') {
switch ($o->sAction) {
case 'join':
$aParams = array('lang_key' => '_bx_spy_profile_has_joined', 'params' => array('profile_link' => $sProfileLink, 'profile_nick' => $sNickName));
$iSenderId = $o->iObject;
$iRecipientId = 0;
break;
case 'edit':
$aParams = array('lang_key' => '_bx_spy_profile_has_edited', 'params' => array('profile_link' => $sProfileLink, 'profile_nick' => $sNickName));
$iRecipientId = 0;
break;
case 'commentPost':
if ($iSenderId != $iRecipientId) {
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_has_commented', 'params' => array('sender_p_link' => $sSenderProfileLink, 'sender_p_nick' => $sSenderNickName, 'recipient_p_link' => $sProfileLink, 'recipient_p_nick' => $sNickName));
}
break;
case 'rate':
if ($iSenderId != $iRecipientId) {
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_has_rated', 'params' => array('sender_p_link' => $sSenderProfileLink, 'sender_p_nick' => $sSenderNickName, 'recipient_p_link' => $sProfileLink, 'recipient_p_nick' => $sNickName));
}
break;
case 'view':
if ($iSenderId != $iRecipientId) {
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_has_viewed', 'params' => array('sender_p_link' => $sSenderProfileLink, 'sender_p_nick' => $sSenderNickName, 'recipient_p_link' => $sProfileLink, 'recipient_p_nick' => $sNickName));
}
break;
}
}
if ($o->sUnit == 'friend') {
switch ($o->sAction) {
case 'request':
if ($iSenderId != $iRecipientId) {
$aRecipientInfo = $this->_getSenderInfo($iSenderId);
$sRecipientNickName = $aRecipientInfo['NickName'];
$sRecipientProfileLink = $aRecipientInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_friend_request', 'params' => array('sender_p_link' => $sProfileLink, 'sender_p_nick' => $sNickName, 'recipient_p_link' => $sRecipientProfileLink, 'recipient_p_nick' => $sRecipientNickName));
}
break;
case 'accept':
if ($iSenderId != $iRecipientId) {
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_friend_accept', 'params' => array('sender_p_link' => $sProfileLink, 'sender_p_nick' => $sNickName, 'recipient_p_link' => $sSenderProfileLink, 'recipient_p_nick' => $sSenderNickName));
}
break;
}
}
if ($aParams) {
// create new activity;
$aParams['spy_type'] = 'profiles_activity';
if ($iSenderId == 0) {
if ($this->oSpy->_oConfig->bTrackGuestsActivites) {
$iActivityId = $this->oSpy->_oDb->createActivity($iSenderId, $iRecipientId, $aParams);
}
} else {
$iActivityId = $this->oSpy->_oDb->createActivity($iSenderId, $iRecipientId, $aParams);
}
if ($iActivityId) {
// try to define all profile's friends;
$aFriends = getMyFriendsEx($iSenderId);
if ($aFriends && is_array($aFriends)) {
foreach ($aFriends as $iFriendId => $aItems) {
// attach activity to friend;
$this->oSpy->_oDb->attachFriendEvent($iActivityId, $iSenderId, $iFriendId);
}
}
}
}
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:90,代码来源:BxSpyProfilesActivity.php
示例8: get_member_menu_friends_list
/**
* Function will generate list of member's friends ;
*
* @param : $iMemberId (integer) - member's Id;
* @return : Html presentation data;
*/
function get_member_menu_friends_list($iMemberId = 0)
{
global $oFunctions;
$iMemberId = (int) $iMemberId;
$iOnlineTime = (int) getParam('member_online_time');
// define the member's menu position ;
$sExtraMenuPosition = isset($_COOKIE['menu_position']) ? $_COOKIE['menu_position'] : getParam('ext_nav_menu_top_position');
$aLanguageKeys = array('requests' => _t('_Friend Requests'), 'online' => _t('_Online Friends'));
// get all friends requests ;
$iFriendsRequests = getFriendRequests($iMemberId);
$iOnlineFriends = getFriendNumber($iMemberId, 1, $iOnlineTime);
// try to generate member's messages list ;
$sWhereParam = "AND p.`DateLastNav` > SUBDATE(NOW(), INTERVAL " . $iOnlineTime . " MINUTE)";
$aAllFriends = getMyFriendsEx($iMemberId, $sWhereParam, 'last_nav_desc', "LIMIT 5");
$oModuleDb = new BxDolModuleDb();
$sVideoMessengerImgPath = $GLOBALS['oSysTemplate']->getIconUrl('video.png');
$sMessengerTitle = _t('_Chat');
foreach ($aAllFriends as $iFriendID => $aFriendsPrm) {
$aMemberInfo = getProfileInfo($iFriendID);
$sThumb = $oFunctions->getMemberIcon($aMemberInfo['ID'], 'none');
$sHeadline = mb_strlen($aMemberInfo['UserStatusMessage']) > 40 ? mb_substr($aMemberInfo['UserStatusMessage'], 0, 40) . '...' : $aMemberInfo['UserStatusMessage'];
$aFriends[] = array('profile_link' => getProfileLink($iFriendID), 'profile_nick' => $aMemberInfo['NickName'], 'profile_id' => $iFriendID, 'thumbnail' => $sThumb, 'head_line' => $sHeadline, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $iMemberId, 'sender_passw' => getPassword($iMemberId), 'recipient_id' => $iFriendID, 'video_img_src' => $sVideoMessengerImgPath, 'messenger_title' => $sMessengerTitle)));
}
$aExtraSection = array('friends_request' => $aLanguageKeys['requests'], 'request_count' => $iFriendsRequests, 'ID' => $iMemberId, 'online_friends' => $aLanguageKeys['online'], 'online_count' => $iOnlineFriends);
// fill array with needed keys ;
$aTemplateKeys = array('bx_if:menu_position_bottom' => array('condition' => $sExtraMenuPosition == 'bottom', 'content' => $aExtraSection), 'bx_if:menu_position_top' => array('condition' => $sExtraMenuPosition == 'top' || $sExtraMenuPosition == 'static', 'content' => $aExtraSection), 'bx_repeat:friend_list' => $aFriends);
$sOutputCode = $GLOBALS['oSysTemplate']->parseHtmlByName('view_friends_member_menu_friends_list.html', $aTemplateKeys);
return $sOutputCode;
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:35,代码来源:BxDolFriendsPageView.php
示例9: response
function response(&$oAlert)
{
$iSenderId = $oAlert->iSender;
$iRecipientId = $oAlert->iObject;
$sRecipientName = getNickName($iRecipientId);
$sRecipientLink = getProfileLink($iRecipientId);
$iCommentId = 0;
$aParams = array();
switch ($oAlert->sUnit . '_' . $oAlert->sAction) {
case 'profile_join':
$aParams = array('lang_key' => '_bx_spy_profile_has_joined', 'params' => array('profile_link' => $sRecipientLink, 'profile_nick' => $sRecipientName));
$iSenderId = $oAlert->iObject;
$iRecipientId = 0;
break;
case 'profile_edit':
$aParams = array('lang_key' => '_bx_spy_profile_has_edited', 'params' => array('profile_link' => $sRecipientLink, 'profile_nick' => $sRecipientName));
$iRecipientId = 0;
break;
case 'profile_edit_status_message':
$aParams = array('lang_key' => '_bx_spy_profile_has_edited_status_message', 'params' => array('profile_link' => $sRecipientLink, 'profile_nick' => $sRecipientName));
$iRecipientId = 0;
break;
case 'profile_rate':
if ($iSenderId == $iRecipientId) {
break;
}
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_has_rated', 'params' => array('sender_p_link' => $sSenderProfileLink, 'sender_p_nick' => $sSenderNickName, 'recipient_p_link' => $sRecipientLink, 'recipient_p_nick' => $sRecipientName));
break;
case 'profile_delete':
$this->_oModule->_oDb->deleteActivityByUser($iRecipientId);
break;
case 'profile_commentPost':
if ($iSenderId == $iRecipientId || !isset($oAlert->aExtras['comment_id']) || (int) $oAlert->aExtras['comment_id'] == 0) {
break;
}
$iCommentId = (int) $oAlert->aExtras['comment_id'];
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_has_commented', 'params' => array('sender_p_link' => $sSenderProfileLink, 'sender_p_nick' => $sSenderNickName, 'recipient_p_link' => $sRecipientLink, 'recipient_p_nick' => $sRecipientName));
break;
case 'profile_commentRemove':
if (!isset($oAlert->aExtras['comment_id']) || (int) $oAlert->aExtras['comment_id'] == 0) {
break;
}
$this->_oModule->_oDb->deleteActivityByObject($oAlert->sUnit, $iRecipientId, (int) $oAlert->aExtras['comment_id']);
break;
case 'friend_accept':
if ($iSenderId == $iRecipientId) {
break;
}
$aSenderInfo = $this->_getSenderInfo($iSenderId);
$sSenderNickName = $aSenderInfo['NickName'];
$sSenderProfileLink = $aSenderInfo['Link'];
$aParams = array('lang_key' => '_bx_spy_profile_friend_accept', 'params' => array('sender_p_link' => $sRecipientLink, 'sender_p_nick' => $sRecipientName, 'recipient_p_link' => $sSenderProfileLink, 'recipient_p_nick' => $sSenderNickName));
break;
}
if (empty($aParams)) {
return;
}
// create new activity;
$aParams['spy_type'] = 'profiles_activity';
$iActivityId = 0;
if ($iSenderId || !$iSenderId && $this->_oModule->_oConfig->bTrackGuestsActivites) {
$iActivityId = $this->_oModule->_oDb->createActivity($oAlert->sUnit, $oAlert->sAction, $oAlert->iObject, $iCommentId, $iSenderId, $iRecipientId, $aParams);
}
if (!$iActivityId) {
return;
}
// try to define all profile's friends;
$aFriends = getMyFriendsEx($iSenderId);
if (empty($aFriends) || !is_array($aFriends)) {
return;
}
// attach activity to friend;
foreach ($aFriends as $iFriendId => $aItems) {
$this->_oModule->_oDb->attachFriendEvent($iActivityId, $iSenderId, $iFriendId);
}
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:82,代码来源:BxSpyResponseProfiles.php
示例10: serviceViewBlockAccountTimeline
function serviceViewBlockAccountTimeline($mixed, $iStart = -1, $iPerPage = -1, $sFilter = '', $sTimeline = '', $sType = 'id', $aModules = array())
{
$aOwner = $this->_oDb->getUser($mixed, $sType);
$this->_iOwnerId = $aOwner['id'];
$aFriends = getMyFriendsEx($this->_iOwnerId, '', '', 'LIMIT 20');
if (empty($aFriends)) {
return $this->_oTemplate->getEmpty(true);
}
$this->_iOwnerId = array_keys($aFriends);
$sOwnerId = implode(BX_WALL_DIVIDER_ID, $this->_iOwnerId);
if ($iStart == -1) {
$iStart = 0;
}
if ($iPerPage == -1) {
$iPerPage = $this->_oConfig->getPerPage('account');
}
if (empty($sFilter)) {
$sFilter = BX_WALL_FILTER_ALL;
}
$aVariables = array('timeline' => $this->_getTimeline($iStart, $iPerPage, $sFilter, $sTimeline, $aModules), 'content' => $this->_getPosts('desc', $iStart, $iPerPage, $sFilter, $sTimeline, $aModules), 'view_js_content' => $this->_oTemplate->getJsCode('view', array('iOwnerId' => $sOwnerId), array('WallOwnerId' => $sOwnerId, 'WallStart' => $iStart, 'WallPerPage' => $iPerPage, 'WallFilter' => $sFilter, 'WallTimeline' => $sTimeline, 'WallModules' => $aModules)));
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView(array());
$oForm->addCssJs(true, true);
$this->_oTemplate->addCss(array('view.css', 'view_phone.css'));
$this->_oTemplate->addJs(array('main.js', 'view.js'));
return array($this->_oTemplate->parseHtmlByName('view.html', $aVariables), array(), LoadingBox('bx-wall-view-loading'), false, 'getBlockCaptionMenu');
}
开发者ID:boonex,项目名称:dolphin.pro,代码行数:27,代码来源:BxWallModule.php
示例11: getBlockCode_Friends
function getBlockCode_Friends()
{
$iLimit = 10;
$sAllFriends = 'viewFriends.php?iUser=' . $this->iMember;
$sOutputHtml = null;
// count all friends ;
$iCount = getFriendNumber($this->iMember);
$sPaginate = '';
if ($iCount) {
$iPages = ceil($iCount / $iLimit);
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1;
if ($iPage < 1) {
$iPage = 1;
}
if ($iPage > $iPages) {
$iPage = $iPages;
}
$sqlFrom = ($iPage - 1) * $iLimit;
$sqlLimit = "LIMIT {$sqlFrom}, {$iLimit}";
} else {
return;
}
$aAllFriends = getMyFriendsEx($this->iMember, '', 'image', $sqlLimit);
$iCurrCount = count($aAllFriends);
foreach ($aAllFriends as $iFriendID => $aFriendsPrm) {
$sOutputHtml .= '<div class="member_block">';
$sOutputHtml .= get_member_thumbnail($iFriendID, 'none', true, 'visitor', array('is_online' => $aFriendsPrm[5]));
$sOutputHtml .= '</div>';
}
$sOutputHtml = $GLOBALS['oFunctions']->centerContent($sOutputHtml, '.member_block');
$oPaginate = new BxDolPaginate(array('page_url' => BX_DOL_URL_ROOT . 'member.php', 'count' => $iCount, 'per_page' => $iLimit, 'page' => $iPage, 'per_page_changer' => true, 'page_reloader' => true, 'on_change_page' => 'return !loadDynamicBlock({id}, \'member.php?page={page}&per_page={per_page}\');', 'on_change_per_page' => ''));
$sPaginate = $oPaginate->getSimplePaginate($sAllFriends);
return array($sOutputHtml, array(), $sPaginate);
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:34,代码来源:member.php
注:本文中的getMyFriendsEx函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论