当前位置: 首页>>代码示例>>PHP>>正文


PHP CBuser::getMyUserDataInstance方法代码示例

本文整理汇总了PHP中CBuser::getMyUserDataInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP CBuser::getMyUserDataInstance方法的具体用法?PHP CBuser::getMyUserDataInstance怎么用?PHP CBuser::getMyUserDataInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBuser的用法示例。


在下文中一共展示了CBuser::getMyUserDataInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: activityQuery

	/**
	 * @param bool                        $count
	 * @param array                       $select
	 * @param array                       $where
	 * @param array                       $join
	 * @param CB\Plugin\Activity\Activity $stream
	 */
	public function activityQuery( $count, &$select, &$where, &$join, &$stream )
	{
		global $_CB_database;

		$join[]				=	'LEFT JOIN ' . $_CB_database->NameQuote( '#__groupjive_plugin_photo' ) . ' AS gj_p'
							.	' ON a.' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'groupjive' )
							.	' AND a.' . $_CB_database->NameQuote( 'subtype' ) . ' = ' . $_CB_database->Quote( 'group.photo' )
							.	' AND a.' . $_CB_database->NameQuote( 'item' ) . ' = gj_p.' . $_CB_database->NameQuote( 'id' );

		if ( ! CBGroupJive::isModerator() ) {
			$user			=	CBuser::getMyUserDataInstance();

			$where[]		=	'( ( a.' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'groupjive' )
							.	' AND a.' . $_CB_database->NameQuote( 'subtype' ) . ' = ' . $_CB_database->Quote( 'group.photo' )
							.	' AND gj_p.' . $_CB_database->NameQuote( 'id' ) . ' IS NOT NULL'
							.	' AND ( gj_p.' . $_CB_database->NameQuote( 'user_id' ) . ' = ' . (int) $user->get( 'id' )
							.		' OR ( gj_p.' . $_CB_database->NameQuote( 'published' ) . ' = 1'
							.		' AND ( gj_g.' . $_CB_database->NameQuote( 'type' ) . ' IN ( 1, 2 )'
							.		' OR gj_u.' . $_CB_database->NameQuote( 'status' ) . ' > 0 ) ) ) )'
							.	' OR ( a.' . $_CB_database->NameQuote( 'type' ) . ' != ' . $_CB_database->Quote( 'groupjive' )
							.	' OR ( a.' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'groupjive' )
							.	' AND a.' . $_CB_database->NameQuote( 'subtype' ) . ' != ' . $_CB_database->Quote( 'group.photo' ) . ' ) ) )';
		} else {
			$where[]		=	'( ( a.' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'groupjive' )
							.	' AND a.' . $_CB_database->NameQuote( 'subtype' ) . ' = ' . $_CB_database->Quote( 'group.photo' )
							.	' AND gj_p.' . $_CB_database->NameQuote( 'id' ) . ' IS NOT NULL )'
							.	' OR ( a.' . $_CB_database->NameQuote( 'type' ) . ' != ' . $_CB_database->Quote( 'groupjive' )
							.	' OR ( a.' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'groupjive' )
							.	' AND a.' . $_CB_database->NameQuote( 'subtype' ) . ' != ' . $_CB_database->Quote( 'group.photo' ) . ' ) ) )';
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:38,代码来源:cbgroupjivephoto.php

