コード例 #1
0
ファイル: BxWallModule.php プロジェクト: boonex/dolphin.pro
 /**
  * Constructor
  */
 function __construct($aModule)
 {
     parent::__construct($aModule);
     $this->_oConfig->init($this->_oDb);
     $this->_oTemplate->init($this);
     $this->_iOwnerId = 0;
     //--- Define Membership Actions ---//
     defineMembershipActions(array('timeline repost', 'timeline post comment', 'timeline delete comment'), 'ACTION_ID_');
 }
コード例 #2
0
ファイル: BxWallModule.php プロジェクト: noormcs/studoro
 /**
  * Constructor
  */
 function BxWallModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->_oConfig->init($this->_oDb);
     $this->_oTemplate->init($this);
     $this->_iOwnerId = 0;
     $this->_sJsPostObject = $this->_oConfig->getJsObject('post');
     $this->_sJsViewObject = $this->_oConfig->getJsObject('view');
     $this->_sJsOutlineObject = $this->_oConfig->getJsObject('outline');
     //--- Define Membership Actions ---//
     defineMembershipActions(array('timeline post comment', 'timeline delete comment'), 'ACTION_ID_');
 }
コード例 #3
0
ファイル: BxWallModule.php プロジェクト: dalinhuang/shopexts
 /**
  * Constructor
  */
 function BxWallModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->_oConfig->init($this->_oDb);
     $this->_bJsMode = false;
     $this->_iOwnerId = 0;
     $this->_aHandlers = array();
     foreach ($this->_oDb->getHandlers() as $aHandler) {
         $this->_aHandlers[$aHandler['alert_unit'] . '_' . $aHandler['alert_action']] = $aHandler;
     }
     $this->_sJsPostObject = 'oWallPost';
     $this->_sJsViewObject = 'oWallView';
     //--- Define Membership Actions ---//
     defineMembershipActions(array('wall post comment', 'wall delete comment'), 'ACTION_ID_');
 }
コード例 #4
0
ファイル: BxFdbModule.php プロジェクト: toxalot/dolphin.pro
 /**
  * Constructor
  */
 function __construct($aModule)
 {
     parent::__construct($aModule);
     //--- Define Membership Actions ---//
     defineMembershipActions(array('feedback delete'), 'ACTION_ID_');
 }
コード例 #5
0
 function _defineActions()
 {
     defineMembershipActions(array('groups view group', 'groups browse', 'groups search', 'groups add group', 'groups comments delete and edit', 'groups edit any group', 'groups delete any group', 'groups mark as featured', 'groups approve groups', 'groups broadcast message'));
 }
コード例 #6
0
 function _defineActions()
 {
     defineMembershipActions(array('use simple messenger'));
 }
コード例 #7
0
ファイル: BxAvaModule.php プロジェクト: noormcs/studoro
 function _defineActions()
 {
     defineMembershipActions(array('avatar upload', 'avatar edit any', 'avatar delete any'));
 }
コード例 #8
0
 function _isMembershipEnabledFor($iProfileId, $sMembershipActionConstant, $isPerformAction = false)
 {
     defineMembershipActions(array('photos add', 'photos view', 'sounds view', 'videos view'));
     if (!defined($sMembershipActionConstant)) {
         return false;
     }
     $aCheck = checkAction($iProfileId ? $iProfileId : $_COOKIE['memberID'], constant($sMembershipActionConstant), $isPerformAction);
     return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
 }
コード例 #9
0
ファイル: BxArlModule.php プロジェクト: dalinhuang/shopexts
 /**
  * Constructor
  */
 function BxArlModule($aModule)
 {
     parent::BxDolTextModule($aModule);
     //--- Define Membership Actions ---//
     defineMembershipActions(array('articles delete'), 'ACTION_ID_');
 }
