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


PHP outputCbTemplate函数代码示例

本文整理汇总了PHP中outputCbTemplate函数的典型用法代码示例。如果您正苦于以下问题:PHP outputCbTemplate函数的具体用法?PHP outputCbTemplate怎么用?PHP outputCbTemplate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: showIcon

	public function showIcon($userid)
	{
		global $_CB_framework, $_CB_PMS;

		$myid = $_CB_framework->myId();

		// Don't send messages from/to anonymous and to yourself
		if ($myid == 0 || $userid == 0 || $userid == $myid)
		{
			return '';
		}

		outputCbTemplate($_CB_framework->getUi());
		$resultArray = $_CB_PMS->getPMSlinks($userid, $myid, '', '', 1);
		$url = 'index.php?option=com_comprofiler&task=userProfile&user=' . $userid . getCBprofileItemid();
		$html        = '<a href="' . $url . '" title="'.JText::_('COM_KUNENA_VIEW_PMS').'"><span class="kicon-profile kicon-profile-pm" alt="' .JText::_('COM_KUNENA_VIEW_PMS'). '"></span></a>';

		if (count($resultArray) > 0)
		{
			$linkItem = '<span class="pm" alt="' . JText::_('COM_KUNENA_VIEW_PMS') . '" />';

			foreach ($resultArray as $res)
			{
				if (is_array($res))
				{
					$html .= '<a href="' . cbSef($res["url"]) . '" title="' . getLangDefinition($res["tooltip"]) . '">' . $linkItem . '</a> ';
				}
			}
		}

		return $html;
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:32,代码来源:private.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)
 {
     global $_CB_framework;
     outputCbJs(1);
     outputCbTemplate(1);
     $plugin = cbblogsClass::getPlugin();
     $model = cbblogsClass::getModel();
     $action = $this->input('action', null, GetterInterface::STRING);
     $function = $this->input('func', null, GetterInterface::STRING);
     $id = $this->input('id', null, GetterInterface::INT);
     $user = CBuser::getUserDataInstance($_CB_framework->myId());
     $tab = new TabTable();
     $tab->load(array('pluginid' => (int) $plugin->id));
     $profileUrl = $_CB_framework->userProfileUrl($user->get('id'), false, 'cbblogsTab');
     if (!($tab->enabled && Application::MyUser()->canViewAccessLevel($tab->viewaccesslevel))) {
         cbRedirect($profileUrl, CBTxt::T('Not authorized.'), 'error');
     }
     ob_start();
     switch ($action) {
         case 'blogs':
             switch ($function) {
                 case 'new':
                     $this->showBlogEdit(null, $user, $model, $plugin);
                     break;
                 case 'edit':
                     $this->showBlogEdit($id, $user, $model, $plugin);
                     break;
                 case 'save':
                     cbSpoofCheck('plugin');
                     $this->saveBlogEdit($id, $user, $model, $plugin);
                     break;
                 case 'publish':
                     $this->stateBlog(1, $id, $user, $model, $plugin);
                     break;
                 case 'unpublish':
                     $this->stateBlog(0, $id, $user, $model, $plugin);
                     break;
                 case 'delete':
                     $this->deleteBlog($id, $user, $model, $plugin);
                     break;
                 case 'show':
                 default:
                     if ($model->type != 2) {
                         cbRedirect(cbblogsModel::getUrl((int) $id, false));
                     } else {
                         $this->showBlog($id, $user, $model, $plugin);
                     }
                     break;
             }
             break;
         default:
             cbRedirect($profileUrl, CBTxt::T('Not authorized.'), 'error');
             break;
     }
     $html = ob_get_contents();
     ob_end_clean();
     $class = $plugin->params->get('general_class', null);
     $return = '<div id="cbBlogs" class="cbBlogs' . ($class ? ' ' . htmlspecialchars($class) : null) . '">' . '<div id="cbBlogsInner" class="cbBlogsInner">' . $html . '</div>' . '</div>';
     echo $return;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:67,代码来源:component.cbblogs.php

示例3: 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

示例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();
		$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

示例5: 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

示例6: 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(/** @noinspection PhpUnusedParameterInspection */
    $tab, $user, $ui, $postdata)
  {
    global $_CB_framework;

    outputCbJs(1);
    outputCbTemplate(1);



    ob_start();


    ob_end_clean();



    echo "HI";
  }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:26,代码来源:component.cbstructure.php

示例7: edituser

 /**
  * Outputs legacy user edit display
  *
  * @deprecated 2.0
  *
  * @param UserTable  $user
  * @param string     $option
  * @param int        $newCBuser
  * @param array      $postdata
  */
 public function edituser($user, $option, $newCBuser, &$postdata)
 {
     global $_CB_framework, $_CB_Backend_Title, $_PLUGINS;
     $results = $_PLUGINS->trigger('onBeforeUserProfileEditDisplay', array(&$user, 2));
     if ($_PLUGINS->is_errors()) {
         cbRedirect($_CB_framework->backendViewUrl('showusers'), $_PLUGINS->getErrorMSG(), 'error');
     }
     _CBsecureAboveForm('edituser');
     cbimport('cb.validator');
     outputCbTemplate(2);
     initToolTip(2);
     outputCbJs(2);
     $tabs = new cbTabs($_CB_framework->getUi() == 2 && !isset($_REQUEST['tab']) ? 1 : 0, 2);
     // use cookies in backend to remember selected tab.
     $tabcontent = $tabs->getEditTabs($user, $postdata, 'htmledit', 'divs');
     $_CB_Backend_Title = array(0 => array('fa fa-user', $user->id ? CBTxt::T('COMMUNITY_BUILDER_EDIT_USER_USERNAME', 'Community Builder: Edit User [[username]]', array('[username]' => $user->username)) : CBTxt::T('Community Builder: New User')));
     cbValidator::loadValidation();
     if (is_array($results)) {
         echo implode('', $results);
     }
     $return = '<form action="' . $_CB_framework->backendUrl('index.php') . '" method="post" name="adminForm" id="cbcheckedadminForm" enctype="multipart/form-data" autocomplete="off" class="cb_form form-auto cbValidation">' . $tabcontent . '<input type="hidden" name="id" value="' . (int) $user->id . '" />' . '<input type="hidden" name="newCBuser" value="' . (int) $newCBuser . '" />' . '<input type="hidden" name="option" value="com_comprofiler" />' . '<input type="hidden" name="view" value="save" />' . cbGetSpoofInputTag('user') . '<div class="cbIconsBottom">' . getFieldIcons(2, true, true, '', '', true) . '</div>' . '</form>';
     echo $return;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:33,代码来源:view.user.php

示例8: edituser

    function edituser($user, $option, $newCBuser, &$postdata)
    {
        global $_CB_framework, $_PLUGINS;
        $results = $_PLUGINS->trigger('onBeforeUserProfileEditDisplay', array(&$user, 2));
        if ($_PLUGINS->is_errors()) {
            echo "<script type=\"text/javascript\">alert(\"" . str_replace(array("\n", '<br />'), array('\\n', '\\n'), addslashes($_PLUGINS->getErrorMSG())) . "\"); window.history.go(-1); </script>\n";
            exit;
        }
        _CBsecureAboveForm('edituser');
        outputCbTemplate(2);
        initToolTip(2);
        $tabs = new cbTabs($_CB_framework->getUi() == 2 && !isset($_REQUEST['tab']) ? 1 : 0, 2);
        // use cookies in backend to remember selected tab.
        $tabcontent = $tabs->getEditTabs($user, $postdata);
        outputCbJs(2);
        global $_CB_Backend_Title;
        //OLD:	$_CB_Backend_Title	=	array( 0 => array( 'cbicon-48-users', "Community Builder User: <small>" . ( $user->id ? "Edit" . ' [ '. $user->username .' ]' : "New" ) . '</small>' ) );
        //NEW:
        $_CB_Backend_Title = array(0 => array('cbicon-48-users', CBTxt::T('Community Builder User') . ": <small>" . ($user->id ? CBTxt::T('Edit') . ' [ ' . $user->username . ' ]' : CBTxt::T('New')) . '</small>'));
        ob_start();
        if (defined('_CB_VALIDATE_NEW')) {
            cbimport('cb.validator');
            cbValidator::renderGenericJs();
            ?>

$('div.cbtoolbaractions .cbtoolbaraction').click( function() {
		if ( $(this).attr('href') ) {
			var taskVal = $(this).attr('href').substring(1);
		} else if ( $(this).attr('value') ) {
			taskVal = $(this).attr('value').substring(1);
		}
		$('#cbcheckedadminForm input[name=task]').val( taskVal );
		if (taskVal == 'showusers') {
			$('#cbcheckedadminForm')[0].submit();
		} else {
			$('#cbcheckedadminForm').submit();
		}
		return false;
	} );

<?php 
            $cbjavascript = ob_get_contents();
            ob_end_clean();
            $_CB_framework->outputCbJQuery($cbjavascript, array('metadata', 'validate'));
        } else {
            // old way:
            ?>
var cbDefaultFieldbackgroundColor;
function cbFrmSubmitButton() {
	var me = this.elements;
<?php 
            $version = checkJversion();
            if ($version == 1) {
                // var r = new RegExp("^[a-zA-Z](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i");
                ?>
	var r = new RegExp("^[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]*$", "i");
<?php 
            } elseif ($version == -1) {
                ?>
	var r = new RegExp("[^A-Za-z0-9]", "i");
<?php 
            } else {
                ?>
	var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");
<?php 
            }
            ?>
	var errorMSG = '';
	var iserror=0;
	if (cbDefaultFieldbackgroundColor === undefined) cbDefaultFieldbackgroundColor = ((me['username'].style.getPropertyValue) ? me['username'].style.getPropertyValue("backgroundColor") : me['username'].style.backgroundColor);
<?php 
            echo $tabs->fieldJS;
            ?>
	if (me['username'].value == "") {
		errorMSG += "<?php 
            echo str_replace(array("\n", "\r"), ' ', CBTxt::html_entity_decode(_REGWARN_UNAME));
            ?>
\n";
		me['username'].style.backgroundColor = "red";
		iserror=1;
	} else if (r.exec(me['username'].value) || (me['username'].value.length < 3)) {
		errorMSG += "<?php 
            echo str_replace(array("\n", "\r"), ' ', sprintf(CBTxt::html_entity_decode(_VALID_AZ09), CBTxt::html_entity_decode(_PROMPT_UNAME), 2));
            ?>
\n";
		me['username'].style.backgroundColor = "red";
		iserror=1;
	} else if (me['username'].style.backgroundColor.slice(0,3)=="red") {
		me['username'].style.backgroundColor = cbDefaultFieldbackgroundColor;
	}
	if ((me['password'].value != "") && (me['password'].value != me['password__verify'].value)){
		errorMSG += "<?php 
            echo CBTxt::html_entity_decode(_REGWARN_VPASS2);
            ?>
\n";
		me['password'].style.backgroundColor = "red"; me['password__verify'].style.backgroundColor = "red";
		iserror=1;
	} else {
		if (me['password'].style.backgroundColor.slice(0,3)=="red") me['password'].style.backgroundColor = cbDefaultFieldbackgroundColor;
		if (me['password__verify'].style.backgroundColor.slice(0,3)=="red") me['password__verify'].style.backgroundColor = cbDefaultFieldbackgroundColor;
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:view.user.php

示例9: showUsers

    function showUsers(&$rows, &$pageNav, $search, $option, &$lists, &$pluginColumns, $inputTextExtras, $searchTabContent, $canAdmin, $canManage, $canCreate, $canEdit, $canEditOwn, $canEditState)
    {
        global $_CB_framework;
        _CBsecureAboveForm('showUsers');
        outputCbTemplate(2);
        outputCbJs(2);
        global $_CB_Backend_Title;
        $_CB_Backend_Title = array(0 => array('cbicon-48-user', CBTxt::T('CB User Manager')));
        /*
         * 		Auto-submission was a pain: added 2 buttons in advanced search.
        		ob_start();
        $('#cbUserListsSearcher select,#cbUserListsSearcher input,#cbUserListsSearcher textarea').live('change', function() {
        	if ( $(this).parent('div').hasClass('cbSearchKind') ) {
        		if ( $(this).val() == '' ) {
        			$(this).parents('form')[0].submit();
        		}
        	} else {
        		$(this).parents('form')[0].submit();
        	}
        });
        
        			$cbjavascript	=	ob_get_contents();
        			ob_end_clean();
        			$_CB_framework->outputCbJQuery( $cbjavascript );
        */
        $_CB_framework->outputCbJQuery('');
        $colspans = 13 + count($pluginColumns);
        ?>
<form action="<?php 
        echo $_CB_framework->backendUrl('index.php');
        ?>
" method="post" name="adminForm" class="cb_form" id="cbshowusersform">
<?php 
        $this->_userslistFilters($search, $lists, $inputTextExtras, $searchTabContent);
        ?>
  <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
   <thead>
    <tr>
      <th align="center" colspan="<?php 
        echo $colspans;
        ?>
"> <?php 
        echo $pageNav->writePagesLinks();
        ?>
</th>
    </tr>
    <tr>
      <th width="1%" class="title"><?php 
        echo CBTxt::T('#');
        ?>
</th>
      <th width="3%" class="title">
      	<input type="checkbox" name="toggle" value="" <?php 
        echo 'onClick="cbToggleAll( this, ' . count($rows) . ', \'cb\' );"';
        ?>
 />
      </th>
      <th width="23%" class="title"><?php 
        echo CBTxt::T('Name');
        ?>
</th>
      <th width="12%" class="title"><?php 
        echo CBTxt::T('UserName');
        ?>
</th>
      <th width="3%" class="title" nowrap="nowrap"><?php 
        echo CBTxt::T('Logged In');
        ?>
</th>
<?php 
        foreach ($pluginColumns as $name => $content) {
            ?>
	  <th width="15%" class="title"><?php 
            echo $name;
            ?>
</th>

<?php 
        }
        ?>
      <th width="12%" class="title"><?php 
        echo CBTxt::T('Group');
        ?>
</th>
      <th width="13%" class="title"><?php 
        echo CBTxt::T('E-Mail');
        ?>
</th>
      <th width="8%" class="title"><?php 
        echo CBTxt::T('Registered');
        ?>
</th>
      <th width="8%" class="title" nowrap="nowrap"><?php 
        echo CBTxt::T('Last Visit');
        ?>
</th>
      <th width="3%" class="title"><?php 
        echo CBTxt::T('Enabled');
        ?>
</th>
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:view.users.php

示例10: email

	/**
	 * Checks if an email address has been supplied by the provider or if email form needs to render
	 *
	 * @param UserTable           $user
	 * @param Hybrid_User_Profile $profile
	 * @return bool
	 */
	private function email( &$user, $profile )
	{
		global $_CB_framework;

		$email						=	$this->input( 'email', null, GetterInterface::STRING );
		$emailVerify				=	$this->input( 'email__verify', null, GetterInterface::STRING );

		if ( $email ) {
			if ( ! cbIsValidEmail( $email ) ) {
				$_CB_framework->enqueueMessage( sprintf( CBTxt::T( 'UE_EMAIL_NOVALID', 'This is not a valid email address.' ), htmlspecialchars( $email ) ), 'error' );

				$email				=	null;
			} else {
				$field				=	new FieldTable();

				$field->load( array( 'name' => 'email' ) );

				$field->set( 'params', new Registry( $field->get( 'params' ) ) );

				if ( $field->params->get( 'fieldVerifyInput', 0 ) && ( $email != $emailVerify ) ) {
					$_CB_framework->enqueueMessage( CBTxt::T( 'Email and verification do not match, please try again.' ), 'error' );

					$email			=	null;
				}
			}
		}

		if ( ! $email ) {
			$email					=	$profile->email;
		}

		if ( ! $email ) {
			$regAntiSpamValues		=	cbGetRegAntiSpams();

			outputCbTemplate();
			outputCbJs();
			cbValidator::loadValidation();

			$cbUser					=	CBuser::getInstance( null );

			$_CB_framework->enqueueMessage( CBTxt::T( 'PROVIDER_SIGN_UP_INCOMPLETE', 'Your [provider] sign up is incomplete. Please complete the following.', array( '[provider]' => $this->_providerName ) ) );

			$return					=	'<form action="' . $_CB_framework->pluginClassUrl( $this->element, false, array( 'provider' => $this->_provider, 'action' => 'authenticate', 'return' => base64_encode( $this->_returnUrl ) ) ) . '" method="post" enctype="multipart/form-data" name="adminForm" id="cbcheckedadminForm" class="cb_form form-auto cbValidation">'
									.		'<div class="cbRegistrationTitle page-header">'
									.			'<h3>' . CBTxt::T( 'Sign up incomplete' ) . '</h3>'
									.		'</div>'
									.		$cbUser->getField( 'email', null, 'htmledit', 'div', 'register', 0, true, array( 'required' => 1, 'edit' => 1, 'registration' => 1 ) )
									.		'<div class="form-group cb_form_line clearfix">'
									.			'<div class="col-sm-offset-3 col-sm-9">'
									.				'<input type="submit" value="Sign up" class="btn btn-primary cbRegistrationSubmit" data-submit-text="Loading...">'
									.			'</div>'
									.		'</div>'
									.		cbGetSpoofInputTag( 'plugin' )
									.		cbGetRegAntiSpamInputTag( $regAntiSpamValues )
									.	'</form>';

			echo $return;

			return false;
		}

		$user->set( 'email', $email );

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

示例11: getCBpluginComponent

 /**
  * WARNING: UNCHECKED ACCESS! On purpose unchecked access for M2M operations
  * Generates the HTML to display for a specific component-like page for the tab. WARNING: unchecked access !
  * @param  null       $tab
  * @param  UserTable  $user      the user being displayed
  * @param  int        $ui        1 for front-end, 2 for back-end
  * @param  array      $postdata  _POST data for saving edited tab content as generated with getEditTab
  * @return mixed                 either string HTML for tab content, or false if ErrorMSG generated
  */
 public function getCBpluginComponent($tab, &$user, $ui, &$postdata)
 {
     global $_CB_framework, $ueConfig, $_GET;
     cbpaidErrorHandler::on();
     $result = null;
     $do = cbGetParam($_GET, 'do');
     switch ($do) {
         case null:
             $return = $this->getTabComponent($tab, $user, $ui, $postdata);
             cbpaidErrorHandler::keepTurnedOn();
             break;
         case 'display_subscriptions':
             if ($user && $user->id && $_CB_framework->myId()) {
                 $regTitle = strip_tags(CBPTXT::T($this->params->get('regTitle', "Subscriptions")));
                 outputCbTemplate();
                 $_CB_framework->setPageTitle($regTitle);
                 $_CB_framework->appendPathWay($regTitle);
                 $pre = '<div class="cbPageOuter"><div class="cbPageInner">';
                 $post = '</div></div><div class="cbClr"> </div>';
                 $return = $pre . $this->displayUserTab($user) . $post;
             } else {
                 if ($_CB_framework->getCfg('allowUserRegistration') == '0' && (!isset($ueConfig['reg_admin_allowcbregistration']) || $ueConfig['reg_admin_allowcbregistration'] != '1')) {
                     $return = _UE_NOT_AUTHORIZED . '<br />' . _UE_DO_LOGIN;
                 } else {
                     /*
                     $registrationUrl	=	cbSef( 'index.php?option=com_comprofiler&task=registers' );
                     $registrationLink	=	'<a href="' . $registrationUrl . '">' . _UE_REGISTER . '</a>';
                     $loginRegisterText	=	sprintf( CBPTXT::Th("Please login or %s"), $registrationLink );
                     $return				=	_UE_NOT_AUTHORIZED . '<br /><br />' . $loginRegisterText;
                     */
                     $accessPlans = null;
                     $return = cbpaidControllerOffer::displaySpecificPlans($accessPlans, null, $user, '');
                 }
             }
             break;
         case 'accessdenied':
             $params = cbpaidApp::settingsParams();
             $accessRedirectLink = $params->get('subscriptionNeededRedirectLink');
             if ($accessRedirectLink) {
                 $textMessage = $params->get('subscriptionNeededText', "A membership is needed for access.");
                 $return = null;
                 cbRedirect(cbSef($accessRedirectLink, false), CBPTXT::T($textMessage), 'warning');
             } else {
                 /** @noinspection PhpIncludeInspection */
                 include_once cbpaidApp::getAbsoluteFilePath('plugin/cbsubscontent/cbsubs.content_deniedview.php');
                 $accessDeniedView = new cbpaidContentAccessDeniedView();
                 $return = $accessDeniedView->display($user, $this);
             }
             break;
         case 'displayplans':
             $plansParam = cbGetParam($_GET, 'plans');
             $plans = null;
             $preselect = null;
             if ($plansParam) {
                 $plansParam = explode('-', $plansParam);
                 foreach ($plansParam as $p) {
                     $pN = (int) $p;
                     if ($pN) {
                         $plans[] = $pN;
                         if (substr($p, -1) == 's') {
                             $preselect[] = $pN;
                         }
                     }
                 }
             }
             if ($user === null || $user->id == $_CB_framework->myId()) {
                 $introText = CBPTXT::Th($this->params->get('plansDisplayIntroText', "We suggest subscribing to following subscriptions:"));
                 $return = cbpaidControllerOffer::displaySpecificPlans($plans, $preselect, $user, $introText);
             } else {
                 $return = _UE_NOT_AUTHORIZED;
             }
             break;
         case 'massexpire':
             // cron
             $params = cbpaidApp::settingsParams();
             $key = cbGetParam($_GET, 'key');
             if ($key && $key == md5($params->get('license_number')) && $params->get('massexpirymethod', 0) >= 2) {
                 $limit = $params->get('massexpirynumber', 100);
                 // mass-expire 100 subscriptions at a time on the way if not exipring a particular user:
                 $plansMgr = cbpaidPlansMgr::getInstance();
                 $plansMgr->checkAllSubscriptions((int) $limit);
                 $return = null;
             } else {
                 $return = CBPTXT::Th("Invalid mass-expiry link: link is in global CBSubs settings.");
             }
             break;
         case 'autopayments':
             // cron
             $params = cbpaidApp::settingsParams();
             $key = cbGetParam($_GET, 'key');
             if ($key && $key == md5($params->get('license_number'))) {
//.........这里部分代码省略.........
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:101,代码来源:cbpaidControllerCBComponent.php

示例12: getDisplayTab

	/**
	 * Generates the HTML to display the user profile tab
	 *
	 * @param  \CB\Database\Table\TabTable   $tab       the tab database entry
	 * @param  \CB\Database\Table\UserTable  $user      the user being displayed
	 * @param  int                           $ui        1 for front-end, 2 for back-end
	 * @return string|boolean                           Either string HTML for tab content, or false if ErrorMSG generated
	 */
	public function getDisplayTab( $tab, $user, $ui )
	{
		global $_CB_framework, $_CB_database, $_LANG;

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

		$plugin				=	cbhangoutClass::getPlugin();
		$model				=	cbhangoutClass::getModel();
		$viewer				=	CBuser::getMyUserDataInstance();

		cbhangoutClass::getTemplate( 'tab' );

		$limit				=	(int) $this->params->get( 'tab_limit', 15 );
		$limitstart			=	$_CB_framework->getUserStateFromRequest( 'tab_hangout_limitstart{com_comprofiler}', 'tab_hangout_limitstart' );
		$filterSearch		=	$_CB_framework->getUserStateFromRequest( 'tab_hangout_search{com_comprofiler}', 'tab_hangout_search' );
		$where				=	null;

		if ( isset( $filterSearch ) && ( $filterSearch != '' ) ) {
			if ( $model->type != 2 ) {
				$where		.=	"\n AND ( a." . $_CB_database->NameQuote( 'title' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $filterSearch, true ) . '%', false )
							.	" OR a." . $_CB_database->NameQuote( 'introtext' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $filterSearch, true ) . '%', false )
							.	" OR a." . $_CB_database->NameQuote( 'fulltext' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $filterSearch, true ) . '%', false ) . " )";
			} else {
				$where		.=	"\n AND ( a." . $_CB_database->NameQuote( 'title' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $filterSearch, true ) . '%', false )
							.	" OR a." . $_CB_database->NameQuote( 'hangout_intro' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $filterSearch, true ) . '%', false )
							.	" OR a." . $_CB_database->NameQuote( 'hangout_full' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $filterSearch, true ) . '%', false ) . " )";
			}
		}

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

		$total				=	cbhangoutModel::getHangoutTotal( $where, $viewer, $user, $plugin );

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

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

		$pageNav->setInputNamePrefix( 'tab_hangout_' );

		$rows				=	cbhangoutModel::getHangout( ( $this->params->get( 'tab_paging', 1 ) ? array( $pageNav->limitstart, $pageNav->limit ) : null ), $where, $viewer, $user, $plugin );

		$input				=	array();
		$input['search']	=	'<input type="text" name="tab_hangout_search" value="' . htmlspecialchars( $filterSearch ) . '" onchange="document.hangoutForm.submit();" placeholder="' . htmlspecialchars( CBTxt::T( 'Поиск...' ) ) . '" class="form-control" />';

		$tab->params		=	$this->params;

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

		$return				=	'<div id="cbHangout" class="cbBlogs' . ( $class ? ' ' . htmlspecialchars( $class ) : null ) . '">'
							.		'<div id="cbHangoutsInner" class="cbBlogsInner">'
							.			HTML_cbhangoutTab::showHangoutTab( $rows, $pageNav, $searching, $input, $viewer, $user, $model, $tab, $plugin )
							.		'</div>'
							.	'</div>';

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

示例13: outputCbJs

	return;
}

$exclude					=	$plugin->params->get( 'general_exclude', null );
$display					=	(int) $params->get( 'activity_display', 1 );
$avatar						=	(int) $params->get( 'activity_avatar', 0 );
$cutOff						=	(int) $params->get( 'activity_cut_off', 5 );
$limit						=	(int) $params->get( 'activity_limit', 10 );
$titleLimit					=	(int) $params->get( 'activity_title_length', 100 );
$descLimit					=	(int) $params->get( 'activity_desc_length', 100 );
$imgThumbnails				=	(int) $params->get( 'activity_img_thumbnails', 1 );
$user						=	CBuser::getUserDataInstance( $_CB_framework->myId() );
$now						=	$_CB_framework->getUTCNow();

outputCbJs( 1 );
outputCbTemplate( 1 );

cbactivityClass::getTemplate( array( 'module', 'jquery', 'activity' ) );
HTML_cbactivityJquery::loadJquery( 'module', $user, $plugin );

switch( $display ) {
	case 2: // Connections Only
		$where				=	array( 'b.referenceid', '=', (int) $user->get( 'id' ), 'b.accepted', '=', 1, 'b.pending', '=', 0 );
		break;
	case 3: // Self Only
		$where				=	array( 'user_id', '=', (int) $user->get( 'id' ) );
		break;
	case 4: // Connections and Self
		$where				=	array( 'user_id', '=', (int) $user->get( 'id' ), array( 'b.referenceid', '=', (int) $user->get( 'id' ), 'b.accepted', '=', 1, 'b.pending', '=', 0 ) );
		break;
	default: // Everyone
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:mod_cbactivity.php

示例14: drawView


//.........这里部分代码省略.........
                 if ($ui == 2) {
                     $options = array_merge($options, $actionPath, $parametersValues);
                 }
                 $cbprevstate = $this->input->get('cbprevstate', null, GetterInterface::STRING);
                 $params = new RegistryEditController($this->input, $this->db, new Registry(), $viewModel, $element, $context->getPluginObject());
                 $displayData = $this->bindInput($viewMode, $data);
                 // Set the parameters with the $displayData :
                 $registry = new Registry();
                 $registry->load($displayData);
                 $registry->setStorage($displayData);
                 $params->setRegistry($registry);
                 $params->setPluginParams($pluginParams);
                 $params->setOptions($options);
                 if ($extendedParser) {
                     $params->setExtendedViewParser($extendedParser);
                 }
                 $extenders = $allViewsModels->xpath('extend');
                 foreach ($extenders as $extends) {
                     RegistryEditView::extendXMLnode($extends, $element, $actionsModel, $context->getPluginObject());
                 }
                 $viewType = $viewModel->attributes('type');
                 switch ($viewType) {
                     case 'params':
                         if ($mode == 'edit') {
                             if ($viewMode == 'edit' || $viewMode == 'show') {
                                 $viewTypeMode = $viewMode == 'edit' ? 'param' : 'view';
                                 if ($ui == 2) {
                                     $htmlOutput = $this->input->get('no_html', 0, GetterInterface::COMMAND) != 1 && $this->input->get('format', null, GetterInterface::COMMAND) != 'raw';
                                     ActionViewAdmin::editPluginView($options, $actionPath, $viewModel, $displayData, $params, $context->getPluginObject(), $viewTypeMode, $cbprevstate, $htmlOutput);
                                     $settings = null;
                                     $html = null;
                                 } else {
                                     /** @global \stdClass $_CB_Backend_Menu   : 'show' : only displays close button, 'edit' : special close button */
                                     global $_CB_Backend_Menu;
                                     $_CB_Backend_Menu = new \stdClass();
                                     $html = '';
                                     outputCbTemplate();
                                     outputCbJs();
                                     // $_CB_framework->outputCbJQuery( '' );
                                     initToolTip();
                                     $htmlFormatting = $viewModel->attributes('viewformatting');
                                     if (!$htmlFormatting) {
                                         global $ueConfig;
                                         if (isset($ueConfig['use_divs']) && $ueConfig['use_divs'] == 1) {
                                             $htmlFormatting = 'div';
                                         } else {
                                             $htmlFormatting = 'table';
                                         }
                                     }
                                     $settings = $params->draw(null, null, null, null, null, null, false, $viewTypeMode, $htmlFormatting);
                                 }
                                 if ($ui == 2) {
                                     $_CB_Backend_Menu->mode = $viewMode;
                                     // Implemented in lower level in RegistryEditView:  $toolbarMenu = $viewModel->getElementByPath( 'toolbarmenu' );
                                 }
                                 if ($ui != 2) {
                                     $actionView = new ActionView();
                                     $buttonSaveText = $actionsModel->attributes('label');
                                     if (!$buttonSaveText) {
                                         $buttonSaveText = 'Save';
                                     }
                                     $buttonSaveText = CBTxt::Th($buttonSaveText);
                                     //	CBTxt::Th("Save"); For translation strings extraction
                                     $warning = null;
                                     if ($viewTypeMode == 'param') {
                                         $settings .= '<div class="cbControlButtonsLine">' . "\n\t" . '<span class="cb_button_wrapper">' . '<button type="submit" name="actbutton" value="' . 'save' . $action . '" class="button cbregButton cbregSaveButton">' . $buttonSaveText . '</button>' . '</span>' . "\n\t" . '</div>' . "\n";
                                         $postedActionPath = $actionPath;
                                         unset($postedActionPath['view']);
                                         $formHiddens = array_merge($this->getBaseOptions(), array('act' => 'save' . $action), $postedActionPath);
                                     } else {
                                         $formHiddens = null;
                                     }
                                     $html .= $actionView->drawForm($settings, $warning, $formHiddens, array_merge($this->_getParams, array('act' => $action)), RegistryEditView::buildClasses($viewModel));
                                     return $html;
                                 }
                             } else {
                                 echo 'showview::params: mode is ' . $mode . ' but view mode is ' . $viewMode . ' instead of edit.';
                             }
                         } elseif (in_array($mode, array('apply', 'save', 'savenew', 'savecopy'))) {
                             $this->savePluginView($options, $actionPath, $keyValues, $parametersValues, $viewModel, $data, $params, $mode, $dataModelType, $context->getPluginObject(), $dataModel, $pluginParams, $cbprevstate, $ui);
                             if ($ui == 2 && $mode == 'apply') {
                                 // We arrive here only in case of saving error, as redirect (performed in savePluginView) would loose the inputs:
                                 return $this->drawView($option, $action, $element, 'edit');
                             }
                         } else {
                             echo 'showview::params: view type params mode ' . $mode . ' is not implemented !';
                         }
                         break;
                     default:
                         echo 'showview::not-params: type of view ' . $viewType . ' is not implemented !';
                         break;
                 }
                 break;
             default:
                 echo 'action::not-showview: child xml element "' . $actionItem->getName() . '" of action is not implemented !';
                 break;
         }
     }
     return null;
 }
开发者ID:Raul-mz,项目名称:web-erpcya,代码行数:101,代码来源:ActionController.php

示例15: edittab

    function edittab(&$row, $option, &$lists, $tabid, &$paramsEditorHtml)
    {
        global $_CB_framework, $task, $_CB_database, $_PLUGINS;
        _CBsecureAboveForm('edittab');
        outputCbTemplate(2);
        outputCbJs(2);
        initToolTip(2);
        $_CB_framework->outputCbJQuery('');
        global $_CB_Backend_Title;
        $_CB_Backend_Title = array(0 => array('cbicon-48-tabs', CBTxt::T('Community Builder Tab') . ": <small>" . ($row->tabid ? CBTxt::T('Edit') . ' [ ' . htmlspecialchars(getLangDefinition($row->title)) . ' ]' : CBTxt::T('New')) . '</small>'));
        if ($row->tabid && !$row->enabled) {
            echo '<div class="cbWarning">' . CBTxt::T('Tab is not published') . '</div>' . "\n";
        }
        $editorSave_description = $_CB_framework->saveCmsEditorJS('description');
        ob_start();
        ?>
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'showTab') {
		        <?php 
        echo $editorSave_description;
        ?>
				cbsubmitform( pressbutton );
				return;
			}
			var r = new RegExp("[^0-9A-Za-z]", "i");

			// do field validation
			if (jQuery.trim(form.title.value) == "") {
				alert('<?php 
        echo addslashes(CBTxt::T('You must provide a title.'));
        ?>
');
			} else {
		        <?php 
        echo $editorSave_description;
        ?>
				cbsubmitform( pressbutton );
			}
		}
<?php 
        $js = ob_get_contents();
        ob_end_clean();
        $_CB_framework->document->addHeadScriptDeclaration($js);
        ?>
	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>

	<form action="<?php 
        echo $_CB_framework->backendUrl('index.php?option=com_comprofiler&task=saveTab');
        ?>
" method="POST" name="adminForm">
	<table cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<td width="60%" valign="top">
			<table class="adminform">
			<tr>
				<th colspan="3">
				<?php 
        echo CBTxt::T('Tab Details');
        ?>
				</th>
			</tr>
			<tr>
				<td width="20%"><?php 
        echo CBTxt::T('Title');
        ?>
:</td>
				<td width="35%"><input type="text" name="title" class="inputbox" size="40" value="<?php 
        echo htmlspecialchars($row->title);
        ?>
" /></td>
				<td width="45%"><?php 
        echo CBTxt::T('Title as will appear on tab.');
        ?>
</td>
			</tr>
			<tr>
				<td colspan="3"><?php 
        echo CBTxt::T('Description: This description appears only on user edit, not on profile (For profile text, use delimiter fields)');
        ?>
:</td>
			</tr>
			<tr>
				<td colspan="3" align="left"><?php 
        echo $_CB_framework->displayCmsEditor('description', $row->description, 600, 200, 50, 10);
        // <textarea name="description" class="inputbox" cols="40" rows="10">< ?php echo htmlspecialchars( $row->description ); ? ></textarea>
        ?>
</td>
			</tr>
			<tr>
				<td><?php 
        echo CBTxt::T('Publish');
        ?>
:</td>
				<td><?php 
        echo $lists['enabled'];
        ?>
</td>
				<td>&nbsp;</td>
			</tr>
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:view.tab.php


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