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


PHP CBTxt::T方法代码示例

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


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

示例1: showOverview

	/**
	 * render frontend overview
	 *
	 * @param object $rows
	 * @param object $pageNav
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	static function showOverview( $rows, $pageNav, $user, $plugin ) {
		global $_CB_framework;

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

		$_CB_framework->setPageTitle( cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) );

		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' ) ) );

		$main			=	HTML_groupjiveOverviewMain::showOverviewMain( $rows, $pageNav, $user, $plugin );

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

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

		$return			.=	'</div>';

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

示例2: loadJquery

	/**
	 * output form validation jquery
	 *
	 * @param string $selector
	 * @param string $params
	 */
	static function loadJquery( $selector, $params ) {
		global $_CB_framework;

		if ( ! $selector ) {
			$selector	=	'#gjForm';
		}

		$js				=	"$( '" . addslashes( $selector ) . "' ).validate( {"
						.		"submitHandler: function( form ) {"
						.			"$( form ).find( 'input[type=\"submit\"]' ).attr( 'disabled', 'disabled' ).addClass( 'disabled' ).val( '" . addslashes( CBTxt::T( 'Loading...' ) ) . "' );"
						.			"form.submit();"
						.		"},";

		if ( $params ) {
			$js			.=		$params . ( ( cbIsoUtf_substr( trim( $params ), -1 ) != ',' ) ? ',' : null );
		}

		$js				.=		"ignoreTitle: true,"
						.		"errorClass: 'gjValidationError',"
						.		"highlight: function( element, errorClass ) {"
						.			"$( element ).parent().parent().addClass( 'error');"
						.		"},"
						.		"unhighlight: function( element, errorClass ) {"
						.			"$( element ).parent().parent().removeClass( 'error' );"
						.		"},"
						.		"errorElement: 'div',"
						.		"errorPlacement: function( error, element ) {"
						.			"$( element ).parent().children().last().after( error );"
						.		"}"
						.	"});"
						.	"$.extend( jQuery.validator.messages, {"
						.		"required: '" . addslashes( CBTxt::T( 'This input is required.' ) ) . "',"
						.		"remote: '" . addslashes( CBTxt::T( 'Please fix this input.' ) ) . "',"
						.		"email: '" . addslashes( CBTxt::T( 'Please input a valid email address.' ) ) . "',"
						.		"url: '" . addslashes( CBTxt::T( 'Please input a valid URL.' ) ) . "',"
						.		"date: '" . addslashes( CBTxt::T( 'Please input a valid date.' ) ) . "',"
						.		"dateISO: '" . addslashes( CBTxt::T( 'Please input a valid date (ISO).' ) ) . "',"
						.		"number: '" . addslashes( CBTxt::T( 'Please input a valid number.' ) ) . "',"
						.		"digits: '" . addslashes( CBTxt::T( 'Please input only digits.' ) ) . "',"
						.		"creditcard: '" . addslashes( CBTxt::T( 'Please input a valid credit card number.' ) ) . "',"
						.		"equalTo: '" . addslashes( CBTxt::T( 'Please input the same value again.' ) ) . "',"
						.		"accept: '" . addslashes( CBTxt::T( 'Please input a value with a valid extension.' ) ) . "',"
						.		"maxlength: $.validator.format('" . addslashes( CBTxt::T( 'Please input no more than {0} characters.' ) ) . "'),"
						.		"minlength: $.validator.format('" . addslashes( CBTxt::T( 'Please input at least {0} characters.' ) ) . "'),"
						.		"rangelength: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value between {0} and {1} characters long.' ) ) . "'),"
						.		"range: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value between {0} and {1}.' ) ) . "'),"
						.		"max: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value less than or equal to {0}.' ) ) . "'),"
						.		"min: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value greater than or equal to {0}.' ) ) . "')"
						.	"});";

		$_CB_framework->outputCbJQuery( $js, 'validate' );
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:jquery_validation.php

示例3: showCategoryMessage

	/**
	 * render frontend category message
	 *
	 * @param cbgjCategory $row
	 * @param array $input
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	static function showCategoryMessage( $row, $input, $user, $plugin ) {
		$row->setPathway( CBTxt::P( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) );

		$return			=	'<div class="gjCategoryMessage">'
						.		'<form action="' . cbgjClass::getPluginURL( array( 'categories', 'send', (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
						.			'<legend class="gjEditTitle">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</legend>'
						.			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					$input['subject']
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.						cbgjClass::getIcon( CBTxt::P( 'Input [groups] message subject.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
						.					'</span>'
						.				'</div>'
						.			'</div>'
						.			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					$input['body']
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.						cbgjClass::getIcon( CBTxt::P( 'Input [groups] message body.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
						.					'</span>'
						.				'</div>'
						.			'</div>';

		if ( $input['captcha'] !== false ) {
			$return		.=			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Captcha' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					'<div style="margin-bottom: 5px;">' . $input['captcha']['code'] . '</div>'
						.					'<div>' . $input['captcha']['input'] . '</div>'
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.					'</span>'
						.				'</div>'
						.			'</div>';
		}

		$return			.=			'<div class="gjButtonWrapper form-actions">'
						.				'<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" />&nbsp;'
						.				'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'show', (int) $row->get( 'id' ) ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
						.			'</div>'
						.			cbGetSpoofInputTag( 'plugin' )
						.		'</form>'
						.	'</div>';

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

示例4: showOverviewMessage

	/**
	 * render frontend overview message
	 *
	 * @param array $input
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	static function showOverviewMessage( $input, $user, $plugin ) {
		global $_CB_framework;

		$generalTitle	=	$plugin->params->get( 'general_title', $plugin->name );
		$pageTitle		=	CBTxt::P( 'Message [category]', array( '[category]' => cbgjClass::getOverride( 'category', true ) ) );

		$_CB_framework->setPageTitle( htmlspecialchars( $pageTitle ) );

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

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

		$return			=	'<div class="gjOverviewMessage">'
						.		'<form action="' . cbgjClass::getPluginURL( array( 'overview', 'send' ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
						.			'<legend class="gjEditTitle">' . $pageTitle . '</legend>'
						.			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					$input['subject']
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.						cbgjClass::getIcon( CBTxt::P( 'Input [categories] message subject.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) )
						.					'</span>'
						.				'</div>'
						.			'</div>'
						.			'<div class="gjEditContentInput control-group">'
						.				'<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
						.				'<div class="gjEditContentInputField controls">'
						.					$input['body']
						.					'<span class="gjEditContentInputIcon help-inline">'
						.						cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
						.						cbgjClass::getIcon( CBTxt::P( 'Input [categories] message body.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) )
						.					'</span>'
						.				'</div>'
						.			'</div>'
						.			'<div class="gjButtonWrapper form-actions">'
						.				'<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" />&nbsp;'
						.				'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'overview' ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
						.			'</div>'
						.			cbGetSpoofInputTag( 'plugin' )
						.		'</form>'
						.	'</div>';

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

示例5: ShowExpert

	/**
	 * Generates HTML for expert kunena sidebar mode
	 *
	 * @param moscomprofilerUser $user
	 * @param object             $forum
	 * @param object             $model
	 * @return mixed
	 */
	function ShowExpert( $user, $forum, $model, $params ) {
		$html					=	'<div>'
								.		'<span class="view-username">' . $model->getFieldValue( $user, 'formatname', 'html', 'list' ) . '</span> '
								.		'<span class="msgusertype">(' . $user->usertype . ')</span>'
								.	'</div>'
								.	'<div>' . $model->getFieldValue( $user, 'avatar', 'html', 'list' ) . '</div>'
								.	'<div class="viewcover">' . $model->getFieldValue( $user, 'forumrank' ) . '</div>'
								.	'<div class="viewcover"><strong>' . CBTxt::T( 'Karma: ' ) . '</strong>' . $model->getFieldValue( $user, 'forumkarma' ) . '</div>'
								.	'<div class="viewcover"><strong>' . CBTxt::T( 'Posts: ' ) . '</strong>' . $model->getFieldValue( $user, 'forumposts' ) . '</div>'
								.	'<div>'
								.		$model->getStatusIcon( $user )
								.		$model->getPMIcon( $user )
								.		$model->getProfileIcon( $user )
								.	'</div>';
									
		return $html;
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:25,代码来源:cb.simpleboardtab.sidebar.php

示例6: showOverviewPanes

	/**
	 * render frontend overview panes
	 *
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 * @return string
	 */
	static function showOverviewPanes( $user, $plugin ) {
		$overviewDesc			=	CBTxt::Th( $plugin->params->get( 'overview_desc', null ) );
		$authorized				=	cbgjClass::getAuthorization( null, null, $user );
		$categoryCount			=	count( cbgjData::getCategories( array( 'cat_access', 'mod_lvl1' ), array( 'parent', '=', 0 ) ) );

		$return					=	'<legend class="gjHeaderTitle">' . cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) . '</legend>'
								.	'<div class="gjGrid row-fluid">'
								.		'<div class="gjGridLeft span9">'
								.			'<div class="gjGridLeftLogo span4">'
								.				'<img alt="' . htmlspecialchars( CBTxt::T( 'Logo' ) ) . '" src="' . $plugin->livePath . '/images/' . $plugin->params->get( 'overview_logo', 'default_overview.png' ) . '" class="gjLogoDefault img-polaroid" />'
								.			'</div>'
								.			'<div class="gjGridLeftInfo span8">'
								.				cbgjClass::getIntegrations( 'gj_onBeforeOverviewInfo', array( $user, $plugin ) )
								.				( $categoryCount ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $categoryCount . '</div>' : null )
								.				cbgjClass::getIntegrations( 'gj_onAfterOverviewInfo', array( $user, $plugin ) )
								.			'</div>';

		if ( $overviewDesc ) {
			if ( $plugin->params->get( 'overview_desc_content', 0 ) ) {
				$overviewDesc	=	cbgjClass::prepareContentPlugins( $overviewDesc );
			}

			$return				.=			'<div class="gjGridLeftDesc span12 well well-small">' . $overviewDesc . '</div>';
		}

		$return					.=		'</div>'
								.		'<div class="gjGridRight span3">'
								.			cbgjClass::getIntegrations( 'gj_onBeforeOverviewMenu', array( $user, $plugin ), null, null )
								.			( cbgjClass::hasAccess( 'cat_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new' ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
								.			( cbgjClass::hasAccess( 'usr_mod', $authorized ) && $categoryCount ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview', 'message' ) ) . '">' . CBTxt::Ph( 'Message [categories]', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) . '</a></div>' : null )
								.			( cbgjClass::hasAccess( 'usr_panel', $authorized ) ? '<div><i class="icon-home"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel' ) ) . '">' . CBTxt::Ph( 'My [panel]', array( '[panel]' => cbgjClass::getOverride( 'panel' ) ) ) . '</a></div>' : null )
								.			cbgjClass::getIntegrations( 'gj_onAfterOverviewMenu', array( $user, $plugin ), null, null )
								.			( cbgjClass::hasAccess( 'gen_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show' ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
								.		'</div>'
								.	'</div>';

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

示例7: _cbadmin_emailUsers

	function _cbadmin_emailUsers( &$rows, $emailSubject, $emailBody, $limitstart, $limit, $total, $simulationMode ) {
		global $_PLUGINS;
		// simple spoof check security
		cbSpoofCheck( 'cbadmingui' );
		cbRegAntiSpamCheck();
	
		$cbNotification				=	new cbNotification();
		$mode						=	1;		// html
		
		$usernames					=	'';
		foreach ( $rows as $row ) {
			$user					=	CBuser::getUserDataInstance( (int) $row->id );
			$usernames				.=	( $usernames ? ', ' : '' ) . htmlspecialchars( $user->username );
			if ( $simulationMode ) {
				$usernames			.=	' (' . htmlspecialchars( CBTxt::T('email not send: simulation mode') ) . ')';
			} else {
				$extraStrings		=	array();
				$_PLUGINS->trigger( 'onBeforeBackendUserEmail', array( &$user, &$emailSubject, &$emailBody, $mode, &$extraStrings, $simulationMode ) );
				if ( ! $cbNotification->sendFromSystem( $user, $emailSubject, $this->_cbadmin_makeLinksAbsolute( $emailBody ), true, $mode, null, null, null, $extraStrings, false ) ) {
					$usernames		.=	': <span class="cb_result_error">' . htmlspecialchars( CBTxt::T('Error sending email!') ) . '</span>';
				}
			}
		}
	
		if ( $total < $limit ) {
			$limit					=	$total;
		}
		ob_start();
		$usersView					=	_CBloadView( 'users' );
		$usersView->ajaxResults( $usernames, $emailSubject, $this->_cbadmin_makeLinksAbsolute( $emailBody ), $limitstart, $limit, $total );
		$html						=	ob_get_contents();
		ob_end_clean();
	
		$reply						=	array(	'result'		=>	1,
												'htmlcontent'	=>	$html );
		if ( ! ( $total - ( $limitstart + $limit ) > 0 ) ) {
			$reply['result']		=	2;
		}
		echo json_encode( $reply );
		sleep(3);
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:41,代码来源:controller.users.php

示例8: _cbadmin_ajaxBatch

    function _cbadmin_ajaxBatch($ajaxUrl, $cssSelectorReply, $formSelector, $postArray, $delay, $limitstart = 0, $limit = 30, $textDuringExecution = null, $textWhenDone = null, $cssSelectorTitle, $titleTextWhenDone)
    {
        global $_CB_framework;
        $ajaxUrl = addslashes($ajaxUrl);
        $cbSpoofField = cbSpoofField();
        $cbSpoofString = cbSpoofString(null, 'cbadmingui');
        $regAntiSpamFieldName = cbGetRegAntiSpamFieldName();
        $regAntiSpamValues = cbGetRegAntiSpams();
        cbGetRegAntiSpamInputTag($regAntiSpamValues);
        // sets the cookie
        $regAntiSpZ = $regAntiSpamValues[0];
        $postString = '';
        foreach ($postArray as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $vv) {
                    $postString .= '&' . urlencode($k) . '[]=' . urlencode($vv);
                }
            } else {
                $postString .= '&' . urlencode($k) . '=' . urlencode($v);
            }
        }
        $postString = addslashes($postString);
        //$errorText				=	addslashes( $errorText );
        $textWaiting = addslashes(CBTxt::T('Waiting delay for next batch...'));
        $textExecuting = addslashes($textDuringExecution ? $textDuringExecution : CBTxt::T('Executing'));
        $textFinished = addslashes($textWhenDone ? $textWhenDone : CBTxt::T('Done'));
        $textError = addslashes(CBTxt::T('ERROR!'));
        $titleTextWhenDone = addslashes($titleTextWhenDone);
        $_CB_framework->outputCbJQuery(<<<EOT
\t{
\t\tvar cbanimate = function() {
\t\t\t\$(this).animate({width:'100%'},20000,function(){
\t\t\t\t\$(this).animate({width:'0%'},1000,cbanimate);
\t\t\t});
\t\t};
\t\tvar cbajaxjsonbatch = function(limitstart,limit,successFnct){
\t\t\t\$.ajax( {\ttype: 'POST',
\t\t\t\t\t\turl:  '{$ajaxUrl}',
\t\t\t\t\t\tdata: \$('{$formSelector}').serialize() + '&{$cbSpoofField}=' + encodeURIComponent('{$cbSpoofString}') + '&{$regAntiSpamFieldName}=' + encodeURIComponent('{$regAntiSpZ}') + '{$postString}' + '&limitstart=' + limitstart,
\t\t\t\t\t\tsuccess: function(response) {
\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar div').stop().animate( {width:'100%'},500).animate( {width:'0%'},200, function() { \$(this).css({"background-color":"#8f8"}) });
\t\t\t\t\t\t\t\$('{$cssSelectorReply}').fadeOut(400, function() {
\t\t\t\t\t\t\t\t\$(this).html(response.htmlcontent).fadeIn(400, function() {
\t\t\t\t\t\t\t\t\tif ( response.result == 1 ) {
\t\t\t\t\t\t\t\t\t\$(this).each( function() {
\t\t\t\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textWaiting}')
\t\t\t\t\t\t\t\t\t\t.siblings('div').animate( {width:'100%'},{$delay}*1000,'linear', function() {
\t\t\t\t\t\t\t\t\t\t\t\$(this).animate( {width:'0%'},200, function() {
\t\t\t\t\t\t\t\t\t\t\t\tcbajaxjsonbatch(limitstart+limit,limit,successFnct);
\t\t\t\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t\t\t} else if ( response.result == 2 ) {
\t\t\t\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textFinished}');
\t\t\t\t\t\t\t\t\t\tif (successFnct) {
\t\t\t\t\t\t\t\t\t\t\tsuccessFnct.call(response);
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textError}')
\t\t\t\t\t\t\t\t\t\t.siblings('div').css({"background-color":"#fcc"});
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t})
\t\t\t\t\t\t},
\t\t\t\t\t\terror: function (XMLHttpRequest, textStatus, errorThrown) {
\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar div').stop().animate( {width:'100%'},500).css({"background-color":"#f87"});
\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textError}');
\t\t\t\t\t\t\t\$('{$cssSelectorReply}').hide().html( ( errorThrown ? errorThrown : textStatus ? textStatus : 'No additional message' ).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;") ).fadeIn('fast');
\t\t\t\t\t\t},
\t\t\t\t\t\tdataType: 'json'
\t\t\t});
\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textExecuting}')
\t\t\t.siblings('div').css({"background-color":"#ee8"}).each(cbanimate);
\t\t};
\t\t
\t\tvar cbTitleSetDone = function() {
\t\t\t\$('{$cssSelectorTitle}').html('{$titleTextWhenDone}');
\t\t};
\t\t\tcbajaxjsonbatch({$limitstart},{$limit},cbTitleSetDone);
\t}
EOT
);
    }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:83,代码来源:view.users.php

示例9: getAccess

	public function getAccess() {
		global $_CB_framework;

		static $cache			=	array();

		$id						=	$this->get( 'access' );

		if ( ! isset( $cache[$id] ) ) {
			$access				=	array();

			if ( $id ) foreach ( explode( '|*|', $id ) as $k => $v ) {
				if ( $v == -1 ) {
					$access[$k]	=	CBTxt::T( 'Everybody' );
				} elseif ( $v == -2 ) {
					$access[$k]	=	CBTxt::T( 'All Non-Registered Users' );
				} elseif ( $v == -3 ) {
					$access[$k]	=	CBTxt::T( 'All Registered Users' );
				} elseif ( $v == -4 ) {
					$access[$k]	=	CBTxt::T( 'All Non-Moderators' );
				} elseif ( $v == -5 ) {
					$access[$k]	=	CBTxt::T( 'All Moderators' );
				} else {
					$access[$k]	=	CBTxt::T( $_CB_framework->acl->get_group_name( $v ) );
				}
			}

			$cache[$id]			=	$access;
		}

		return $cache[$id];
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:cbgroupjiveauto.php

示例10: _formatFieldActivityOutput

 /**
  * Returns the activity update corresponding to the logged values
  *
  * @param  moscomprofilerFields       $field
  * @param  moscomprofilerActivity     $activity
  * @param  moscomprofilerUser         $user
  * @param  string  $output            NO 'htmledit' BUT: 'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist'
  * @param  boolean $htmlspecialchars  TRUE: escape for display, FALSE: not escaped will display raw.
  * @return mixed
  */
 function _formatFieldActivityOutput(&$field, &$activity, &$user, $output, $htmlspecialchars = true)
 {
     $name = $field->name;
     /*
     		global $_CB_framework, $ueConfig;
     		$value		=	'<a href="' . $_CB_framework->userProfileUrl( $user->id ) . '">'
     					.	getNameFormat( $user->name, $user->username, $ueConfig['name_format'] )
     					.	'</a>'
     					.	' updated his '
     */
     $value = $this->_formatFieldOutput($field->name, $activity->new_value, $output, $htmlspecialchars);
     switch ($output) {
         case 'html':
         case 'rss':
         case 'htmledit':
             $title = $this->getFieldTitle($field, $user, $output, 'profile');
             if ($htmlspecialchars) {
                 return sprintf('%s %s %s', '<span class="titleCell">' . $title . '</span>', '<span class="cbIs">' . CBTxt::Th('is now') . '</span>', '<span class="fieldCell">' . htmlspecialchars($value) . '</span>');
             } else {
                 return sprintf(CBTxt::T('%s is now %s'), $title, $value);
                 //FIXME : LANGUAGE STRINGS FOR THIS !
             }
             break;
         case 'xml':
             return '<' . $name . '>' . htmlspecialchars($value) . '</' . $name . '>';
             // htmlspecialchars handled already by _formatFieldOutput
             break;
         case 'json':
             return "'" . $name . "' : '" . addslashes($value) . "'";
             break;
         case 'php':
             return array($name => $value);
             break;
         case 'csvheader':
         case 'fieldslist':
             return $name;
             break;
         case 'csv':
             return '"' . addslashes($value) . '"';
             break;
         default:
             trigger_error('_formatFieldActivityOutput called with ' . htmlspecialchars($output), E_USER_WARNING);
             return $value;
             break;
     }
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:56,代码来源:plugin.class.php

示例11: saveTab

	function saveTab( $option ) {
		global $_CB_database, $_CB_framework, $_POST;

		$this->_importNeeded();
		$this->_importNeededSave();

		if ( isset( $_POST['params'] ) ) {
		 	$_POST['params']	=	cbParamsEditorController::getRawParamsMagicgpcEscaped( $_POST['params'] );
		} else {
			$_POST['params']	=	'';
		}
	
		if ( ! isset( $_POST['tabid'] ) || ( count( $_POST ) == 0 ) ) {
			echo "<script type=\"text/javascript\"> alert('" . addslashes( CBTxt::T('Missing post values') ) . "'); window.history.go(-2); </script>\n";
			exit();
		}
		if ( $_POST['tabid'] ) {
			$oldrow		=	new moscomprofilerTabs( $_CB_database );
			if ( $oldrow->load( (int) $_POST['tabid'] )
				&& 	( ! in_array( $oldrow->useraccessgroupid, getChildGIDS( userGID( $_CB_framework->myId() ) ) ) ) ) {
				echo "<script type=\"text/javascript\"> alert('" . addslashes( CBTxt::T('Unauthorized Access') ) . "'); window.history.go(-1);</script>\n";
				exit;
			}
		}
	
		$row = new moscomprofilerTabs( $_CB_database );
		if (!$row->bind( $_POST )) {
			echo "<script type=\"text/javascript\"> alert('".$row->getError()."'); window.history.go(-1); </script>\n";
			exit();
		}
	
		if ( ! $row->ordering_register ) {
			$row->ordering_register		=	10;
		}
	
		$row->description	=	cleanEditorsTranslationJunk( trim( $row->description ) );
	
		if (!$row->check()) {
			echo "<script type=\"text/javascript\"> alert('".$row->getError()."'); window.history.go(-2); </script>\n";
			exit();
		}
		$row->tabid			=	(int) cbGetParam( $_POST, 'tabid', 0 );
		if ( ! $row->store() ) {
			echo "<script type=\"text/javascript\"> alert('".$row->getError()."'); window.history.go(-2); </script>\n";
			exit();
		}
	
		$row->checkin();
		cbRedirect( $_CB_framework->backendUrl( "index.php?option=$option&task=showTab" ), CBTxt::T('Successfully Saved Tab') . ": ". $row->title );
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:50,代码来源:controller.tab.php

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

示例13: array

"></span>
								</span>
							<?php 
        }
        ?>
							<?php 
        if ($newConnectionRequests) {
            ?>
								<?php 
            echo $newConnectionRequests == 1 ? CBTxt::T('YOU_HAVE_COUNT_NEW_CONNECTION_REQUEST', 'You have [count] new connection request.', array('[count]' => $newConnectionRequests)) : CBTxt::T('YOU_HAVE_COUNT_NEW_CONNECTION_REQUESTS', 'You have [count] new connection requests.', array('[count]' => $newConnectionRequests));
            ?>
							<?php 
        } else {
            ?>
								<?php 
            echo CBTxt::T('You have no new connection requests.');
            ?>
							<?php 
        }
        ?>
						</a>
					</li>
				<?php 
    }
    ?>
				<?php 
    if ($profileViewText) {
        ?>
					<li class="logout-profile">
						<a href="<?php 
        echo $_CB_framework->userProfileUrl();
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:31,代码来源:bootstrap_logout.php

示例14: saveField

 function saveField($option, $task)
 {
     global $_CB_database, $_CB_framework, $_POST, $_PLUGINS;
     if ($task == 'showField' || !(isset($_POST['oldtabid']) && isset($_POST['fieldid']))) {
         cbRedirect($_CB_framework->backendUrl("index.php?option={$option}&task={$task}"));
         return;
     }
     $this->_importNeeded();
     $this->_importNeededSave();
     $fieldOldTab = new moscomprofilerTabs($_CB_database);
     if (isset($_POST['oldtabid']) && $_POST['oldtabid']) {
         $fieldOldTab->load((int) $_POST['oldtabid']);
         // Check if user is a super user:
         if (!$_CB_framework->acl->amIaSuperAdmin()) {
             // Check if user belongs to useraccessgroupid:
             if (!in_array($fieldOldTab->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
             // Check if user belongs to viewaccesslevel:
             if (!in_array($fieldOldTab->viewaccesslevel, CBuser::getMyInstance()->getAuthorisedViewLevelsIds(false))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
         }
     }
     $fid = (int) $_POST['fieldid'];
     $row = new moscomprofilerFields($_CB_database);
     if ($fid) {
         // load the row from the db table
         if (!$row->load((int) $fid)) {
             echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Innexistant field')) . "'); window.history.go(-1);</script>\n";
             exit;
         }
         $fieldTab = new moscomprofilerTabs($_CB_database);
         // load the row from the db table
         $fieldTab->load((int) $row->tabid);
         // Check if user is a super user:
         if (!$_CB_framework->acl->amIaSuperAdmin()) {
             // Check if user belongs to useraccessgroupid:
             if (!in_array($fieldTab->useraccessgroupid, $_CB_framework->acl->get_groups_below_me(null, true))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
             // Check if user belongs to viewaccesslevel:
             if (!in_array($fieldTab->viewaccesslevel, CBuser::getMyInstance()->getAuthorisedViewLevelsIds(false))) {
                 echo "<script type=\"text/javascript\"> alert('" . addslashes(CBTxt::T('Unauthorized Access')) . "'); window.history.go(-1);</script>\n";
                 exit;
             }
         }
     }
     $oldrow = new moscomprofilerFields($_CB_database);
     foreach (array_keys(get_object_vars($row)) as $k) {
         if (substr($k, 0, 1) != '_') {
             $oldrow->{$k} = $row->{$k};
         }
     }
     $_PLUGINS->loadPluginGroup('user');
     if (!$this->_prov_bind_CB_field($row, $fid)) {
         echo "<script type=\"text/javascript\"> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
         exit;
     }
     // Set defaults if nothing is found
     // Also check if oldrow value to use its current value or default otherwise
     // This prevents a tab from storing to database with null values when some inputs are set disabled:
     if ($row->tabid == '') {
         $row->tabid = $oldrow->tabid != '' ? $oldrow->tabid : 11;
     }
     if ($row->profile == '') {
         $row->profile = $oldrow->profile != '' ? $oldrow->profile : 1;
     }
     if ($row->registration == '') {
         $row->registration = $oldrow->registration != '' ? $oldrow->registration : 1;
     }
     if ($row->published == '') {
         $row->published = $oldrow->published != '' ? $oldrow->published : 1;
     }
     if ($row->required == '') {
         $row->required = $oldrow->required != '' ? $oldrow->required : 0;
     }
     if ($row->readonly == '') {
         $row->readonly = $oldrow->readonly != '' ? $oldrow->readonly : 0;
     }
     if ($row->tablecolumns != '' && !in_array($row->type, array('password', 'userparams'))) {
         $searchable_default = 1;
     } else {
         $searchable_default = 0;
     }
     if ($row->searchable == '') {
         $row->searchable = $oldrow->searchable != '' ? $oldrow->searchable : $searchable_default;
     }
     // If the input is disabled we need to apply the default if the tabid isn't in POST:
     if (!isset($_POST['tabid'])) {
         $_POST['tabid'] = $row->tabid;
     }
     // Moved above check here just encase it ends up being empty:
     if ($task == 'showField' || !isset($_POST['tabid'])) {
         cbRedirect($_CB_framework->backendUrl("index.php?option={$option}&task={$task}"));
         return;
     }
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:controller.field.php

示例15:

	  </div>
		<?php 
}
?>
		<!-- End Register Button -->
		<!-- Recover Login -->
		<?php 
if ($showForgotLogin) {
    ?>
	  <div class="mdl-card__actions mdl-card--border">
	    <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" href="<?php 
    echo $_CB_framework->viewUrl('lostpassword', true, null, 'html', $secureForm);
    ?>
">
		    <?php 
    echo CBTxt::T('Forgot Login?');
    ?>
	    </a>
	  </div>
		<?php 
}
?>
		<!-- End Recover Login -->
		<?php 
echo modCBLoginHelper::getPlugins($params, $type, 'almostEnd');
?>
		<?php 
echo modCBLoginHelper::getPlugins($params, $type, 'end');
?>
		<?php 
echo modCBLoginHelper::getPlugins($params, $type, 'afterForm');
开发者ID:jandredias,项目名称:CoderDojo-Tecnico,代码行数:31,代码来源:default.php


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