本文整理汇总了PHP中BxDolSubscription类的典型用法代码示例。如果您正苦于以下问题:PHP BxDolSubscription类的具体用法?PHP BxDolSubscription怎么用?PHP BxDolSubscription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BxDolSubscription类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getBlockCode_Subscribe
/**
* News Letters block
*/
function getBlockCode_Subscribe()
{
global $site;
$iUserId = isLogged() ? getLoggedId() : 0;
$oSubscription = new BxDolSubscription();
$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:noormcs,项目名称:studoro,代码行数:12,代码来源:BxBaseIndexPageView.php
示例2: getBlockCode_ActionList
function getBlockCode_ActionList()
{
$sCode = null;
bx_import('BxDolSubscription');
$oSubscription = new BxDolSubscription();
$aButton = $oSubscription->getButton($this->iProfileId, $this->oConfig->getMainPrefix(), '', (int) $this->aFileInfo['medID']);
$aReplacement = array('favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'iViewer' => $this->iProfileId, 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'sbs_' . $this->oConfig->getMainPrefix() . '_title' => $aButton['title'], 'sbs_' . $this->oConfig->getMainPrefix() . '_script' => $aButton['script']);
$sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->oConfig->getMainPrefix());
if (!is_null($sActionsList)) {
$sCode = $oSubscription->getData() . $sActionsList;
}
return $sCode;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:13,代码来源:BxVideosPageView.php
示例3: getBlockCode_Actions
function getBlockCode_Actions()
{
global $oFunctions;
if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
$oSubscription = new BxDolSubscription();
$aSubscribeButton = $oSubscription->getButton($this->_oMain->_iProfileId, 'bx_store', '', (int) $this->aDataEntry['id']);
$aInfo = array('BaseUri' => $this->_oMain->_oConfig->getBaseUri(), 'iViewer' => $this->_oMain->_iProfileId, 'ownerID' => (int) $this->aDataEntry['author_id'], 'ID' => (int) $this->aDataEntry['id'], 'URI' => (int) $this->aDataEntry['uri'], 'ScriptSubscribe' => $aSubscribeButton['script'], 'TitleSubscribe' => $aSubscribeButton['title'], 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_store_action_title_edit') : '', 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_store_action_title_delete') : '', 'TitleShare' => $this->_oMain->isAllowedShareProduct($this->aDataEntry) ? _t('_bx_store_action_title_share') : '', 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_store_action_title_broadcast') : '', 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? $this->aDataEntry['featured'] ? _t('_bx_store_action_remove_from_featured') : _t('_bx_store_action_add_to_featured') : '');
if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleShare'] && !$aInfo['AddToFeatured'] && !$aInfo['TitleBroadcast'] && !$aInfo['TitleSubscribe']) {
return '';
}
return $oSubscription->getData() . $oFunctions->genObjectsActions($aInfo, 'bx_store');
}
return '';
}
开发者ID:Arvindvi,项目名称:dolphin,代码行数:14,代码来源:BxStorePageView.php
示例4: getBlockCode_Actions
function getBlockCode_Actions()
{
global $oFunctions;
if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
$oSubscription = new BxDolSubscription();
$aSubscribeButton = $oSubscription->getButton($this->_oMain->_iProfileId, 'bx_groups', '', (int) $this->aDataEntry['id']);
$isFan = $this->_oDb->isFan((int) $this->aDataEntry['id'], $this->_oMain->_iProfileId, 0) || $this->_oDb->isFan((int) $this->aDataEntry['id'], $this->_oMain->_iProfileId, 1);
$aInfo = array('BaseUri' => $this->_oMain->_oConfig->getBaseUri(), 'iViewer' => $this->_oMain->_iProfileId, 'ownerID' => (int) $this->aDataEntry['author_id'], 'ID' => (int) $this->aDataEntry['id'], 'URI' => $this->aDataEntry['uri'], 'ScriptSubscribe' => $aSubscribeButton['script'], 'TitleSubscribe' => $aSubscribeButton['title'], 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_groups_action_title_edit') : '', 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_groups_action_title_delete') : '', 'TitleJoin' => $this->_oMain->isAllowedJoin($this->aDataEntry) ? $isFan ? _t('_bx_groups_action_title_leave') : _t('_bx_groups_action_title_join') : '', 'IconJoin' => $isFan ? 'signout' : 'signin', 'TitleInvite' => $this->_oMain->isAllowedSendInvitation($this->aDataEntry) ? _t('_bx_groups_action_title_invite') : '', 'TitleShare' => $this->_oMain->isAllowedShare($this->aDataEntry) ? _t('_bx_groups_action_title_share') : '', 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_groups_action_title_broadcast') : '', 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? $this->aDataEntry['featured'] ? _t('_bx_groups_action_remove_from_featured') : _t('_bx_groups_action_add_to_featured') : '', 'TitleManageFans' => $this->_oMain->isAllowedManageFans($this->aDataEntry) ? _t('_bx_groups_action_manage_fans') : '', 'TitleUploadPhotos' => $this->_oMain->isAllowedUploadPhotos($this->aDataEntry) ? _t('_bx_groups_action_upload_photos') : '', 'TitleUploadVideos' => $this->_oMain->isAllowedUploadVideos($this->aDataEntry) ? _t('_bx_groups_action_upload_videos') : '', 'TitleUploadSounds' => $this->_oMain->isAllowedUploadSounds($this->aDataEntry) ? _t('_bx_groups_action_upload_sounds') : '', 'TitleUploadFiles' => $this->_oMain->isAllowedUploadFiles($this->aDataEntry) ? _t('_bx_groups_action_upload_files') : '');
if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleJoin'] && !$aInfo['TitleInvite'] && !$aInfo['TitleShare'] && !$aInfo['TitleBroadcast'] && !$aInfo['AddToFeatured'] && !$aInfo['TitleManageFans'] && !$aInfo['TitleUploadPhotos'] && !$aInfo['TitleUploadVideos'] && !$aInfo['TitleUploadSounds'] && !$aInfo['TitleUploadFiles']) {
return '';
}
return $oSubscription->getData() . $oFunctions->genObjectsActions($aInfo, 'bx_groups');
}
return '';
}
开发者ID:noormcs,项目名称:studoro,代码行数:15,代码来源:BxGroupsPageView.php
示例5: getBlockCode_ActionList
function getBlockCode_ActionList()
{
$sCode = null;
$sMainPrefix = $this->oConfig->getMainPrefix();
bx_import('BxDolSubscription');
$oSubscription = BxDolSubscription::getInstance();
$aButton = $oSubscription->getButton($this->iProfileId, $sMainPrefix, '', (int) $this->aFileInfo['medID']);
bx_import('BxDolAlbums');
$sProfileAlbumUri = BxDolAlbums::getAbumUri($this->oConfig->getGlParam('profile_album_name'), $this->iProfileId);
$aReplacement = array('favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'featured' => (int) $this->aFileInfo['Featured'], 'featuredCpt' => '', 'approvedCpt' => '', 'approvedAct' => '', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'fileKey' => $this->aFileInfo['Hash'], 'fileExt' => $this->aFileInfo['medExt'], 'iViewer' => $this->iProfileId, 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'Tags' => bx_php_string_apos($this->aFileInfo['medTags']), 'TitleAvatar' => $this->aFileInfo['medProfId'] == $this->iProfileId && 'sys_avatar' == getParam('sys_member_info_thumb') ? _t('_' . $sMainPrefix . '_set_as_avatar') : '', 'SetAvatarCpt' => $this->aFileInfo['medProfId'] == $this->iProfileId && $sProfileAlbumUri == $this->aFileInfo['albumUri'] && 'bx_photos_thumb' == getParam('sys_member_info_thumb') ? _t('_' . $sMainPrefix . '_set_as_avatar') : '', 'sbs_' . $sMainPrefix . '_title' => $aButton['title'], 'sbs_' . $sMainPrefix . '_script' => $aButton['script'], 'shareCpt' => $this->oModule->isAllowedShare($this->aFileInfo) ? _t('_Share') : '', 'cropCpt' => $this->oModule->isAllowedEdit($this->aFileInfo) && $this->aFileInfo['medProfId'] == $this->iProfileId ? _t('_bx_photos_crop_action') : '');
if (isAdmin($this->iProfileId)) {
$sMsg = $aReplacement['featured'] > 0 ? 'un' : '';
$aReplacement['featuredCpt'] = _t('_' . $sMainPrefix . '_action_' . $sMsg . 'feature');
}
if ($this->oModule->isAllowedApprove($this->aFileInfo)) {
$sMsg = '';
$iAppr = 1;
if ($this->aFileInfo['Approved'] == 'approved') {
$sMsg = 'de';
$iAppr = 0;
}
$aReplacement['approvedCpt'] = _t('_' . $sMainPrefix . '_admin_' . $sMsg . 'activate');
$aReplacement['approvedAct'] = $iAppr;
}
$sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $sMainPrefix);
if (!is_null($sActionsList)) {
$sCode = $oSubscription->getData() . $sActionsList;
}
return $sCode;
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:30,代码来源:BxPhotosPageView.php
示例6: getBlockCode_ActionList
function getBlockCode_ActionList()
{
$sCode = null;
$sMainPrefix = $this->oConfig->getMainPrefix();
bx_import('BxDolSubscription');
$oSubscription = BxDolSubscription::getInstance();
$aButton = $oSubscription->getButton($this->iProfileId, $sMainPrefix, '', (int) $this->aFileInfo['medID']);
$sCode .= $oSubscription->getData();
$aReplacement = array('favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'featured' => (int) $this->aFileInfo['Featured'], 'featuredCpt' => '', 'approvedCpt' => '', 'approvedAct' => '', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'iViewer' => $this->iProfileId, 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'sbs_' . $sMainPrefix . '_title' => $aButton['title'], 'sbs_' . $sMainPrefix . '_script' => $aButton['script'], 'shareCpt' => $this->oModule->isAllowedShare($this->aFileInfo) ? _t('_Share') : '', 'downloadCpt' => $this->oModule->isAllowedDownload($this->aFileInfo) ? _t('_Download') : '');
if (isAdmin($this->iProfileId)) {
$sMsg = $aReplacement['featured'] > 0 ? 'un' : '';
$aReplacement['featuredCpt'] = _t('_' . $sMainPrefix . '_action_' . $sMsg . 'feature');
}
if ($this->oModule->isAllowedApprove($this->aFileInfo)) {
$sMsg = '';
$iAppr = 1;
if ($this->aFileInfo['Approved'] == 'approved') {
$sMsg = 'de';
$iAppr = 0;
}
$aReplacement['approvedCpt'] = _t('_' . $sMainPrefix . '_admin_' . $sMsg . 'activate');
$aReplacement['approvedAct'] = $iAppr;
}
$aReplacement['repostCpt'] = $aReplacement['repostScript'] = '';
if (BxDolRequest::serviceExists('wall', 'get_repost_js_click')) {
$sCode .= BxDolService::call('wall', 'get_repost_js_script');
$aReplacement['repostCpt'] = _t('_Repost');
$aReplacement['repostScript'] = BxDolService::call('wall', 'get_repost_js_click', array($this->iProfileId, $sMainPrefix, 'add', (int) $this->aFileInfo['medID']));
}
$sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $sMainPrefix);
if (is_null($sActionsList)) {
return '';
}
return $sCode . $sActionsList;
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:35,代码来源:BxSoundsPageView.php
示例7: getBlockCode_ActionList
function getBlockCode_ActionList()
{
$sCode = null;
bx_import('BxDolSubscription');
$oSubscription = new BxDolSubscription();
$aButton = $oSubscription->getButton($this->iProfileId, $this->oConfig->getMainPrefix(), '', (int) $this->aFileInfo['medID']);
$aReplacement = array('featured' => (int) $this->aFileInfo['Featured'], 'featuredCpt' => '', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'iViewer' => $this->iProfileId, 'favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'sbs_' . $this->oConfig->getMainPrefix() . '_title' => $aButton['title'], 'sbs_' . $this->oConfig->getMainPrefix() . '_script' => $aButton['script'], 'shareCpt' => $this->oModule->isAllowedShare($this->aFileInfo) ? _t('_Share') : '', 'downloadCpt' => $this->oModule->isAllowedDownload($this->aFileInfo) ? _t('_Download') : '');
if (isAdmin($this->iProfileId)) {
$sMsg = $aReplacement['featured'] > 0 ? 'un' : '';
$aReplacement['featuredCpt'] = _t('_' . $this->oConfig->getMainPrefix() . '_action_' . $sMsg . 'feature');
}
$sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->oConfig->getMainPrefix());
if (!is_null($sActionsList)) {
$sCode = $oSubscription->getData() . $sActionsList;
}
return $sCode;
}
开发者ID:noormcs,项目名称:studoro,代码行数:17,代码来源:BxFilesPageView.php
示例8: response
/**
* Overwtire the method of parent class.
*
* @param BxDolAlerts $oAlert an instance of alert.
*/
function response($oAlert)
{
$bFromWall = !empty($oAlert->aExtras) && (int) $oAlert->aExtras['from_wall'] == 1;
if (is_array($oAlert->aExtras) && isset($oAlert->aExtras['privacy_view']) && $oAlert->aExtras['privacy_view'] == BX_DOL_PG_HIDDEN) {
return;
}
if ($bFromWall) {
$this->_oModule->_iOwnerId = (int) $oAlert->aExtras['owner_id'];
$sMedia = strtolower(str_replace('bx_', '', $oAlert->sUnit));
$aMediaInfo = $this->_oModule->_oTemplate->getCommonMedia($sMedia, $oAlert->iObject);
$iOwnerId = $this->_oModule->_iOwnerId;
$iObjectId = $this->_oModule->_getAuthorId();
$sType = $this->_oModule->_oConfig->getCommonPostPrefix() . $sMedia;
$sAction = '';
$sContent = serialize(array('type' => $sMedia, 'id' => $oAlert->iObject));
$sTitle = $aMediaInfo['title'];
$sDescription = $aMediaInfo['description'];
} else {
$iOwnerId = $oAlert->iSender;
$iObjectId = $oAlert->iObject;
$sType = $oAlert->sUnit;
$sAction = $oAlert->sAction;
$sContent = is_array($oAlert->aExtras) && !empty($oAlert->aExtras) ? serialize($oAlert->aExtras) : '';
$sTitle = $sDescription = '';
}
if ($oAlert->sUnit == 'profile' && $oAlert->sAction == 'delete') {
$this->_oModule->_oDb->deleteEvent(array('owner_id' => $oAlert->iObject));
$this->_oModule->_oDb->deleteEventCommon(array('object_id' => $oAlert->iObject));
//delete all subscriptions
$oSubscription = new BxDolSubscription();
$oSubscription->unsubscribe(array('type' => 'object_id', 'unit' => 'bx_wall', 'object_id' => $oAlert->iObject));
return;
}
if ($oAlert->sUnit == 'profile' && $oAlert->sAction == 'edit' && $iOwnerId != $iObjectId) {
return;
}
$iId = $this->_oModule->_oDb->insertEvent(array('owner_id' => $iOwnerId, 'object_id' => $iObjectId, 'type' => $sType, 'action' => $sAction, 'content' => process_db_input($sContent, BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION), 'title' => process_db_input($sTitle, BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION), 'description' => process_db_input($sDescription, BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION)));
if ($bFromWall) {
echo "<script>parent." . $this->_oModule->_sJsPostObject . "._getPost(null, " . $iId . ")</script>";
} else {
$this->_oModule->_oDb->updateSimilarObject($iId, $oAlert);
}
}
开发者ID:noormcs,项目名称:studoro,代码行数:48,代码来源:BxWallResponse.php
示例9: alert
/**
* Notifies the necessary handlers about the alert.
*/
function alert()
{
$oSubscription = new BxDolSubscription();
$oSubscription->send($this->sUnit, $this->sAction, $this->iObject, $this->aExtras);
if (isset($this->_aAlerts[$this->sUnit]) && isset($this->_aAlerts[$this->sUnit][$this->sAction])) {
foreach ($this->_aAlerts[$this->sUnit][$this->sAction] as $iHandlerId) {
$aHandler = $this->_aHandlers[$iHandlerId];
if (!empty($aHandler['file']) && !empty($aHandler['class']) && file_exists(BX_DIRECTORY_PATH_ROOT . $aHandler['file'])) {
if (!class_exists($aHandler['class'])) {
require_once BX_DIRECTORY_PATH_ROOT . $aHandler['file'];
}
$oHandler = new $aHandler['class']();
$oHandler->response($this);
} else {
if (!empty($aHandler['eval'])) {
eval($aHandler['eval']);
}
}
}
}
}
开发者ID:noormcs,项目名称:studoro,代码行数:24,代码来源:BxDolAlerts.php
示例10: getBlockCode_ViewActions
function getBlockCode_ViewActions()
{
global $oFunctions;
if ($this->_oSites->iOwnerId || $this->_oSites->isAdmin()) {
$aInfo = array('iViewer' => $this->_oSites->iOwnerId, 'ownerID' => (int) $this->_aSite['ownerid'], 'ID' => (int) $this->_aSite['id'], 'TitleEdit' => $this->_oSites->isAllowedEdit($this->_aSite) ? _t('_bx_sites_action_title_edit') : '', 'TitleDelete' => $this->_oSites->isAllowedDelete($this->_aSite) ? _t('_bx_sites_action_title_delete') : '', 'TitleShare' => $this->_oSites->isAllowedShareSite($this->_aSite) ? _t('_bx_sites_action_title_share') : '', 'AddToFeatured' => $this->_oSites->isAllowedMarkAsFeatured($this->_aSite) && (int) $this->_aSite['allowView'] == BX_DOL_PG_ALL ? (int) $this->_aSite['featured'] == 1 ? _t('_bx_sites_action_remove_from_featured') : _t('_bx_sites_action_add_to_featured') : '');
$oSubscription = new BxDolSubscription();
$aButton = $oSubscription->getButton($this->_oSites->iOwnerId, 'bx_sites', '', $this->_aSite['id']);
$aInfo['sbs_sites_title'] = $aButton['title'];
$aInfo['sbs_sites_script'] = $aButton['script'];
if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleShare'] && !$aInfo['AddToFeatured'] && !$aInfo['sbs_sites_title']) {
return '';
}
$sScript = '';
if ($aInfo['TitleShare']) {
$sUrlSharePopup = BX_DOL_URL_ROOT . $this->_oSites->_oConfig->getBaseUri() . "share_popup/" . $this->_aSite['id'];
$sScript = <<<EOF
<script type="text/javascript">
function bx_site_show_share_popup ()
{
if (!\$('#bx_sites_share_popup').length) {
\$('<div id="bx_sites_share_popup" style="display: none;"></div>').prependTo('body');
}
\$('#bx_sites_share_popup').load(
'{$sUrlSharePopup}',
function() {
\$(this).dolPopup({fog: {color: '#fff', opacity: .7}});
}
);
}
</script>
EOF;
}
return $oSubscription->getData() . $sScript . $oFunctions->genObjectsActions($aInfo, 'bx_sites');
}
return '';
}
开发者ID:Arvindvi,项目名称:dolphin,代码行数:37,代码来源:BxSitesPageView.php
示例11: getBlockCode_ViewActions
function getBlockCode_ViewActions()
{
global $oFunctions;
if ($this->_oSites->iOwnerId || $this->_oSites->isAdmin()) {
$sCode = '';
$aInfo = array('iViewer' => $this->_oSites->iOwnerId, 'ownerID' => (int) $this->_aSite['ownerid'], 'ID' => (int) $this->_aSite['id'], 'TitleEdit' => $this->_oSites->isAllowedEdit($this->_aSite) ? _t('_bx_sites_action_title_edit') : '', 'TitleDelete' => $this->_oSites->isAllowedDelete($this->_aSite) ? _t('_bx_sites_action_title_delete') : '', 'TitleShare' => $this->_oSites->isAllowedShare($this->_aSite) ? _t('_Share') : '', 'AddToFeatured' => $this->_oSites->isAllowedMarkAsFeatured($this->_aSite) && (int) $this->_aSite['allowView'] == BX_DOL_PG_ALL ? (int) $this->_aSite['featured'] == 1 ? _t('_bx_sites_action_remove_from_featured') : _t('_bx_sites_action_add_to_featured') : '');
$oSubscription = BxDolSubscription::getInstance();
$aButton = $oSubscription->getButton($this->_oSites->iOwnerId, 'bx_sites', '', $this->_aSite['id']);
$sCode .= $oSubscription->getData();
$aInfo['sbs_sites_title'] = $aButton['title'];
$aInfo['sbs_sites_script'] = $aButton['script'];
if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleShare'] && !$aInfo['AddToFeatured'] && !$aInfo['sbs_sites_title']) {
return '';
}
if ($aInfo['TitleShare']) {
$sUrlSharePopup = BX_DOL_URL_ROOT . $this->_oSites->_oConfig->getBaseUri() . "share_popup/" . $this->_aSite['id'];
$sCode .= <<<EOF
<script type="text/javascript">
function bx_site_show_share_popup ()
{
if (!\$('#bx_sites_share_popup').length) {
\$('<div id="bx_sites_share_popup" style="display: none;"></div>').prependTo('body');
}
\$('#bx_sites_share_popup').load(
'{$sUrlSharePopup}',
function() {
\$(this).dolPopup();
}
);
}
</script>
EOF;
}
$aInfo['repostCpt'] = $aInfo['repostScript'] = '';
if (BxDolRequest::serviceExists('wall', 'get_repost_js_click')) {
$sCode .= BxDolService::call('wall', 'get_repost_js_script');
$aInfo['repostCpt'] = _t('_Repost');
$aInfo['repostScript'] = BxDolService::call('wall', 'get_repost_js_click', array($this->_oSites->iOwnerId, 'bx_sites', 'add', (int) $this->_aSite['id']));
}
$aCodeActions = $oFunctions->genObjectsActions($aInfo, 'bx_sites');
if (empty($aCodeActions)) {
return '';
}
return $sCode . $aCodeActions;
}
return '';
}
开发者ID:boonex,项目名称:dolphin.pro,代码行数:48,代码来源:BxSitesPageView.php
示例12: getBlockCode_Actions
function getBlockCode_Actions()
{
global $oFunctions;
if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
$sCode = '';
$oSubscription = BxDolSubscription::getInstance();
$aSubscribeButton = $oSubscription->getButton($this->_oMain->_iProfileId, 'bx_store', '', (int) $this->aDataEntry['id']);
$sCode .= $oSubscription->getData();
$aInfo = array('BaseUri' => $this->_oMain->_oConfig->getBaseUri(), 'iViewer' => $this->_oMain->_iProfileId, 'ownerID' => (int) $this->aDataEntry['author_id'], 'ID' => (int) $this->aDataEntry['id'], 'URI' => (int) $this->aDataEntry['uri'], 'ScriptSubscribe' => $aSubscribeButton['script'], 'TitleSubscribe' => $aSubscribeButton['title'], 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_store_action_title_edit') : '', 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_store_action_title_delete') : '', 'TitleShare' => $this->_oMain->isAllowedShare($this->aDataEntry) ? _t('_bx_store_action_title_share') : '', 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_store_action_title_broadcast') : '', 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? $this->aDataEntry['featured'] ? _t('_bx_store_action_remove_from_featured') : _t('_bx_store_action_add_to_featured') : '', 'TitleActivate' => method_exists($this->_oMain, 'isAllowedActivate') && $this->_oMain->isAllowedActivate($this->aDataEntry) ? _t('_bx_store_admin_activate') : '');
if (BxDolRequest::serviceExists('wall', 'get_repost_js_click')) {
$sCode .= BxDolService::call('wall', 'get_repost_js_script');
$aInfo['repostCpt'] = _t('_Repost');
$aInfo['repostScript'] = BxDolService::call('wall', 'get_repost_js_click', array($this->_oMain->_iProfileId, 'bx_store', 'add', (int) $this->aDataEntry['id']));
}
$sCodeActions = $oFunctions->genObjectsActions($aInfo, 'bx_store');
if (empty($sCodeActions)) {
return '';
}
return $sCode . $sCodeActions;
}
return '';
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:22,代码来源:BxStorePageView.php
示例13: getBlockCode_Actions
function getBlockCode_Actions()
{
global $oFunctions;
if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
$sCode = '';
$oSubscription = BxDolSubscription::getInstance();
$aSubscribeButton = $oSubscription->getButton($this->_oMain->_iProfileId, 'bx_events', '', (int) $this->aDataEntry['ID']);
$sCode .= $oSubscription->getData();
$isFan = $this->_oDb->isFan((int) $this->aDataEntry['ID'], $this->_oMain->_iProfileId, 0) || $this->_oDb->isFan((int) $this->aDataEntry['ID'], $this->_oMain->_iProfileId, 1);
$this->aInfo = array('BaseUri' => $this->_oMain->_oConfig->getBaseUri(), 'iViewer' => $this->_oMain->_iProfileId, 'ownerID' => (int) $this->aDataEntry['ResponsibleID'], 'ID' => (int) $this->aDataEntry['ID'], 'URI' => $this->aDataEntry['EntryUri'], 'ScriptSubscribe' => $aSubscribeButton['script'], 'TitleSubscribe' => $aSubscribeButton['title'], 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_events_action_title_edit') : '', 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_events_action_title_delete') : '', 'TitleJoin' => $this->_oMain->isAllowedJoin($this->aDataEntry) ? $isFan ? _t('_bx_events_action_title_leave') : _t('_bx_events_action_title_join') : '', 'IconJoin' => $isFan ? 'sign-out' : 'sign-in', 'TitleInvite' => $this->_oMain->isAllowedSendInvitation($this->aDataEntry) ? _t('_bx_events_action_title_invite') : '', 'TitleShare' => $this->_oMain->isAllowedShare($this->aDataEntry) ? _t('_bx_events_action_title_share') : '', 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_events_action_title_broadcast') : '', 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? $this->aDataEntry['Featured'] ? _t('_bx_events_action_remove_from_featured') : _t('_bx_events_action_add_to_featured') : '', 'TitleManageFans' => $this->_oMain->isAllowedManageFans($this->aDataEntry) ? _t('_bx_events_action_manage_fans') : '', 'TitleUploadPhotos' => $this->_oMain->isAllowedUploadPhotos($this->aDataEntry) ? _t('_bx_events_action_upload_photos') : '', 'TitleUploadVideos' => $this->_oMain->isAllowedUploadVideos($this->aDataEntry) ? _t('_bx_events_action_upload_videos') : '', 'TitleUploadSounds' => $this->_oMain->isAllowedUploadSounds($this->aDataEntry) ? _t('_bx_events_action_upload_sounds') : '', 'TitleUploadFiles' => $this->_oMain->isAllowedUploadFiles($this->aDataEntry) ? _t('_bx_events_action_upload_files') : '', 'TitleActivate' => method_exists($this->_oMain, 'isAllowedActivate') && $this->_oMain->isAllowedActivate($this->aDataEntry) ? _t('_bx_events_admin_activate') : '');
if (BxDolRequest::serviceExists('wall', 'get_repost_js_click')) {
$sCode .= BxDolService::call('wall', 'get_repost_js_script');
$this->aInfo['repostCpt'] = _t('_Repost');
$this->aInfo['repostScript'] = BxDolService::call('wall', 'get_repost_js_click', array($this->_oMain->_iProfileId, 'bx_events', 'add', (int) $this->aDataEntry['ID']));
}
$sCodeActions = $oFunctions->genObjectsActions($this->aInfo, 'bx_events');
if (empty($sCodeActions)) {
return '';
}
return $sCode . $sCodeActions;
}
return '';
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:23,代码来源:BxEventsPageView.php
示例14: bx_import
/***************************************************************************
*
* This is a free software; you can modify it under the terms of BoonEx
* Product License Agreement published on BoonEx site at http://www.boonex.com/downloads/license.pdf
* You may not however distribute it for free or/and a fee.
* This notice may not be removed from the source code. You may not also remove any other visible
* reference and links to BoonEx Group as provided in source code.
*
***************************************************************************/
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'languages.inc.php';
require_once BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php';
bx_import('BxDolSubscription');
$oSubscription = new BxDolSubscription();
$aResult = array();
if (isset($_POST['direction'])) {
$sUnit = process_db_input($_POST['unit']);
$sAction = process_db_input($_POST['action']);
$iObjectId = (int) $_POST['object_id'];
switch ($_POST['direction']) {
case 'subscribe':
if (isset($_POST['user_id']) && (int) $_POST['user_id'] != 0) {
$aResult = $oSubscription->subscribeMember((int) $_POST['user_id'], $sUnit, $sAction, $iObjectId);
} else {
if (isset($_POST['user_name']) && isset($_POST['user_email'])) {
$aResult = $oSubscription->subscribeVisitor($_POST['user_name'], $_POST['user_email'], $sUnit, $sAction, $iObjectId);
}
}
break;
开发者ID:noormcs,项目名称:studoro,代码行数:31,代码来源:subscription.php
示例15: _deleteFile
function _deleteFile($iFileId)
{
$aInfo = $this->serviceCheckDelete($iFileId);
if (!$aInfo) {
return false;
}
if ($this->_oDb->deleteData($iFileId)) {
$aFilesPostfix = $this->_oConfig->aFilePostfix;
//delete temp files
$aFilesPostfix['temp'] = '';
if (isset($aFilesPostfix['original'])) {
$aFilesPostfix['original'] = $this->_getOriginalExt($aInfo, $aFilesPostfix['original']);
}
foreach ($aFilesPostfix as $sValue) {
$sFilePath = $this->_oConfig->getFilesPath() . $iFileId . $sValue;
@unlink($sFilePath);
}
bx_import('BxDolVoting');
$oVoting = new BxDolVoting($this->_oConfig->getMainPrefix(), 0, 0);
$oVoting->deleteVotings($iFileId);
bx_import('BxDolCmts');
$oCmts = new BxDolCmts($this->_oConfig->getMainPrefix(), $iFileId);
$oCmts->onObjectDelete();
bx_import('BxDolCategories');
//tags & categories parsing
$oTag = new BxDolTags();
$oTag->reparseObjTags($this->_oConfig->getMainPrefix(), $iFileId);
$oCateg = new BxDolCategories();
$oCateg->reparseObjTags($this->_oConfig->getMainPrefix(), $iFileId);
$bUpdateCounter = $aInfo['Approved'] == 'approved' ? true : false;
$this->oAlbums->removeObjectTotal($iFileId, $bUpdateCounter);
//delete all subscriptions
$oSubscription = BxDolSubscription::getInstance();
$oSubscription->unsubscribe(array('type' => 'object_id', 'unit' => $this->_oConfig->getMainPrefix(), 'object_id' => $iFileId));
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'delete', $iFileId, $this->_iProfileId, $aInfo);
$oAlert->alert();
$this->isAllowedDelete($aInfo, true);
} else {
return false;
}
return true;
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:43,代码来源:BxDolFilesModule.php
示例16: getProfileViewActions
function getProfileViewActions($iProfileId, $bDynamic = false)
{
global $oTemplConfig;
$iProfileId = (int) $iProfileId;
if (!$iProfileId) {
return '';
}
$aProfileInfo = getProfileInfo($iProfileId);
if (empty($aProfileInfo)) {
return '';
}
$iViewerId = getLoggedId();
// prepare all needed keys
$aConfig = array('url' => BX_DOL_URL_ROOT, 'anonym_mode' => '', 'member_id' => $iViewerId, 'member_pass' => getPassword($iViewerId));
$aMainKeys = array('cpt_edit', 'cpt_send_letter', 'cpt_fave', 'cpt_befriend', 'cpt_remove_friend', 'cpt_get_mail', 'cpt_share', 'cpt_report', 'cpt_block', 'cpt_unblock', 'cpt_activate', 'cpt_ban', 'cpt_delete', 'cpt_delete_spam', 'cpt_feature', 'act_activate', 'act_ban', 'act_feature');
$aMain = array_fill_keys($aMainKeys, '');
if (isMember($iViewerId)) {
$aMain['cpt_edit'] = _t('_EditProfile');
$aMain['cpt_send_letter'] = _t('_SendLetter');
$aMain['cpt_fave'] = _t('_Fave');
$aMain['cpt_remove_fave'] = _t('_Remove Fave');
$aMain['cpt_befriend'] = _t('_Befriend');
$aMain['cpt_remove_friend'] = _t('_Remove friend');
$aMain['cpt_get_mail'] = _t('_Get E-mail');
$aMain['cpt_share'] = $this->isAllowedShare($this->_aProfile) ? _t('_Share') : '';
$aMain['cpt_report'] = _t('_Report Spam');
$aMain['cpt_block'] = _t('_Block');
$aMain['cpt_unblock'] = _t('_Unblock');
}
if (isAdmin($iViewerId) || isModerator($iViewerId) and $iViewerId != $iProfileId) {
$sMsgKeyStart = '_adm_btn_mp_';
// delete
$aMain['cpt_delete'] = _t($sMsgKeyStart . 'delete');
// delete spam
$aMain['cpt_delete_spam'] = _t($sMsgKeyStart . 'delete_spammer');
// activate / deactivate
$sTypeActiv = 'activate';
if ($aProfileInfo['Status'] == 'Active') {
$sTypeActiv = 'de' . $sTypeActiv;
}
$aMain['cpt_activate'] = _t($sMsgKeyStart . $sTypeActiv);
$aMain['act_activate'] = $sTypeActiv;
// ban / unban
$sTypeBan = 'ban';
if (isLoggedBanned($aProfileInfo['ID'])) {
$sTypeBan = 'un' . $sTypeBan;
}
$aMain['cpt_ban'] = _t($sMsgKeyStart . $sTypeBan);
$aMain['act_ban'] = $sTypeBan;
// feature / unfeature
$sTypeFeat = 'featured';
$aMain['cpt_feature'] = _t('_Feature it');
if ((int) $aProfileInfo['Featured']) {
$sTypeFeat = 'un' . $sTypeFeat;
$aMain['cpt_feature'] = _t('_De-Feature it');
}
$aMain['act_feature'] = $sTypeFeat;
}
//--- Subscription integration ---//
$oSubscription = BxDolSubscription::getInstance();
$sAddon = $oSubscription->getData($bDynamic);
$aButton = $oSubscription->getButton($iViewerId, 'profile', '', $iProfileId);
$aMain['sbs_profile_title'] = $aButton['title'];
$aMain['sbs_profile_script'] = $aButton['script'];
//--- Subscription integration ---//
$aCheckGreet = checkAction(getLoggedId(), ACTION_ID_SEND_VKISS);
$aMain['cpt_greet'] = $aCheckGreet[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED ? _t('_Greet') : '';
$aMain = array_merge($aProfileInfo, $aConfig, $aMain);
return $sAddon . $this->genObjectsActions($aMain, 'Profile');
}
开发者ID:robbie778,项目名称:dolphin.pro,代码行数:70,代码来源:BxBaseFunctions.php
示例17: ActionPrintAdvertisement
/**
* Generate presentation Advertisement code with images and other
*
* @param $iID ID of Advertisement
* @return HTML presentation of data
*/
function ActionPrintAdvertisement($iID)
{
global $site;
global $aPreValues;
$iAdvertisementID = (int) $iID;
$sRetHtml = '';
$sSiteUrl = BX_DOL_URL_ROOT;
if ($this->bAdminMode && $iAdvertisementID > 0) {
$iFeaturedStatus = $this->_oDb->getFeaturedStatus($iAdvertisementID);
$iNewStatus = $iFeaturedStatus == 1 ? 0 : 1;
if (bx_get('do') == 'cfs') {
$this->_oDb->UpdateFeatureStatus($iAdvertisementID, $iNewStatus);
}
}
$aSqlResStr = $this->_oDb->getAdInfo($iAdvertisementID);
if ($aSqlResStr) {
$iOwnerID = (int) $aSqlResStr['IDProfile'];
$bPossibleToView = $this->oPrivacy->check('view', $iAdvertisementID, $this->_iVisitorID);
if ($this->isAllowedView($iOwnerID, true) == false || $bPossibleToView == false) {
return $this->_oTemplate->displayAccessDenied();
}
bx_import('BxDolViews');
new BxDolViews('ads', $iAdvertisementID);
$aNameRet = getProfileInfo($aSqlResStr['IDProfile']);
$sCountryName = $aSqlResStr['Country'];
$sCountryPic = $sCountryName == '' ? '' : ' <img alt="' . $sCountryName . '" src="' . ($site['flags'] . strtolower($sCountryName)) . '.gif"/>';
$sCountryName = _t($aPreValues['Country'][$sCountryName]['LKey']);
$sPostedByC = _t('_bx_ads_Posted_by');
$sPhoneC = _t('_Phone');
$sDetailsC = _t('_bx_ads_Details');
$sUserOtherListC = _t('_bx_ads_Users_other_listing');
$sActionsC = _t('_Actions');
$sSureC = _t('_Are_you_sure');
$sPostedBy .= '<div class="cls_res_info">';
$sPostedBy .= $sPostedByC . ': <span style="color:#333333;"><a href="' . getProfileLink($aNameRet['ID']) . '">' . $aNameRet['NickName'] . '</a></span>';
$sPostedBy .= '</div>';
if ($aNameRet['Phone'] != "") {
$sPostedBy .= '<div class="cls_res_info">';
$sPostedBy .= $sPhoneC . ": <div class=\"clr3\">{$aNameRet['Phone']}</div>";
$sPostedBy .= '</div>';
}
$sTimeAgo = defineTimeInterval($aSqlResStr['DateTime_UTS'], false);
$aTags = array();
$aTagsLinks = array();
$aTags = preg_split("/[;,]/", $aSqlResStr['Tags']);
foreach ($aTags as $sTag) {
$sSubLink = $this->bUseFriendlyLinks ? "ads/tag/" : $this->sHomeUrl . "classifieds_tags.php?tag=";
$sTagS = htmlspecialchars(title2uri($sTag));
$aTagsLinks[] = '<a href="' . "{$sSubLink}{$sTagS}" . '">' . $sTag . '</a>';
}
$sTags .= implode(", ", $aTagsLinks);
$sMemberActionForms = '';
if ($this->_iVisitorID > 0 && $this->_iVisitorID != $aNameRet['ID']) {
//print Send PM button and other actions
if (getParam('bx_ads_enable_paid') == 'on') {
$sMemberActionForms .= <<<EOF
<form action="{$this->sCurrBrowsedFile}" name="BuyNowForm" method="post">
<input type="hidden" name="BuyNow" value="BuyNow" />
<input type="hidden" name="IDAdv" value="{$iAdvertisementID}&qu
|
请发表评论