コード例 #10
0
ファイル: callback.php プロジェクト: noormcs/studoro
function defineForumActions()
{
    defineMembershipActions(array('forum public read', 'forum public post', 'forum private read', 'forum private post', 'forum search', 'forum edit all', 'forum delete all', 'forum make sticky', 'forum del topics', 'forum move topics', 'forum hide topics', 'forum unhide topics', 'forum hide posts', 'forum unhide posts', 'forum files download'));
}
コード例 #11
0
 /**
  * Define all membership actions
  *
  * @return void
  */
 function _defineActions()
 {
     defineMembershipActions(array('shoutbox use', 'shoutbox delete messages', 'shoutbox block by ip'));
 }
コード例 #12
0
ファイル: BxFdbModule.php プロジェクト: Gotgot59/dolphin.pro
 /**
  * Constructor
  */
 function BxFdbModule($aModule)
 {
     parent::BxDolTextModule($aModule);
     //--- Define Membership Actions ---//
     defineMembershipActions(array('feedback delete'), 'ACTION_ID_');
 }
コード例 #13
0
 function _defineActions()
 {
     defineMembershipActions(array('events view', 'events browse', 'events search', 'events add', 'events comments delete and edit', 'events edit any event', 'events delete any event', 'events mark as featured', 'events approve', 'events broadcast message'));
 }
コード例 #14
0
 function _defineActions()
 {
     defineMembershipActions(array('clonetwo view clonetwo', 'clonetwo browse', 'clonetwo search', 'clonetwo add clonetwo', 'clonetwo comments delete and edit', 'clonetwo edit any clonetwo', 'clonetwo delete any clonetwo', 'clonetwo mark as featured', 'clonetwo approve clonetwo', 'clonetwo broadcast message'), 'ML_');
 }
コード例 #15
0
ファイル: BxPollModule.php プロジェクト: toxalot/dolphin.pro
 function _defineActions()
 {
     defineMembershipActions(array('create polls'));
 }
コード例 #16
0
ファイル: BxAdsModule.php プロジェクト: newton27/dolphin.pro
 function _defineActions()
 {
     defineMembershipActions(array('ads view', 'ads browse', 'ads search', 'ads add', 'ads edit any ad', 'ads delete any ad', 'ads approving'));
 }
コード例 #17
0
 function _defineActions()
 {
     $aActionList = $this->_defineActionsArray();
     defineMembershipActions($aActionList);
 }
コード例 #18
0
ファイル: BxDolTwigModule.php プロジェクト: noormcs/studoro
 function _isMembershipEnabledFor($sMembershipActionConstant)
 {
     defineMembershipActions(array('photos add', 'sounds add', 'videos add', 'files add'));
     if (!defined($sMembershipActionConstant)) {
         return false;
     }
     $aCheck = checkAction(getLoggedId(), constant($sMembershipActionConstant));
     return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
 }
コード例 #19
0
 function _defineActions()
 {
     defineMembershipActions(array('blog view', 'blog post view', 'blogs browse', 'blogs posts browse', 'blog post search', 'blog post add', 'blog posts edit any post', 'blog posts delete any post', 'blog posts approving', 'blog posts comments delete and edit'));
 }
コード例 #20
0
ファイル: BxDolMailBox.php プロジェクト: toxalot/dolphin.pro
 function _defineActions()
 {
     defineMembershipActions(array('send messages'));
 }
コード例 #21
0
 function _defineActions()
 {
     defineMembershipActions(array('store view product', 'store browse', 'store search', 'store add product', 'store edit any product', 'store delete any product', 'store mark as featured', 'store approve product', 'store broadcast message'));
 }
コード例 #22
0
 function _defineActions()
 {
     defineMembershipActions(array('sites view', 'sites browse', 'sites search', 'sites add', 'sites edit any site', 'sites delete any site', 'sites mark as featured', 'sites approve'));
 }
