本文整理汇总了PHP中getLoggedId函数的典型用法代码示例。如果您正苦于以下问题:PHP getLoggedId函数的具体用法?PHP getLoggedId怎么用?PHP getLoggedId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLoggedId函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: makeView
function makeView()
{
if (!$this->isEnabled()) {
return false;
}
$iMemberId = getLoggedId() ? getLoggedId() : 0;
$sIp = $_SERVER['REMOTE_ADDR'];
$iTime = time();
if ($iMemberId) {
$sWhere = " AND `viewer` = '{$iMemberId}' ";
} else {
$sWhere = " AND `viewer` = '0' AND `ip` = INET_ATON('{$sIp}') ";
}
$iTs = (int) $GLOBALS['MySQL']->getOne("SELECT `ts` FROM `{$this->_aSystem['table_track']}` WHERE `id` = '" . $this->getId() . "' {$sWhere}");
$iRet = 0;
if (!$iTs) {
$iRet = $GLOBALS['MySQL']->query("INSERT IGNORE INTO `{$this->_aSystem['table_track']}` SET `id` = '" . $this->getId() . "', `viewer` = '{$iMemberId}', `ip` = INET_ATON('{$sIp}'), `ts` = {$iTime}");
} elseif ($iTime - $iTs > $this->_aSystem['period']) {
$iRet = $GLOBALS['MySQL']->query("UPDATE `{$this->_aSystem['table_track']}` SET `ts` = {$iTime} WHERE `id` = '" . $this->getId() . "' AND `viewer` = '{$iMemberId}' AND `ip` = INET_ATON('{$sIp}')");
}
if ($iRet) {
$this->_triggerView();
$oZ = new BxDolAlerts($this->_sSystem, 'view', $this->getId(), $iMemberId);
$oZ->alert();
return true;
}
return false;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:28,代码来源:BxDolViews.php
示例2: SendTellFriend
/**
* send "tell a friend" email
*/
function SendTellFriend($iSenderID = 0)
{
global $profileID;
$sRecipient = clear_xss($_POST['friends_emails']);
$sSenderName = clear_xss($_POST['name']);
$sSenderEmail = clear_xss($_POST['email']);
if (strlen(trim($sRecipient)) <= 0) {
return 0;
}
if (strlen(trim($sSenderEmail)) <= 0) {
return 0;
}
$sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';
$rEmailTemplate = new BxDolEmailTemplates();
if ($profileID) {
$aTemplate = $rEmailTemplate->getTemplate('t_TellFriendProfile', getLoggedId());
$Link = getProfileLink($profileID, $sLinkAdd);
} else {
$aTemplate = $rEmailTemplate->getTemplate('t_TellFriend', getLoggedId());
$Link = BX_DOL_URL_ROOT;
if (strlen($sLinkAdd) > 0) {
$Link .= '?' . $sLinkAdd;
}
}
$aPlus = array('Link' => $Link, 'FromName' => $sSenderName);
return sendMail($sRecipient, $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);
}
开发者ID:robbie778,项目名称:dolphin.pro,代码行数:30,代码来源:tellfriend.php
示例3: SendTellFriend
/**
* send "tell a friend" email
*/
function SendTellFriend($iSenderID = 0)
{
global $profileID;
$sSenderEmail = clear_xss(bx_get('sender_email'));
if (strlen(trim($sSenderEmail)) <= 0) {
return 0;
}
$sSenderName = clear_xss(bx_get('sender_name'));
$sSenderLink = $iSenderID != 0 ? getProfileLink($iSenderID) : BX_DOL_URL_ROOT;
$sRecipientEmail = clear_xss(bx_get('recipient_email'));
if (strlen(trim($sRecipientEmail)) <= 0) {
return 0;
}
$sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';
$rEmailTemplate = new BxDolEmailTemplates();
if ($profileID) {
$aTemplate = $rEmailTemplate->getTemplate('t_TellFriendProfile', getLoggedId());
$Link = getProfileLink($profileID, $sLinkAdd);
} else {
$aTemplate = $rEmailTemplate->getTemplate('t_TellFriend', getLoggedId());
$Link = BX_DOL_URL_ROOT;
if (strlen($sLinkAdd) > 0) {
$Link .= '?' . $sLinkAdd;
}
}
return sendMail($sRecipientEmail, $aTemplate['Subject'], $aTemplate['Body'], '', array('Link' => $Link, 'SenderName' => $sSenderName, 'SenderLink' => $sSenderLink));
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:30,代码来源:tellfriend.php
示例4: BxGSearchModule
function BxGSearchModule(&$aModule)
{
parent::BxDolModule($aModule);
$GLOBALS['aModule'] = $aModule;
$this->_iProfileId = getLoggedId();
$GLOBALS['oBxGSearchModule'] =& $this;
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:7,代码来源:BxGSearchModule.php
示例5: getCalendar
function getCalendar()
{
$oProfile = new BxBaseProfileGenerator(getLoggedId());
$mSearchRes = $oProfile->GenProfilesCalendarBlock();
list($sResults, $aDBTopMenu, $sPagination, $sTopFilter) = $mSearchRes;
return DesignBoxContent(_t('_People_Calendar'), $sResults, 1);
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:7,代码来源:calendar.php
示例6: serviceAccountSettingsDelAccount
public function serviceAccountSettingsDelAccount($iAccountId = false)
{
if (false === $iAccountId) {
$iAccountId = getLoggedId();
}
return $this->_oAccountForms->deleteAccountForm($iAccountId);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxBaseServiceAccount.php
示例7: __construct
function __construct($sType, $iAlbum = 0)
{
$this->iOwnerId = getLoggedId();
if ($this->iOwnerId == 0) {
return;
}
$this->iAlbumId = (int) $iAlbum;
$this->sType = strip_tags($sType);
$oPrivacy = new BxDolPrivacy('sys_albums', 'ID', 'Owner');
$aPrivField = $oPrivacy->getGroupChooser($this->iOwnerId, 'sys_albums', 'view');
$this->aForm = array('form_attrs' => array('name' => 'form_album', 'action' => '', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array('db' => array('table' => 'sys_albums', 'key' => 'ID', 'uri' => 'Uri', 'uri_title' => 'Caption', 'submit_name' => 'save')), 'inputs' => array('Caption' => array('type' => 'text', 'name' => 'Caption', 'caption' => _t('_sys_album_caption_capt'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 128), 'error' => _t('_sys_album_err_capt')), 'db' => array('pass' => 'Xss'), 'display' => true), 'Location' => array('type' => 'text', 'name' => 'Location', 'caption' => _t('_sys_album_caption_loc'), 'db' => array('pass' => 'Xss'), 'display' => true), 'Description' => array('type' => 'textarea', 'name' => 'Description', 'caption' => _t('_sys_album_caption_desc'), 'required' => true, 'html' => false, 'checker' => array('func' => 'length', 'params' => array(3, 255), 'error' => _t('_sys_album_err_desc')), 'db' => array('pass' => 'Xss')), 'allow_view_to' => $aPrivField, 'Type' => array('type' => 'hidden', 'name' => 'Type', 'db' => array('pass' => 'Xss'), 'value' => $this->sType), 'Control' => array('type' => 'input_set', 0 => array('type' => 'submit', 'name' => 'save', 'value' => _t("_sys_album_create")), 1 => array('type' => 'reset', 'name' => 'cancel', 'value' => _t("_sys_album_cancel")))));
$iAlbum = (int) $iAlbum;
if ($this->iAlbumId > 0) {
$oAlbum = new BxDolAlbums($this->sType);
$this->aInfo = $oAlbum->getAlbumInfo(array('fileId' => $iAlbum));
if ($this->iOwnerId != $this->aInfo['Owner']) {
return;
}
$this->aForm['inputs']['Control'] = array('type' => 'input_set', 'colspan' => true, 0 => array('type' => 'submit', 'name' => 'save', 'value' => _t("_sys_album_save_changes")), 1 => array('type' => 'submit', 'name' => 'delete', 'value' => _t("_sys_album_delete")), 2 => array('type' => 'submit', 'name' => 'launch', 'value' => _t("_sys_album_add")), 3 => array('type' => 'submit', 'name' => 'launch', 'value' => _t("_sys_album_edit_items")), 4 => array('type' => 'submit', 'name' => 'launch', 'value' => _t("_sys_album_organize")), 5 => array('type' => 'reset', 'name' => 'cancel', 'value' => _t("_sys_album_cancel")));
foreach ($this->aForm['inputs'] as $sKey => $aValue) {
if ($sKey != 'Control') {
$this->aForm['inputs'][$sKey]['value'] = $this->aInfo[$sKey];
}
}
}
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:26,代码来源:BxBaseAlbumForm.php
示例8: post
function post($sSystem, $iId, $iCmtAuthorId, $iCmtParentId, $iMood, $sFileId)
{
global $sIncPath;
global $sModule;
global $sHomeUrl;
$iId = (int) $iId;
$iCmtParentId = (int) $iCmtParentId;
$iMood = (int) $iMood;
bx_import('BxDolCmts');
$oCmts = BxDolCmts::getObjectInstance($sSystem, $iId);
if (!$oCmts) {
return 0;
}
$sText = '<iframe width="100%" height="240" src="[ray_url]modules/video_comments/embed.php?id=' . $sFileId . '" frameborder="0" allowfullscreen></iframe>';
$mixedOverrideResult = null;
$oAlert = new BxDolAlerts('bx_video_comments', 'post', $sFileId, getLoggedId(), array('override' => &$mixedOverrideResult, 'text' => &$sText, 'file_id' => &$sFileId, 'object_id' => &$iId, 'author' => &$iCmtAuthorId, 'parent_id' => &$iCmtParentId, 'mood' => &$iMood));
$oAlert->alert();
if (null !== $mixedOverrideResult) {
return $mixedOverrideResult;
}
$iCmtNewId = $oCmts->_oQuery->addComment($iId, $iCmtParentId, $iCmtAuthorId, $sText, $iMood);
if (false === $iCmtNewId) {
return 0;
}
bx_import('BxDolAlerts');
$oZ = new BxDolAlerts($sSystem, 'commentPost', $oCmts->getId(), $oCmts->_getAuthorId(), array('comment_id' => $iCmtNewId, 'comment_author_id' => $iCmtAuthorId));
$oZ->alert();
$oCmts->_triggerComment();
return $iCmtNewId;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:30,代码来源:customFunctions.inc.php
示例9: onPositiveDetection
public function onPositiveDetection($sIP, $sExtraData = '', $sType = 'dnsbl')
{
$iIP = sprintf("%u", ip2long($sIP));
$iMemberId = getLoggedId();
$sExtraData = process_db_input($sExtraData);
return $GLOBALS['MySQL']->query("INSERT INTO `sys_antispam_block_log` SET `ip` = '{$iIP}', `member_id` = '{$iMemberId}', `type` = '{$sType}', `extra` = '{$sExtraData}', `added` = " . time());
}
开发者ID:Arvindvi,项目名称:dolphin,代码行数:7,代码来源:BxDolDNSBlacklists.php
示例10: __construct
function __construct(&$aModule)
{
parent::__construct($aModule);
$GLOBALS['aModule'] = $aModule;
$this->_iProfileId = getLoggedId();
$this->_sProto = bx_proto();
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:7,代码来源:BxGSearchModule.php
示例11: PrintSearhResult
/**
* @description : function will generate profile block (used the profile template );
* @return : Html presentation data ;
*/
function PrintSearhResult($aProfileInfo, $aCoupleInfo = '', $aExtendedKey = null, $sTemplateName = '', $oCustomTemplate = null)
{
global $site;
global $aPreValues;
$iVisitorID = getLoggedId();
$bExtMode = !empty($_GET['mode']) && $_GET['mode'] == 'extended' || !empty($_GET['search_result_mode']) && $_GET['search_result_mode'] == 'ext';
$isShowMatchPercent = $bExtMode && $iVisitorID && $iVisitorID != $aProfileInfo['ID'] && getParam('view_match_percent') && getParam('enable_match');
$sProfileThumb = get_member_thumbnail($aProfileInfo['ID'], 'none', !$bExtMode, 'visitor');
$sProfileMatch = $isShowMatchPercent ? $GLOBALS['oFunctions']->getProfileMatch($iVisitorID, $aProfileInfo['ID']) : '';
$sProfileNickname = '<a href="' . getProfileLink($aProfileInfo['ID']) . '">' . getNickName($aProfileInfo['ID']) . '</a>';
$sProfileInfo = $GLOBALS['oFunctions']->getUserInfo($aProfileInfo['ID']);
$sProfileDesc = strmaxtextlen($aProfileInfo['DescriptionMe'], 130);
$sProfileZodiac = $bExtMode && getParam('zodiac') ? $GLOBALS['oFunctions']->getProfileZodiac($aProfileInfo['DateOfBirth']) : '';
$sProfile2ASc1 = $sProfile2ASc2 = $sProfile2Nick = $sProfile2Desc = $sProfile2Info = $sProfile2Zodiac = '';
if ($aCoupleInfo) {
$sProfile2Nick = '<a href="' . getProfileLink($aCoupleInfo['ID']) . '">' . getNickName($aCoupleInfo['ID']) . '</a>';
$sProfile2Info = $GLOBALS['oFunctions']->getUserInfo($aCoupleInfo['ID']);
$sProfile2Desc = strmaxtextlen($aCoupleInfo['DescriptionMe'], 130);
$sProfile2Zodiac = $bExtMode && getParam('zodiac') ? $GLOBALS['oFunctions']->getProfileZodiac($aCoupleInfo['DateOfBirth']) : '';
$sProfile2ASc1 = 'float:left;width:31%;margin-right:10px;';
$sProfile2ASc2 = 'float:left;width:31%;display:block;';
} else {
$sProfile2ASc2 = 'display:none;';
}
$aKeys = array('thumbnail' => $sProfileThumb, 'match' => $sProfileMatch, 'nick' => $sProfileNickname, 'info' => $sProfileInfo, 'i_am_desc' => $sProfileDesc, 'zodiac_sign' => $sProfileZodiac, 'nick2' => $sProfile2Nick, 'info2' => $sProfile2Info, 'i_am_desc2' => $sProfile2Desc, 'zodiac_sign2' => $sProfile2Zodiac, 'add_style_c1' => $sProfile2ASc1, 'add_style_c2' => $sProfile2ASc2);
if ($aExtendedKey and is_array($aExtendedKey) and !empty($aExtendedKey)) {
foreach ($aExtendedKey as $sKey => $sValue) {
$aKeys[$sKey] = $sValue;
}
} else {
$aKeys['ext_css_class'] = '';
}
return $oCustomTemplate ? $oCustomTemplate->parseHtmlByName($sTemplateName, $aKeys) : $GLOBALS['oSysTemplate']->parseHtmlByName($sTemplateName, $aKeys);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:38,代码来源:BxBaseSearchProfile.php
示例12: BxShoutBoxModule
/**
* Class constructor ;
*
* @param : $aModule (array) - contain some information about this module;
* [ id ] - (integer) module's id ;
* [ title ] - (string) module's title ;
* [ vendor ] - (string) module's vendor ;
* [ path ] - (string) path to this module ;
* [ uri ] - (string) this module's URI ;
* [ class_prefix ] - (string) this module's php classes file prefix ;
* [ db_prefix ] - (string) this module's Db tables prefix ;
* [ date ] - (string) this module's date installation ;
*/
function BxShoutBoxModule(&$aModule)
{
parent::BxDolModule($aModule);
// prepare the location link ;
$this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
$this->aModuleInfo = $aModule;
$this->iMemberId = getLoggedId();
}
开发者ID:noormcs,项目名称:studoro,代码行数:21,代码来源:BxShoutBoxModule.php
示例13: BxProfileCustomizeModule
/**
* Constructor
*/
function BxProfileCustomizeModule($aModule)
{
parent::BxDolModule($aModule);
$this->iUserId = getLoggedId();
$this->_oConfig->init($this->_oDb);
$this->_oTemplate->init($this, $this->_oDb);
$this->_aCssMatch = $this->_oDb->getUnits();
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:11,代码来源:BxProfileCustomizeModule.php
示例14: insert
function insert($aValsToAdd = array())
{
$aValsToAdd['client_id'] = strtolower(genRndPwd(self::$LENGTH_ID, false));
$aValsToAdd['client_secret'] = strtolower(genRndPwd(self::$LENGTH_SECRET, false));
$aValsToAdd['scope'] = 'basic';
$aValsToAdd['user_id'] = getLoggedId();
return parent::insert($aValsToAdd);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:8,代码来源:BxOAuthFormAdd.php
示例15: __construct
/**
* Constructor
*/
function __construct($aModule)
{
parent::__construct($aModule);
$this->iUserId = isLogged() && isAdmin() ? getLoggedId() : 0;
$this->_oConfig->init($this->_oDb);
$this->_oTemplate->init($this, $this->_oDb);
$this->_aCssMatch = $this->_oDb->getUnits();
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:11,代码来源:BxSctrModule.php
示例16: BxDolFilesDb
function BxDolFilesDb(&$oConfig)
{
parent::BxDolModuleDb($oConfig);
$this->_oConfig =& $oConfig;
$this->iViewer = getLoggedId();
$this->aFileFields = array('medID' => 'ID', 'Categories' => 'Categories', 'medProfId' => 'Owner', 'medTitle' => 'Title', 'medUri' => 'Uri', 'medDesc' => 'Description', 'medTags' => 'Tags', 'medDate' => 'Date', 'medViews' => 'Views', 'Approved' => 'Status', 'Featured' => 'Featured', 'Rate' => 'Rate', 'RateCount' => 'RateCount');
$this->aFavoriteFields = array('fileId' => 'ID', 'ownerId' => 'Profile', 'favDate' => 'Date');
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:8,代码来源:BxDolFilesDb.php
示例17: serviceGetMenuAddonManageToolsProfileStats
public function serviceGetMenuAddonManageToolsProfileStats()
{
bx_import('SearchResult', $this->_aModule);
$sClass = $this->_aModule['class_prefix'] . 'SearchResult';
$o = new $sClass();
$o->fillFilters(array('account_id' => getLoggedId(), 'perofileStatus' => ''));
$o->unsetPaginate();
return $o->getNum();
}
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxBaseModProfileModule.php
示例18: getBlockCode_Subscribe
/**
* News Letters block
*/
function getBlockCode_Subscribe()
{
global $site;
$iUserId = isLogged() ? getLoggedId() : 0;
$oSubscription = BxDolSubscription::getInstance();
$aButton = $oSubscription->getButton($iUserId, 'system', '');
$sContent = $oSubscription->getData() . $GLOBALS['oSysTemplate']->parseHtmlByName('home_page_subscribe.html', array('message' => _t('_SUBSCRIBE_TEXT', $site['title']), 'button_title' => $aButton['title'], 'button_script' => $aButton['script']));
return array($sContent, array(), array(), false);
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:12,代码来源:BxBaseIndexPageView.php
示例19: serviceAccountSettingsDelAccount
public function serviceAccountSettingsDelAccount($iAccountId = false)
{
if (!$iAccountId) {
$iAccountId = bx_process_input(bx_get('id'), BX_DATA_INT);
}
if (!$iAccountId) {
$iAccountId = getLoggedId();
}
return $this->_oAccountForms->deleteAccountForm($iAccountId);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:10,代码来源:BxBaseServiceAccount.php
示例20: BxSimpleMessengerModule
/**
* Class constructor ;
*
* @param : $aModule (array) - contain some information about this module;
* [ id ] - (integer) module's id ;
* [ title ] - (string) module's title ;
* [ vendor ] - (string) module's vendor ;
* [ path ] - (string) path to this module ;
* [ uri ] - (string) this module's URI ;
* [ class_prefix ] - (string) this module's php classes file prefix ;
* [ db_prefix ] - (string) this module's Db tables prefix ;
* [ date ] - (string) this module's date installation ;
*/
function BxSimpleMessengerModule($aModule)
{
parent::BxDolModule($aModule);
$this->sHomeUrl = $this->_oConfig->_sHomeUrl;
$this->aModuleInfo = $aModule;
$this->iLoggedMemberId = getLoggedId();
$this->aCoreSettings = array('update_time' => $this->_oConfig->iUpdateTime, 'number_visible_messages' => $this->_oConfig->iVisibleMessages, 'limit_returning_messages' => $this->_oConfig->iCountRetMessages, 'number_of_allowed_chat_boxes' => $this->_oConfig->iCountAllowedChatBoxes, 'output_block' => $this->_oConfig->sOutputBlock, 'page_receiver' => BX_DOL_URL_ROOT . 'modules/?r=' . $this->aModuleInfo['uri'] . '/get_operation', 'history_block_prefix' => $this->_oConfig->sOutputBlockPrefix, 'save_chat_history' => $this->_oConfig->bSaveChatHistory, 'language_keys' => array('empty_message' => _t('_simple_messenger_empty_message')), 'blink_counter' => $this->_oConfig->iBlinkCounter, 'message_date_format' => $this->_oConfig->sMessageDateFormat);
$this->sMemberMenuPosition = isset($_COOKIE['menu_position']) ? $_COOKIE['menu_position'] : getParam('ext_nav_menu_top_position');
$this->oPrivacy = new BxSimpleMessengerPrivacy($this);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:23,代码来源:BxSimpleMessengerModule.php
注:本文中的getLoggedId函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论