示例2: getCBpluginComponent

	/**
	 * @param  TabTable   $tab       Current tab
	 * @param  UserTable  $user      Current user
	 * @param  int        $ui        1 front, 2 admin UI
	 * @param  array      $postdata  Raw unfiltred POST data
	 * @return string                HTML
	 */
	public function getCBpluginComponent( $tab, $user, $ui, $postdata )
	{
		$format				=	$this->input( 'format', null, GetterInterface::STRING );

		if ( $format != 'raw' ) {
			outputCbJs();
			outputCbTemplate();
		}

		$action				=	$this->input( 'action', null, GetterInterface::STRING );
		$function			=	$this->input( 'func', null, GetterInterface::STRING );
		$id					=	(int) $this->input( 'id', null, GetterInterface::INT );
		$user				=	CBuser::getMyUserDataInstance();

		if ( $format != 'raw' ) {
			ob_start();
		}

		switch ( $action ) {
			case 'wall':
				switch ( $function ) {
					case 'publish':
						$this->stateWall( 1, $id, $user );
						break;
					case 'unpublish':
						$this->stateWall( 0, $id, $user );
						break;
					case 'delete':
						$this->deleteWall( $id, $user );
						break;
					case 'new':
						$this->showWallEdit( null, $user );
						break;
					case 'edit':
						$this->showWallEdit( $id, $user );
						break;
					case 'save':
						cbSpoofCheck( 'plugin' );
						$this->saveWallEdit( $id, $user );
						break;
				}
				break;
		}

		if ( $format != 'raw' ) {
			$html			=	ob_get_contents();
			ob_end_clean();

			$class			=	$this->_gjParams->get( 'general_class', null );

			$return			=	'<div class="cbGroupJive' . ( $class ? ' ' . htmlspecialchars( $class ) : null ) . '">'
							.		'<div class="cbGroupJiveInner">'
							.			$html
							.		'</div>'
							.	'</div>';

			echo $return;
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:66,代码来源:component.cbgroupjivewall.php

示例3: getCBpluginComponent

	/**
	 * @param null      $tab
	 * @param UserTable $user
	 * @param int       $ui
	 * @param array     $postdata
	 */
	public function getCBpluginComponent( $tab, $user, $ui, $postdata )
	{
		global $_CB_framework;

		outputCbJs( 1 );
		outputCbTemplate( 1 );

		$action			=	$this->input( 'action', null, GetterInterface::STRING );
		$function		=	$this->input( 'func', null, GetterInterface::STRING );
		$id				=	$this->input( 'id', null, GetterInterface::INT );
		$user			=	CBuser::getMyUserDataInstance();
		$profileUrl		=	$_CB_framework->userProfileUrl( $user->get( 'id' ), false );

		if ( ! $user->get( 'id' ) ) {
			$profileUrl	=	'index.php';
		}

		ob_start();
		switch ( $action ) {
			case 'privacy':
				switch ( $function ) {
					case 'disable':
						$this->disableProfile( $id, $user );
						break;
					case 'disableuser':
						cbSpoofCheck( 'plugin' );
						$this->disableUser( $id, $user );
						break;
					case 'delete':
						$this->deleteProfile( $id, $user );
						break;
					case 'deleteuser':
						cbSpoofCheck( 'plugin' );
						$this->deleteUser( $id, $user );
						break;
					default:
						cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
						break;
				}
				break;
			default:
				cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
				break;
		}
		$html			=	ob_get_contents();
		ob_end_clean();

		$class			=	$this->params->get( 'general_class', null );

		$return			=	'<div id="cbPrivacy" class="cbPrivacy' . ( $class ? ' ' . htmlspecialchars( $class ) : null ) . '">'
						.		'<div id="cbPrivacyInner" class="cbPrivacyInner">'
						.			$html
						.		'</div>'
						.	'</div>';

		echo $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:63,代码来源:component.cbprivacy.php

示例4: getCBpluginComponent

	/**
	 * @param null      $tab
	 * @param UserTable $user
	 * @param int       $ui
	 * @param array     $postdata
	 */
	public function getCBpluginComponent( $tab, $user, $ui, $postdata )
	{
		global $_CB_framework;

		outputCbJs( 1 );
		outputCbTemplate( 1 );

		$action					=	$this->input( 'action', null, GetterInterface::STRING );
		$function				=	$this->input( 'func', null, GetterInterface::STRING );
		$id						=	$this->input( 'id', null, GetterInterface::INT );
		$user					=	CBuser::getMyUserDataInstance();

		$tab					=	new TabTable();

		$tab->load( array( 'pluginclass' => 'cbinvitesTab' ) );

		$profileUrl				=	$_CB_framework->userProfileUrl( $user->get( 'id' ), false, 'cbinvitesTab' );

		if ( ! ( $tab->enabled && Application::MyUser()->canViewAccessLevel( $tab->viewaccesslevel ) ) ) {
			cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
		}

		ob_start();
		switch ( $action ) {
			case 'preparaty':
				switch ( $function ) {
					
					case 'delete':
						$this->deletePreparaty( $id, $user );
						break;

				}
				break;
			default:
				cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
				break;
		}
		$html					=	ob_get_contents();
		ob_end_clean();

		$class					=	$this->params->get( 'general_class', null );

		$return					=	'<div id="cbInvites" class="cbInvites' . ( $class ? ' ' . htmlspecialchars( $class ) : null ) . '">'
								.		'<div id="cbInvitesInner" class="cbInvitesInner">'
								.			$html
								.		'</div>'
								.	'</div>';

		echo $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:56,代码来源:component.cbpreparaty.php

示例5: sqlCleanQuote

 /**
  * Cleans the field value by type in a secure way for SQL
  *
  * @param  mixed                    $fieldValue
  * @param  string                   $type           const,sql,param : string,int,float,datetime,formula
  * @param  GetterInterface          $pluginParams
  * @param  DatabaseDriverInterface  $db
  * @param  array|null               $extDataModels
  * @return string|boolean                           STRING: sql-safe value, Quoted or type-casted to int or float, or FALSE in case of type error
  */
 public static function sqlCleanQuote($fieldValue, $type, GetterInterface $pluginParams, DatabaseDriverInterface $db, array $extDataModels = null)
 {
     $typeArray = explode(':', $type, 3);
     if (count($typeArray) < 2) {
         $typeArray = array('const', $type);
     }
     if ($typeArray[0] == 'param') {
         $fieldValue = $pluginParams->get($fieldValue);
     } elseif ($typeArray[0] == 'user') {
         // TODO: Change this to use Inversion Of Control, and allow XML valuetypes to be extended dynamically (e.g. instead of calling specifically CBLib\CB\User or similar when available, it is CB that adds the type and a closure to handle that type.
         if ($fieldValue == 'viewaccesslevels') {
             $fieldValue = Application::MyUser()->getAuthorisedViewLevels();
         } else {
             if ($fieldValue == 'usergroups') {
                 $fieldValue = Application::MyUser()->getAuthorisedGroups(false);
             } else {
                 $fieldValue = \CBuser::getMyUserDataInstance()->get($fieldValue);
             }
         }
     } elseif (in_array($typeArray[0], array('request', 'get', 'post', 'cookie', 'cbcookie', 'session', 'server', 'env'))) {
         $fieldValue = self::_globalConv($typeArray[0], $fieldValue);
     } elseif ($typeArray[0] == 'ext') {
         if (isset($typeArray[2]) && $extDataModels && isset($extDataModels[$typeArray[2]])) {
             $model = $extDataModels[$typeArray[2]];
             if (is_object($model)) {
                 if ($model instanceof ParamsInterface) {
                     $fieldValue = $model->get($fieldValue);
                 } elseif (isset($model->{$fieldValue})) {
                     $fieldValue = $model->{$fieldValue};
                 }
             } elseif (is_array($model)) {
                 if (isset($model[$fieldValue])) {
                     $fieldValue = $model[$fieldValue];
                 }
             } else {
                 $fieldValue = $model;
             }
         } else {
             trigger_error('SQLXML::sqlCleanQuote: ERROR: ext valuetype "' . htmlspecialchars($type) . '" has not been setExternalDataTypeValues.', E_USER_NOTICE);
         }
         // } elseif ( ( $typeArray[0] == 'const' ) || ( $cnt_valtypeArray[0] == 'sql' ) {
         //	$fieldValue	=	$fieldValue;
     }
     if (is_array($fieldValue)) {
         return self::cleanArrayType($fieldValue, $typeArray[1], $db);
     }
     return self::cleanScalarType($fieldValue, $typeArray[1], $db);
 }
开发者ID:Raul-mz,项目名称:web-erpcya,代码行数:58,代码来源:XmlTypeCleanQuote.php

示例6: __construct

	/**
	 * Constructor for stream object
	 *
	 * @param null|string    $source
	 * @param null|UserTable $user
	 */
	public function __construct( $source = null, $user = null )
	{
		global $_PLUGINS;

		parent::__construct();

		$_PLUGINS->loadPluginGroup( 'user' );

		if ( $source === null ) {
			$source			=	'stream';
		}

		if ( $user === null ) {
			$user			=	\CBuser::getMyUserDataInstance();
		}

		$this->source		=	$source;
		$this->user			=	$user;

		if ( ! $this->id ) {
			$this->id		=	uniqid();
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:29,代码来源:Stream.php

示例7: getDisplayTab

	/**
	 * @param TabTable  $tab
	 * @param UserTable $user
	 * @param int       $ui
	 * @return null|string
	 */
	public function getDisplayTab( $tab, $user, $ui )
	{
		global $_CB_framework, $_CB_database;

		if ( ( ! Application::MyUser()->isGlobalModerator() ) || Application::User( (int) $user->get( 'id' ) )->isGlobalModerator() ) {
			return null;
		}

		if ( ! ( $tab->params instanceof ParamsInterface ) ) {
			$tab->params			=	new Registry( $tab->params );
		}

		$blocksEnabled				=	( $this->params->get( 'general_block', 1 ) && $tab->params->get( 'tab_block', $this->tabBlock ) );
		$whitelistsEnabled			=	( $this->params->get( 'general_whitelist', 1 ) && $tab->params->get( 'tab_whitelist', $this->tabWhitelist ) );
		$attemptsEnabled			=	( $this->params->get( 'general_attempts', 1 ) && $tab->params->get( 'tab_attempts', $this->tabAttempts ) );
		$logsEnabled				=	( $this->params->get( 'general_log', 1 ) && $tab->params->get( 'tab_logs', $this->tabLogs ) );
		$return						=	null;

		if ( $blocksEnabled || $whitelistsEnabled || $attemptsEnabled || $logsEnabled ) {
			$tabPrefix				=	'tab_' . (int) $tab->get( 'tabid' ) . '_';
			$viewer					=	CBuser::getMyUserDataInstance();

			outputCbJs( 1 );
			outputCbTemplate( 1 );
			cbimport( 'cb.pagination' );

			cbantispamClass::getTemplate( 'tab' );

			$ipAddress				=	cbantispamClass::getUserIP( $user );
			$emailParts				=	explode( '@', $user->get( 'email' ) );
			$emailDomain			=	null;

			if ( count( $emailParts ) > 1 ) {
				$emailDomain		=	array_pop( $emailParts );
			}

			$blocks					=	null;

			if ( $blocksEnabled ) {
				cbantispamClass::getTemplate( 'blocks' );

				$blocksPrefix		=	$tabPrefix . 'blocks_';
				$limit				=	(int) $tab->params->get( 'tab_limit', 15 );
				$limitstart			=	$_CB_framework->getUserStateFromRequest( $blocksPrefix . 'limitstart{com_comprofiler}', $blocksPrefix . 'limitstart' );

				$query				=	'SELECT COUNT(*)'
									.	"\n FROM " . $_CB_database->NameQuote( '#__comprofiler_plugin_antispam_block' )
									.	"\n WHERE ( " . $_CB_database->NameQuote( 'type' ) . " = " . $_CB_database->Quote( 'user' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . (int) $user->get( 'id' ) . ' )'
									.	' OR ( ' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'email' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . $_CB_database->Quote( $user->get( 'email' ) ) . ' )';
				if ( $ipAddress ) {
					$query			.=	' OR ( ' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'ip' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . $_CB_database->Quote( $ipAddress ) . ' )';
				}
				if ( $emailDomain ) {
					$query			.=	' OR ( ' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'domain' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . $_CB_database->Quote( $emailDomain ) . ' )';
				}
				$_CB_database->setQuery( $query );
				$total				=	$_CB_database->loadResult();

				if ( $total <= $limitstart ) {
					$limitstart		=	0;
				}

				$pageNav			=	new cbPageNav( $total, $limitstart, $limit );

				$pageNav->setInputNamePrefix( $blocksPrefix );

				$query				=	'SELECT *'
									.	"\n FROM " . $_CB_database->NameQuote( '#__comprofiler_plugin_antispam_block' )
									.	"\n WHERE ( " . $_CB_database->NameQuote( 'type' ) . " = " . $_CB_database->Quote( 'user' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . (int) $user->get( 'id' ) . ' )'
									.	' OR ( ' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'email' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . $_CB_database->Quote( $user->get( 'email' ) ) . ' )';
				if ( $ipAddress ) {
					$query			.=	' OR ( ' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'ip' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . $_CB_database->Quote( $ipAddress ) . ' )';
				}
				if ( $emailDomain ) {
					$query			.=	' OR ( ' . $_CB_database->NameQuote( 'type' ) . ' = ' . $_CB_database->Quote( 'domain' )
									.	' AND ' . $_CB_database->NameQuote( 'value' ) . ' = ' . $_CB_database->Quote( $emailDomain ) . ' )';
				}
				$query				.=	"\n ORDER BY " . $_CB_database->NameQuote( 'id' ) . " ASC";
				if ( $tab->params->get( 'tab_paging', 1 ) ) {
					$_CB_database->setQuery( $query, $pageNav->limitstart, $pageNav->limit );
				} else {
					$_CB_database->setQuery( $query );
				}
				$rows				=	$_CB_database->loadObjectList( null, 'cbantispamBlockTable', array( $_CB_database ) );

				$blocks				=	HTML_cbantispamBlocks::showBlocks( $rows, $pageNav, $viewer, $user, $tab, $this );
			}
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:cbantispam.php

示例8: getCBpluginComponent

	/**
	 * @param  TabTable   $tab       Current tab
	 * @param  UserTable  $user      Current user
	 * @param  int        $ui        1 front, 2 admin UI
	 * @param  array      $postdata  Raw unfiltred POST data
	 * @return string                HTML
	 */
	public function getCBpluginComponent( $tab, $user, $ui, $postdata )
	{
		global $_CB_framework;

		$format						=	$this->input( 'format', null, GetterInterface::STRING );
		$raw						=	( $format == 'raw' );

		if ( ! $raw ) {
			outputCbJs();
			outputCbTemplate();
		}

		$action						=	null;
		$function					=	null;
		$id							=	null;
		$viewer						=	CBuser::getMyUserDataInstance();
		$user						=	$viewer;
		$stream						=	null;
		$inline						=	false;
		$data						=	true;

		if ( isset( $postdata['stream'] ) && ( $postdata['stream'] instanceof StreamInterface ) ) {
			$stream					=	$postdata['stream'];

			if ( $stream instanceof ActivityInterface ) {
				$action				=	'activity';
				$function			=	'show';
			} elseif ( $stream instanceof CommentsInterface ) {
				$action				=	'comments';
				$function			=	'show';
			} elseif ( $stream instanceof TagsInterface ) {
				$action				=	'tags';
				$function			=	'show';
			}

			if ( isset( $postdata['inline'] ) ) {
				$inline				=	$postdata['inline'];
			}

			if ( isset( $postdata['data'] ) ) {
				$data				=	$postdata['data'];
			}

			$user					=	$stream->user();
		} else {
			$action					=	$this->input( 'action', null, GetterInterface::STRING );
			$function				=	$this->input( 'func', null, GetterInterface::STRING );

			if ( $action == 'recentactivity' ) {
				$action				=	'activity';
				$function			=	'recent';
			} elseif ( $action == 'myactivity' ) {
				$action				=	'activity';
				$function			=	'my';
			} elseif ( $action == 'hiddenactivity' ) {
				$action				=	'hidden';
				$function			=	'activity';
			} elseif ( $action == 'hiddencomments' ) {
				$action				=	'hidden';
				$function			=	'comments';
			}

			if ( ( $action == 'activity' ) || ( $function == 'activity' ) ) {
				$stream				=	new Activity();
			} elseif ( ( $action == 'comments' ) || ( $function == 'comments' ) ) {
				$stream				=	new Comments();
			} elseif ( ( $action == 'tags' ) || ( $function == 'tags' ) ) {
				$stream				=	new Tags();
			}

			if ( $stream && $raw ) {
				$token				=	$this->input( 'token', null, GetterInterface::STRING );

				$post				=	new Registry( base64_decode( $this->input( 'stream', null, GetterInterface::BASE64 ) ) );

				$source				=	$post->get( 'source', null, GetterInterface::STRING );
				$userId				=	$post->get( 'user', null, GetterInterface::INT );
				$direction			=	$post->get( 'direction', null, GetterInterface::INT );

				if ( $source !== null ) {
					$stream->source( $source );
				}

				if ( $userId !== null ) {
					$user			=	CBuser::getUserDataInstance( (int) $userId );

					$stream->user( $user );
				}

				if ( ! ( $stream instanceof TagsInterface ) ) {
					if ( $direction !== null ) {
						$stream->direction( $direction );
					}
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:component.cbactivity.php

示例9: getDisplayTab

	/**
	 * prepare frontend tab render
	 *
	 * @param TabTable  $tab
	 * @param UserTable $user
	 * @param int       $ui
	 * @return null|string
	 */
	public function getDisplayTab( $tab, $user, $ui )
	{
		global $_CB_framework, $_CB_database;

		if ( ! ( $tab->params instanceof ParamsInterface ) ) {
			$tab->params		=	new Registry( $tab->params );
		}

		$viewer					=	CBuser::getMyUserDataInstance();
		$isModerator			=	CBGroupJive::isModerator( $viewer->get( 'id' ) );
		$isOwner				=	( $viewer->get( 'id' ) == $user->get( 'id' ) );

		CBGroupJive::getTemplate( 'tab' );

		$limit					=	(int) $tab->params->get( 'tab_limit', 30 );
		$limitstart				=	$_CB_framework->getUserStateFromRequest( 'gj_tab_limitstart{com_comprofiler}', 'gj_tab_limitstart' );
		$search					=	$_CB_framework->getUserStateFromRequest( 'gj_tab_search{com_comprofiler}', 'gj_tab_search' );
		$where					=	null;

		if ( $search && $tab->params->get( 'tab_search', 1 ) ) {
			$where				.=	"\n AND ( g." . $_CB_database->NameQuote( 'name' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $search, true ) . '%', false )
								.	" OR g." . $_CB_database->NameQuote( 'description' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $search, true ) . '%', false ) . " )";
		}

		$searching				=	( $where ? true : false );

		$query					=	'SELECT COUNT(*)'
								.	"\n FROM " . $_CB_database->NameQuote( '#__groupjive_groups' ) . " AS g";

		if ( ! $isModerator ) {
			$query				.=	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_categories' ) . " AS c"
								.	' ON c.' . $_CB_database->NameQuote( 'id' ) . ' = g.' . $_CB_database->NameQuote( 'category' );
		}

		$query					.=	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_users' ) . " AS u"
								.	' ON u.' . $_CB_database->NameQuote( 'group' ) . ' = g.' . $_CB_database->NameQuote( 'id' )
								.	' AND u.' . $_CB_database->NameQuote( 'user_id' ) . ' = ' . (int) $user->get( 'id' )
								.	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_invites' ) . " AS i"
								.	' ON i.' . $_CB_database->NameQuote( 'group' ) . ' = g.' . $_CB_database->NameQuote( 'id' )
								.	' AND i.' . $_CB_database->NameQuote( 'accepted' ) . ' = ' . $_CB_database->Quote( '0000-00-00 00:00:00' )
								.	' AND ( ( i.' . $_CB_database->NameQuote( 'email' ) . ' = ' . $_CB_database->Quote( $user->get( 'email' ) )
								.	' AND i.' . $_CB_database->NameQuote( 'email' ) . ' != "" )'
								.	' OR ( i.' . $_CB_database->NameQuote( 'user' ) . ' = ' . (int) $user->get( 'id' )
								.	' AND i.' . $_CB_database->NameQuote( 'user' ) . ' > 0 ) )';

		if ( $isOwner ) {
			$query				.=	"\n WHERE ( g." . $_CB_database->NameQuote( 'user_id' ) . " = " . (int) $user->get( 'id' );

			if ( ! $isModerator ) {
				$query			.=		' OR ( g.' . $_CB_database->NameQuote( 'published' ) . ' = 1'
								.		' AND ( u.' . $_CB_database->NameQuote( 'status' ) . ' IN ( 0, 1, 2, 3 )'
								.		' OR i.' . $_CB_database->NameQuote( 'id' ) . ' IS NOT NULL ) ) )';
			} else {
				$query			.=		' OR u.' . $_CB_database->NameQuote( 'status' ) . ' IN ( 0, 1, 2, 3 )'
								.		' OR i.' . $_CB_database->NameQuote( 'id' ) . ' IS NOT NULL )';
			}
		} else {
			$query				.=	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_users' ) . " AS mu"
								.	' ON mu.' . $_CB_database->NameQuote( 'group' ) . ' = g.' . $_CB_database->NameQuote( 'id' )
								.	' AND mu.' . $_CB_database->NameQuote( 'user_id' ) . ' = ' . (int) $viewer->get( 'id' )
								.	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_invites' ) . " AS mi"
								.	' ON mi.' . $_CB_database->NameQuote( 'group' ) . ' = g.' . $_CB_database->NameQuote( 'id' )
								.	' AND mi.' . $_CB_database->NameQuote( 'accepted' ) . ' = ' . $_CB_database->Quote( '0000-00-00 00:00:00' )
								.	' AND ( ( mi.' . $_CB_database->NameQuote( 'email' ) . ' = ' . $_CB_database->Quote( $viewer->get( 'email' ) )
								.	' AND mi.' . $_CB_database->NameQuote( 'email' ) . ' != "" )'
								.	' OR ( mi.' . $_CB_database->NameQuote( 'user' ) . ' = ' . (int) $viewer->get( 'id' )
								.	' AND mi.' . $_CB_database->NameQuote( 'user' ) . ' > 0 ) )'
								.	"\n WHERE ( g." . $_CB_database->NameQuote( 'user_id' ) . " = " . (int) $user->get( 'id' );

			if ( ! $isModerator ) {
				$query			.=		' OR ( g.' . $_CB_database->NameQuote( 'published' ) . ' = 1'
								.		' AND u.' . $_CB_database->NameQuote( 'status' ) . ' IN ( 1, 2, 3 ) ) )'
								.	"\n AND ( g." . $_CB_database->NameQuote( 'user_id' ) . " = " . (int) $viewer->get( 'id' )
								.		' OR ( g.' . $_CB_database->NameQuote( 'published' ) . ' = 1'
								.		' AND ( g.' . $_CB_database->NameQuote( 'type' ) . ' IN ( 1, 2 )'
								.		' OR mu.' . $_CB_database->NameQuote( 'status' ) . ' IN ( 0, 1, 2, 3 )'
								.		' OR mi.' . $_CB_database->NameQuote( 'id' ) . ' IS NOT NULL ) ) )';
			} else {
				$query			.=		' OR u.' . $_CB_database->NameQuote( 'status' ) . ' IN ( 1, 2, 3 ) )';
			}
		}

		if ( ! $isModerator ) {
			$query				.=	"\n AND ( ( c." . $_CB_database->NameQuote( 'published' ) . " = 1"
								.		' AND c.' . $_CB_database->NameQuote( 'access' ) . ' IN ' . $_CB_database->safeArrayOfIntegers( CBGroupJive::getAccess( (int) $user->get( 'id' ) ) )
								.		' AND c.' . $_CB_database->NameQuote( 'access' ) . ' IN ' . $_CB_database->safeArrayOfIntegers( CBGroupJive::getAccess( (int) $viewer->get( 'id' ) ) ) . ' )'
								.		( $this->params->get( 'groups_uncategorized', 1 ) ? ' OR g.' . $_CB_database->NameQuote( 'category' ) . ' = 0 )' : ' )' );
		}

		$query					.=	$where;
		$_CB_database->setQuery( $query );
		$total					=	(int) $_CB_database->loadResult();
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:cbgroupjive.php

示例10: delete

	public function delete( $id = null )
	{
		global $_PLUGINS;

		$plugin		=	cbconsultationsClass::getPlugin();
		$user		=	CBuser::getMyUserDataInstance();

		$key		=	$this->get( '_tbl_key' );

		if ( $id !== null ) {
			$this->set( $key, $id );
		}

		$id			=	$this->get( $key );
		$article	=	JTable::getInstance( 'K2Item', 'Table' );

		if ( ! $article->load( (int) $id ) ) {
			return false;
		}

		$_PLUGINS->trigger( 'cbconsultations_onBeforeDeleteconsultation', array( &$this, &$article, $user, $plugin ) );

		if ( ! $article->delete( (int) $id ) ) {
			return false;
		}

		$_PLUGINS->trigger( 'cbconsultations_onAfterDeleteconsultation', array( $this, $article, $user, $plugin ) );

		$article->reorder( $this->_db->NameQuote( 'catid' ) . ' = ' . (int) $article->get( 'catid' ) );

		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:k2.php

示例11: loginForm

	static function loginForm( /** @noinspection PhpUnusedParameterInspection */ $option, &$postvars, $regErrorMSG = null, $messagesToUser = null, $alertmessages = null ) {
		global $_CB_framework, $_CB_database, $_PLUGINS;

		$results					=	$_PLUGINS->trigger( 'onBeforeLoginFormDisplay', array( &$postvars, &$regErrorMSG, &$messagesToUser, &$alertmessages ) );

		if ( $_PLUGINS->is_errors() ) {
			echo "<script type=\"text/javascript\">alert(\"" . $_PLUGINS->getErrorMSG() . "\"); window.history.go(-1); </script>\n";
			exit();
		}

		if ( $regErrorMSG ) {
			$_CB_framework->enqueueMessage( $regErrorMSG, 'error' );
		}

		outputCbTemplate( 1 );
		outputCbJs( 1 );
		initToolTip( 1 );

		$params						=	null;
		$moduleFile					=	$_CB_framework->getCfg( 'absolute_path' ) . '/modules/' . ( checkJversion() > 0 ? 'mod_cblogin/' : '' ) . 'mod_cblogin.php';

		if ( file_exists( $moduleFile ) ) {
			$language				=	CBuser::getMyUserDataInstance()->getUserLanguage();

			if ( ! $language ) {
				$language			=	Application::Cms()->getLanguageTag();
			}

			define( '_UE_LOGIN_FROM', 'loginform' );

			$query					=	'SELECT *'
									.	"\n FROM " . $_CB_database->NameQuote( '#__modules' )
									.	"\n WHERE " . $_CB_database->NameQuote( 'module' ) . " = " . $_CB_database->Quote( 'mod_cblogin' )
									.	"\n AND " . $_CB_database->NameQuote( 'published' ) . " = 1"
									.	"\n AND " . $_CB_database->NameQuote( 'access' ) . " IN " . $_CB_database->safeArrayOfIntegers( Application::MyUser()->getAuthorisedViewLevels() )
									.	"\n AND " . $_CB_database->NameQuote( 'language' ) . " IN ( " . $_CB_database->Quote( $language ) . ", " . $_CB_database->Quote( '*' ) . ", " . $_CB_database->Quote( '' ) . " )"
									.	"\n ORDER BY " . $_CB_database->NameQuote( 'position' ) . ", " . $_CB_database->NameQuote( 'ordering' );
			$_CB_database->setQuery( $query, 0, 1 );
			$module					=	null;
			$_CB_database->loadObject( $module );

			if ( $module ) {
				$moduleContent		=	JModuleHelper::renderModule( $module, array( 'style' => 'xhtml' ) );
			} else {
				$moduleContent		=	CBTxt::T( 'Error: CB Login module not created (required).' );
			}
		} else {
			$moduleContent			=	CBTxt::T( 'Error: CB Login module not installed (required).' );
		}

		$return						=	null;

		if ( ( is_array( $messagesToUser ) && $messagesToUser ) || ( is_array( $results ) && $results ) ) {
			$pageClass				=	$_CB_framework->getMenuPageClass();

			$return					.=	'<div class="cbLoginPage cb_template cb_template_' . selectTemplate( 'dir' ) . ( $pageClass ? ' ' . htmlspecialchars( $pageClass ) : null ) . '">'
									.		( is_array( $messagesToUser ) && $messagesToUser ? '<div>' . implode( '</div><div>', $messagesToUser ) . '</div>' : null )
									.		( is_array( $results ) && $results ? implode( '', $results ) : null )
									.	'</div>';
		}

		$return						.=	$moduleContent;

		echo $return;

		$_CB_framework->setMenuMeta();
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:67,代码来源:comprofiler.html.php

示例12: getDisplayTab

	/**
	 * @param TabTable  $tab
	 * @param UserTable $user
	 * @param int       $ui
	 * @return null|string
	 */
	public function getDisplayTab( $tab, $user, $ui )
	{
		if ( ! ( $tab->params instanceof ParamsInterface ) ) {
			$tab->params	=	new Registry( $tab->params );
		}

		$photosEnabled		=	$tab->params->get( 'tab_photos', $this->tabPhotos );
		$filesEnabled		=	$tab->params->get( 'tab_files', $this->tabFiles );
		$videosEnabled		=	$tab->params->get( 'tab_videos', $this->tabVideos );
		$musicEnabled		=	$tab->params->get( 'tab_music', $this->tabMusic );
		$return				=	null;

		if ( $photosEnabled || $filesEnabled || $videosEnabled || $musicEnabled ) {
			$viewer			=	CBuser::getMyUserDataInstance();

			outputCbJs( 1 );
			outputCbTemplate( 1 );
			cbimport( 'cb.pagination' );

			cbgalleryClass::getTemplate( 'tab' );

			$photos			=	null;

			if ( $photosEnabled ) {
				$photos		=	$this->getGallery( 'photos', $tab, $user, $viewer );
			}

			$files			=	null;

			if ( $filesEnabled ) {
				$files		=	$this->getGallery( 'files', $tab, $user, $viewer );
			}

			$videos			=	null;

			if ( $videosEnabled ) {
				$videos		=	$this->getGallery( 'videos', $tab, $user, $viewer );
			}

			$music			=	null;

			if ( $musicEnabled ) {
				$music		=	$this->getGallery( 'music', $tab, $user, $viewer );
			}

			if ( $photos || $files || $videos || $music ) {
				$class		=	$this->params->get( 'general_class', null );

				$return		=	'<div id="cbGallery" class="cbGallery' . ( $class ? ' ' . htmlspecialchars( $class ) : null ) . '">'
							.		'<div id="cbGalleryInner" class="cbGalleryInner">'
							.			HTML_cbgalleryTab::showTab( $photos, $files, $videos, $music, $viewer, $user, $tab, $this )
							.		'</div>'
							.	'</div>';
			}
		}

		return $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:64,代码来源:cbgallery.php

示例13: checkCBPostIsHTTPS

/**
 * Checks if a page is executed https, and if not, if it should be according to login module HTTPS posts specifications
 * 
 * @param  boolean  $return  [default: false] : True: returns if https switchover is needed for the POST form (if not already on HTTPS and login module asks for it). False: errors 403 if not in https and it's configured in login module.
 * @return boolean           True: switchover needed (returned only if $return = true)
 */
function checkCBPostIsHTTPS($return = false)
{
    global $_CB_framework, $_CB_database, $_SERVER;
    $isHttps = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
    if (!$isHttps && file_exists($_CB_framework->getCfg('absolute_path') . '/modules/' . (checkJversion() > 0 ? 'mod_cblogin/' : null) . 'mod_cblogin.php')) {
        $language = CBuser::getMyUserDataInstance()->getUserLanguage();
        if (!$language) {
            $language = Application::Cms()->getLanguageTag();
        }
        $query = 'SELECT ' . $_CB_database->NameQuote('params') . "\n FROM " . $_CB_database->NameQuote('#__modules') . "\n WHERE " . $_CB_database->NameQuote('module') . " = " . $_CB_database->Quote('mod_cblogin') . "\n AND " . $_CB_database->NameQuote('published') . " = 1" . "\n AND " . $_CB_database->NameQuote('access') . " IN " . $_CB_database->safeArrayOfIntegers(Application::MyUser()->getAuthorisedViewLevels()) . "\n AND " . $_CB_database->NameQuote('language') . " IN ( " . $_CB_database->Quote($language) . ", " . $_CB_database->Quote('*') . ", " . $_CB_database->Quote('') . " )" . "\n ORDER BY " . $_CB_database->NameQuote('position') . ", " . $_CB_database->NameQuote('ordering');
        $_CB_database->setQuery($query, 0, 1);
        $module = $_CB_database->loadResult();
        if ($module) {
            $params = new Registry($module);
            $https_post = $params->get('https_post', 0) != 0;
        } else {
            $https_post = false;
        }
    } else {
        $https_post = false;
    }
    if ($return) {
        return $https_post;
    } else {
        if ($https_post && !$isHttps) {
            header('HTTP/1.0 403 Forbidden');
            exit(CBTxt::T('UE_NOT_AUTHORIZED', 'You are not authorized to view this page!'));
        }
    }
    return null;
}
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:37,代码来源:comprofiler.php

示例14: getButton

	/**
	 * Returns a provider button
	 *
	 * @param string $provider
	 * @param int    $horizontal
	 * @return null|string
	 */
	public function getButton( $provider, $horizontal = 1 )
	{
		global $_CB_framework;

		if ( ! ( $provider && isset( $this->providers[$provider] ) ) ) {
			return null;
		}

		$fieldName					=	$this->providers[$provider]['field'];
		$siteName					=	$this->providers[$provider]['name'];
		$iconClass					=	$this->providers[$provider]['icon'];
		$buttonClass				=	$this->providers[$provider]['button'];
		$user						=	CBuser::getMyUserDataInstance();
		$style						=	(int) $this->params->get( $provider . '_button_style', 2, GetterInterface::INT );

		if ( $style == 1 ) {
			$horizontal				=	1;
		}

		static $returnUrl			=	null;

		if ( ! isset( $returnUrl ) ) {
			$returnUrl				=	$this->input->get( 'return', null, GetterInterface::BASE64 );

			if ( $returnUrl ) {
				$returnUrl			=	base64_decode( $returnUrl );
			} else {
				$isHttps			=	( isset( $_SERVER['HTTPS'] ) && ( ! empty( $_SERVER['HTTPS'] ) ) && ( $_SERVER['HTTPS'] != 'off' ) );
				$returnUrl			=	'http' . ( $isHttps ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'];

				if ( ( ! empty( $_SERVER['PHP_SELF'] ) ) && ( ! empty( $_SERVER['REQUEST_URI'] ) ) ) {
					$returnUrl		.=	$_SERVER['REQUEST_URI'];
				} else {
					$returnUrl		.=	$_SERVER['SCRIPT_NAME'];

					if ( isset( $_SERVER['QUERY_STRING'] ) && ( ! empty( $_SERVER['QUERY_STRING'] ) ) ) {
						$returnUrl	.=	'?' . $_SERVER['QUERY_STRING'];
					}
				}
			}

			$returnUrl				=	cbUnHtmlspecialchars( preg_replace( '/[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']/', '""', preg_replace( '/eval\((.*)\)/', '', htmlspecialchars( urldecode( $returnUrl ) ) ) ) );

			if ( preg_match( '/index\.php\?option=com_comprofiler&view=login|index\.php\?option=com_comprofiler&view=pluginclass&plugin=cbconnect/', $returnUrl ) ) {
				$returnUrl			=	'index.php';
			}

			$returnUrl				=	base64_encode( $returnUrl );
		}

		$return						=	null;

		if ( $this->params->get( $provider . '_enabled', false, GetterInterface::BOOLEAN ) ) {
			if ( $user->get( 'id' ) ) {
				if ( $this->params->get( $provider . '_link', true, GetterInterface::BOOLEAN ) && ( ! $user->get( $fieldName ) ) ) {
					$link			=	$this->params->get( $provider . '_button_link', null, GetterInterface::STRING );

					$return			=	'<button class="cbConnectButton cbConnectButton' . ucfirst( $provider ) . ' btn btn-' . $buttonClass . ' btn-sm' . ( ! $horizontal ? ' btn-block' : null ) . '" onclick="window.location=\'' . $_CB_framework->pluginClassUrl( $this->plugin->element, false, array( 'provider' => $provider, 'action' => 'authenticate', 'return' => $returnUrl ) ) . '\'; return false;" title="' . htmlspecialchars( CBTxt::T( 'LINK_YOUR_SITENAME_ACCOUNT', 'Link your [sitename] account', array( '[sitename]' => $siteName ) ) ) . '">'
									.		( in_array( $style, array( 1, 2 ) ) ? '<span class="fa fa-' . $iconClass . ' fa-lg' . ( $style != 1 ? ' cbConnectButtonPrefix' : null ) . '"></span>' : null )
									.		( in_array( $style, array( 2, 3 ) ) ? ( $link ? $link : CBTxt::T( 'LINK_WITH_SITENAME', 'Link with [sitename]', array( '[sitename]' => $siteName ) ) ) : null )
									.	'</button>'
									.	( $horizontal ? ' ' : null );
				}
			} else {
				$signin				=	$this->params->get( $provider . '_button_signin', null, GetterInterface::STRING );

				$return				=	'<button class="cbConnectButton cbConnectButton' . ucfirst( $provider ) . ' btn btn-' . $buttonClass . ' btn-sm' . ( ! $horizontal ? ' btn-block' : null ) . '" onclick="window.location=\'' . $_CB_framework->pluginClassUrl( $this->plugin->element, false, array( 'provider' => $provider, 'action' => 'authenticate', 'return' => $returnUrl ) ) . '\'; return false;" title="' . htmlspecialchars( CBTxt::T( 'LOGIN_WITH_YOUR_SITENAME_ACCOUNT', 'Login with your [sitename] account', array( '[sitename]' => $siteName ) ) ) . '">'
									.		( in_array( $style, array( 1, 2 ) ) ? '<span class="fa fa-' . $iconClass . ' fa-lg' . ( $style != 1 ? ' cbConnectButtonPrefix' : null ) . '"></span>' : null )
									.		( in_array( $style, array( 2, 3 ) ) ? ( $signin ? $signin : CBTxt::T( 'SIGN_IN_WITH_SITENAME', 'Sign in with [sitename]', array( '[sitename]' => $siteName ) ) ) : null )
									.	'</button>'
									.	( $horizontal ? ' ' : null );
			}
		}

		return $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:83,代码来源:cbconnect.php

示例15: showActivity

	/**
	 * render frontend group activity
	 *
	 * @param CB\Plugin\Activity\Table\ActivityTable $row
	 * @param string                                 $title
	 * @param string                                 $message
	 * @param CB\Plugin\Activity\Activity            $stream
	 * @param GroupTable                             $group
	 * @param cbgjPlugin                             $plugin
	 * @return string
	 */
	static function showActivity( $row, &$title, &$message, $stream, $group, $plugin )
	{
		global $_CB_framework;

		initToolTip();

		$message				=	null;

		switch( $row->get( 'subtype' ) ) {
			case 'group.join':
				$title			=	CBTxt::T( 'joined a group' );
				break;
			case 'group.leave':
				$title			=	CBTxt::T( 'left a group' );
				break;
			case 'group':
				$title			=	CBTxt::T( 'created a group' );
				break;
		}

		$user					=	CBuser::getMyUserDataInstance();
		$isModerator			=	CBGroupJive::isModerator( $user->get( 'id' ) );
		$groupOwner				=	( $user->get( 'id' ) == $group->get( 'user_id' ) );
		$userStatus				=	CBGroupJive::getGroupStatus( $user, $group );

		$return					=	'<div class="gjActivity">'
								.		'<div class="gjGroupCanvas gjPageHeader border-default">'
								.			'<div class="gjPageHeaderCanvas">'
								.				'<div class="gjPageHeaderCanvasBackground">'
								.					$group->canvas()
								.				'</div>'
								.				'<div class="gjPageHeaderCanvasLogo">'
								.					$group->logo( false, true, true )
								.				'</div>';

		if ( $isModerator || $groupOwner || ( ( ! $groupOwner ) && ( ( $userStatus === null ) || ( $userStatus === 0 ) || ( $userStatus >= 1 ) ) ) ) {
			$return				.=				'<div class="gjPageHeaderCanvasButtons text-right">';

			if ( $isModerator && ( $group->get( 'published' ) == -1 ) && $plugin->params->get( 'groups_create_approval', 0 ) ) {
				$return			.=					' <span class="gjPageHeaderCanvasButton">'
								.						'<button type="button" onclick="window.location.href=\'' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'publish', 'id' => (int) $group->get( 'id' ), 'return' => CBGroupJive::getReturn() ) ) . '\';" class="gjButton gjButtonApprove btn btn-xs btn-success">' . CBTxt::T( 'Approve' ) . '</button>'
								.					'</span>';
			} elseif ( ! $groupOwner ) {
				if ( $userStatus === null ) {
					$return		.=					' <span class="gjPageHeaderCanvasButton">'
								.						( $group->get( '_invite_id' ) ? '<button type="button" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to reject all invites to this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'reject', 'id' => (int) $group->get( 'id' ), 'return' => CBGroupJive::getReturn() ) ) . '\'; })" class="gjButton gjButtonReject btn btn-xs btn-danger">' . CBTxt::T( 'Reject' ) . '</button> ' : null )
								.						'<button type="button" onclick="window.location.href=\'' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'join', 'id' => (int) $group->get( 'id' ), 'return' => CBGroupJive::getReturn() ) ) . '\';" class="gjButton gjButtonJoin btn btn-xs btn-success">' . ( $group->get( '_invite_id' ) ? CBTxt::T( 'Accept Invite' ) : CBTxt::T( 'Join' ) ) . '</button>'
								.					'</span>';
				} elseif ( $userStatus === 0 ) {
					$return		.=					' <span class="gjPageHeaderCanvasButton">'
								.						'<button type="button" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to cancel your pending join request to this Group?' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'cancel', 'id' => (int) $group->get( 'id' ), 'return' => CBGroupJive::getReturn() ) ) . '\'; })" class="gjButton gjButtonCancel btn btn-xs btn-danger">' . CBTxt::T( 'Cancel' ) . '</button> '
								.						'<span class="gjButton gjButtonPending btn btn-xs btn-warning disabled">' . CBTxt::T( 'Pending Approval' ) . '</span>'
								.					'</span>';
				}
			}

			$return				.=				'</div>';
		}

		$return					.=			'</div>'
								.			'<div class="gjPageHeaderBar border-default">'
								.				'<div class="gjPageHeaderBarTitle text-primary">'
								.					'<strong><a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) ) . '">' . htmlspecialchars( CBTxt::T( $group->get( 'name' ) ) ) . '</a></strong>'
								.				'</div>'
								.				'<div class="gjPageHeaderBarCounters text-muted small">';

		if ( $group->get( 'category' ) ) {
			$return				.=					'<span class="gjPageHeaderBarCounter"><span class="gjGroupCategoryIcon fa-before fa-folder">'
								.						' <a href="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'categories', 'func' => 'show', 'id' => (int) $group->get( 'category' ) ) ) . '">' . CBTxt::T( $group->category()->get( 'name' ) ) . '</a>'
								.					'</span></span>';
		}

		$return					.=					' <span class="gjPageHeaderBarCounter"><span class="gjGroupTypeIcon fa-before fa-globe"> ' . $group->type() . '</span></span>'
								.					' <span class="gjPageHeaderBarCounter"><span class="gjGroupUsersIcon fa-before fa-user"> ' . CBTxt::T( 'GROUP_USERS_COUNT', '%%COUNT%% User|%%COUNT%% Users', array( '%%COUNT%%' => (int) $group->get( '_users', 0 ) ) ) . '</span></span>'
								.				'</div>'
								.				( $group->get( 'description' ) ? ' <div class="gjPageHeaderBarDescription">' . cbTooltip( 1, CBTxt::T( $group->get( 'description' ) ), CBTxt::T( $group->get( 'name' ) ), 400, null, '<span class="fa fa-info-circle text-muted"></span>' ) . '</div>' : null )
								.			'</div>'
								.		'</div>'
								.	'</div>';

		return $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:93,代码来源:activity.php


注:本文中的CBuser::getMyUserDataInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。