コード例 #23
0
 function processMembershipChecksForMediaUploads(&$aInputs)
 {
     $isAdmin = $GLOBALS['logged']['admin'] && isProfileActive($this->_iProfileId);
     defineMembershipActions(array('photos add', 'sounds add', 'videos add', 'files add'));
     if (defined('BX_PHOTOS_ADD')) {
         $aCheck = checkAction(getLoggedId(), BX_PHOTOS_ADD);
     }
     if (!defined('BX_PHOTOS_ADD') || $aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED && !$isAdmin) {
         unset($aInputs['thumb']);
     }
     $a = array('images' => 'PHOTOS', 'videos' => 'VIDEOS', 'sounds' => 'SOUNDS', 'files' => 'FILES');
     foreach ($a as $k => $v) {
         if (defined("BX_{$v}_ADD")) {
             $aCheck = checkAction(getLoggedId(), constant("BX_{$v}_ADD"));
         }
         if ((!defined("BX_{$v}_ADD") || $aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) && !$isAdmin) {
             unset($this->_aMedia[$k]);
             unset($aInputs['header_' . $k]);
             unset($aInputs[$k . '_choice']);
             unset($aInputs[$k . '_upload']);
         }
     }
 }
コード例 #24
0
ファイル: callback.php プロジェクト: dalinhuang/shopexts
function getUserPerm($sUser, $sType, $sAction, $iForumId)
{
    global $logged;
    $iMemberId = $logged['member'] || $logged['admin'] ? $_COOKIE['memberID'] : 0;
    $isOrcaAdmin = $logged['admin'];
    $isLoggedIn = $iMemberId ? 1 : 0;
    defineMembershipActions(array('forum public read', 'forum public post', 'forum private read', 'forum private post', 'forum search', 'forum edit all', 'forum delete all', 'forum make sticky', 'forum del topics', 'forum move topics', 'forum hide topics', 'forum unhide topics', 'forum hide posts', 'forum unhide posts', 'forum files download'));
    $isPublicForumReadAllowed = ($aCheck = checkAction($iMemberId, BX_FORUM_PUBLIC_READ, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isPublicForumPostAllowed = $isLoggedIn && ($aCheck = checkAction($iMemberId, BX_FORUM_PUBLIC_POST, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isPrivateForumReadAllowed = $isLoggedIn && ($aCheck = checkAction($iMemberId, BX_FORUM_PRIVATE_READ, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isPrivateForumPostAllowed = $isLoggedIn && ($aCheck = checkAction($iMemberId, BX_FORUM_PRIVATE_POST, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isEditAllAllowed = ($aCheck = checkAction($iMemberId, BX_FORUM_EDIT_ALL, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    $isDelAllAllowed = ($aCheck = checkAction($iMemberId, BX_FORUM_DELETE_ALL, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0;
    return array('read_public' => $isOrcaAdmin || $isPublicForumReadAllowed, 'post_public' => $isOrcaAdmin || $isPublicForumPostAllowed ? 1 : 0, 'edit_public' => $isOrcaAdmin || $isEditAllAllowed ? 1 : 0, 'del_public' => $isOrcaAdmin || $isEditAllAllowed ? 1 : 0, 'read_private' => $isOrcaAdmin || $isPrivateForumReadAllowed ? 1 : 0, 'post_private' => $isOrcaAdmin || $isPrivateForumPostAllowed ? 1 : 0, 'edit_private' => $isOrcaAdmin || $isEditAllAllowed ? 1 : 0, 'del_private' => $isOrcaAdmin || $isDelAllAllowed ? 1 : 0, 'edit_own' => 1, 'del_own' => 1, 'download_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_FILES_DOWNLOAD, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'search_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_SEARCH, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'sticky_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_MAKE_STICKY, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'del_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_DEL_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'move_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_MOVE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'hide_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'unhide_topics_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'hide_posts_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0, 'unhide_posts_' => $isOrcaAdmin || ($aCheck = checkAction($iMemberId, BX_FORUM_HIDE_TOPICS, true)) && CHECK_ACTION_RESULT_ALLOWED == $aCheck[CHECK_ACTION_RESULT] ? 1 : 0);
}