Exemplo n.º 1
0
	/**
	 * render frontend panel
	 *
	 * @param string $function
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	static function showPanel( $function, $user, $plugin ) {
		global $_CB_framework;

		$generalTitle	=	$plugin->params->get( 'general_title', $plugin->name );

		$_CB_framework->setPageTitle( cbgjClass::getOverride( 'panel' ) );

		if ( $generalTitle != '' ) {
			$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( $generalTitle ) ), cbgjClass::getPluginURL() );
		}

		$_CB_framework->appendPathWay( cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ), cbgjClass::getPluginURL( array( 'overview' ) ) );
		$_CB_framework->appendPathWay( cbgjClass::getOverride( 'panel' ), cbgjClass::getPluginURL( array( 'panel' ) ) );

		$main			=	HTML_groupjivePanelMain::showPanelMain( $function, $user, $plugin );

		$return			=	'<div class="gjPanel">';

		if ( $plugin->params->get( 'general_panes', 1 ) ) {
			$return		.=		'<div class="gjHeader">'
						.			HTML_groupjivePanelPanes::showPanelPanes( $user, $plugin )
						.		'</div>'
						.		'<div class="gjBody">'
						.			$main
						.		'</div>';
		} else {
			$return		.=		$main;
		}

		$return			.=	'</div>';

		echo $return;
	}
Exemplo n.º 2
0
	$location					=	cbGetParam( $_REQUEST, 'plugin', null );
	$return						.=			'<div class="gjMenuAPI">';

	if ( $location == 'cbgroupjive' ) {
		$action					=	cbGetParam( $_REQUEST, 'action', null );
		$catid					=	cbGetParam( $_REQUEST, 'cat', null );
		$grpid					=	cbGetParam( $_REQUEST, 'grp', null );

		switch ( $action ) {
			case 'panel':
				$authorized		=	cbgjClass::getAuthorization( null, null, $user );

				if ( ( $plugin->params->get( 'overview_panel', 1 ) && in_array( 'usr_me', $authorized ) ) || in_array( 'usr_mod', $authorized ) ) {
					cbgjClass::getTemplate( array( 'panel', 'panel_panes' ) );

					$return		.=				HTML_groupjivePanelPanes::showPanelPanes( $user, $plugin );
				}
				break;
			case 'categories':
				$row			=	cbgjData::getCategories( array( array( 'cat_access', 'mod_lvl1' ), $user ), array( 'id', '=', $catid ), null, null, false );

				if ( $row->id ) {
					cbgjClass::getTemplate( array( 'category', 'category_panes' ) );

					$return		.=				HTML_groupjiveCategoryPanes::showCategoryPanes( $row, $user, $plugin );
				}
				break;
			case 'groups':
				$category		=	cbgjData::getCategories( array( array( 'cat_access', 'mod_lvl1' ), $user ), array( 'id', '=', $catid ), null, null, false );
				$row			=	cbgjData::getGroups( array( array( 'grp_access', 'mod_lvl2' ), $user ), array( 'id', '=', $grpid ), null, null, false );