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


PHP cbGetSpoofInputTag函数代码示例

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


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

示例1: drawForm

 /**
  * Draws a form posting to $getParams with CSS class $cssClass around $settings with $warnings at top, and $formHiddens hidden elements. Also add validation languages into head.
  *
  * @param  string        $settings
  * @param  string        $warning
  * @param  string[]      $formHiddens
  * @param  string|array  $getParams
  * @param  string|null   $cssClass
  * @return string
  */
 public function drawForm($settings, $warning, $formHiddens, $getParams, $cssClass = null)
 {
     $html = '';
     if ($warning) {
         $html .= '<div class="alert alert-danger">' . $warning . '</div>' . "\n";
     }
     if (is_array($getParams)) {
         $postUrl = 'index.php';
         if ($getParams && count($getParams) > 0) {
             foreach ($getParams as $k => $v) {
                 $getParams[$k] = $k . '=' . htmlspecialchars(urlencode($v));
             }
             $postUrl .= '?' . implode('&', $getParams);
         }
     } else {
         $postUrl = $getParams;
     }
     if ($formHiddens !== null) {
         cbValidator::loadValidation();
         $html .= '<form enctype="multipart/form-data" action="' . cbSef($postUrl) . '" method="post" name="adminForm" id="cbAdminFormForm" class="cb_form form-auto cbValidation cbregfrontendform' . ($cssClass ? ' ' . $cssClass : '') . '">' . "\n";
     }
     if ($formHiddens !== null) {
         foreach ($formHiddens as $k => $v) {
             $html .= "\t" . '<input type="hidden" name="' . htmlspecialchars($k) . '" value="' . htmlspecialchars($v) . '" />' . "\n";
         }
         $html .= cbGetSpoofInputTag('plugin');
     }
     $html .= $settings;
     if ($formHiddens !== null) {
         $html .= "</form>\n";
     }
     return $html;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:43,代码来源:ActionView.php

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

示例3: showWhitelist

	/**
	 * @param cbantispamWhitelistTable $row
	 * @param array                    $input
	 * @param string                   $type
	 * @param int|string               $tab
	 * @param UserTable                $user
	 * @param cbPluginHandler          $plugin
	 */
	static public function showWhitelist( $row, $input, $type, $tab, $user, $plugin )
	{
		global $_CB_framework;

		cbValidator::loadValidation();

		$name			=	CBuser::getInstance( (int) $user->get( 'id' ), false )->getField( 'formatname', null, 'html', 'none', 'profile', 0, true );
		$pageTitle		=	CBTxt::T( 'WHITELIST_NAME', 'Whitelist [name]', array( '[name]' => $name ) );

		$_CB_framework->setPageTitle( $pageTitle );
		$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( 'Whitelists' ) ), $_CB_framework->userProfileUrl( (int) $user->get( 'id' ), true, $tab ) );
		$_CB_framework->appendPathWay( htmlspecialchars( $pageTitle ), $_CB_framework->pluginClassUrl( $plugin->element, true, ( $row->get( 'id' ) ? array( 'action' => 'whitelist', 'func' => ( $type ? $type : 'edit' ), 'id' => (int) $row->get( 'id' ), 'usr' => (int) $user->get( 'id' ) ) : array( 'action' => 'whitelist', 'func' => ( $type ? $type : 'new' ), 'usr' => (int) $user->get( 'id' ) ) ) ) );

		$return			=	'<div class="whitelistEdit">'
						.		'<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'whitelist', 'func' => 'save', 'id' => (int) $row->get( 'id' ), 'usr' => (int) $user->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="whitelistForm" id="whitelistForm" class="cb_form whitelistForm form-auto cbValidation">'
						.			( $pageTitle ? '<div class="whitelistTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null )
						.			'<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
						.				'<label for="type" class="col-sm-3 control-label">' . CBTxt::T( 'Type' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['type']
						.					getFieldIcons( 1, 1, null, CBTxt::T( 'Select the whitelist type. Type determines what value should be supplied.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
						.				'<label for="value" class="col-sm-3 control-label">' . CBTxt::T( 'Value' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['value']
						.					getFieldIcons( 1, 1, null, CBTxt::T( 'Input whitelist value in relation to the type. User type use the users user_id (e.g. 42). IP Address type use a full valid IP Address (e.g. 192.168.0.1). Email type use a fill valid email address (e.g. invalid@cb.invalid). Email Domain type use a full email address domain after @ (e.g. example.com).' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
						.				'<label for="reason" class="col-sm-3 control-label">' . CBTxt::T( 'Reason' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['reason']
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Optionally input whitelist reason. Note this is for administrative purposes only.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="form-group cb_form_line clearfix">'
						.				'<div class="col-sm-offset-3 col-sm-9">'
						.					'<input type="submit" value="' . htmlspecialchars( ( $row->get( 'id' ) ? CBTxt::T( 'Update Whitelist' ) : CBTxt::T( 'Create Whitelist' ) ) ) . '" class="whitelistButton whitelistButtonSubmit btn btn-primary"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />&nbsp;'
						.					' <input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="whitelistButton whitelistButtonCancel btn btn-default" onclick="if ( confirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '\' ) ) { location.href = \'' . $_CB_framework->userProfileUrl( (int) $user->get( 'id' ), false, $tab ) . '\'; }" />'
						.				'</div>'
						.			'</div>'
						.			cbGetSpoofInputTag( 'plugin' )
						.		'</form>'
						.	'</div>';

		echo $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:57,代码来源:whitelist.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: showBlogEdit

 /**
  * @param  OrderedTable  $row
  * @param  string[]      $input
  * @param  UserTable     $user
  * @param  stdClass      $model
  * @param  PluginTable   $plugin
  */
 static function showBlogEdit($row, $input, $user, $model, $plugin)
 {
     global $_CB_framework, $_PLUGINS;
     cbValidator::loadValidation();
     $blogMode = $plugin->params->get('blog_mode', 1);
     $pageTitle = $row->get('id') ? CBTxt::T('Edit Blog') : CBTxt::T('Create Blog');
     $cbModerator = Application::User((int) $user->get('id'))->isGlobalModerator();
     $_CB_framework->setPageTitle($pageTitle);
     $_CB_framework->appendPathWay(htmlspecialchars(CBTxt::T('Blogs')), $_CB_framework->userProfileUrl($row->get('user', $user->get('id')), true, 'cbblogsTab'));
     $_CB_framework->appendPathWay(htmlspecialchars($pageTitle), $_CB_framework->pluginClassUrl($plugin->element, true, $row->get('id') ? array('action' => 'blogs', 'func' => 'edit', 'id' => (int) $row->get('id')) : array('action' => 'blogs', 'func' => 'new')));
     initToolTip();
     $return = '<div class="blogEdit">' . '<form action="' . $_CB_framework->pluginClassUrl($plugin->element, true, array('action' => 'blogs', 'func' => 'save', 'id' => (int) $row->get('id'))) . '" method="post" enctype="multipart/form-data" name="blogForm" id="blogForm" class="cb_form blogForm form-auto cbValidation">' . ($pageTitle ? '<div class="blogsTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null);
     if ($cbModerator || !$plugin->params->get('blog_approval', 0)) {
         $return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">' . '<label for="published" class="col-sm-3 control-label">' . CBTxt::Th('Published') . '</label>' . '<div class="cb_field col-sm-9">' . $input['published'] . getFieldIcons(1, 0, null, CBTxt::T('Select publish status of the blog. Unpublished blogs will not be visible to the public.')) . '</div>' . '</div>';
     }
     if ($plugin->params->get('blog_category_config', 1) || $cbModerator) {
         $return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">' . '<label for="category" class="col-sm-3 control-label">' . CBTxt::Th('Category') . '</label>' . '<div class="cb_field col-sm-9">' . $input['category'] . getFieldIcons(1, 0, null, CBTxt::T('Select blog category. Select the category that best describes your blog.')) . '</div>' . '</div>';
     }
     if ($plugin->params->get('blog_access_config', 1) || $cbModerator) {
         $return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">' . '<label for="access" class="col-sm-3 control-label">' . CBTxt::Th('Access') . '</label>' . '<div class="cb_field col-sm-9">' . $input['access'] . getFieldIcons(1, 0, null, CBTxt::T('Select access to blog; all groups above that level will also have access to the blog.')) . '</div>' . '</div>';
     }
     $return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">' . '<label for="title" class="col-sm-3 control-label">' . CBTxt::Th('Title') . '</label>' . '<div class="cb_field col-sm-9">' . $input['title'] . getFieldIcons(1, 1, null, CBTxt::T('Input blog title. This is the title that will distinguish this blog from others. Suggested to input something unique and intuitive.')) . '</div>' . '</div>';
     if (in_array($blogMode, array(1, 2))) {
         $return .= '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">' . '<label for="blog_intro" class="col-sm-3 control-label">' . ($blogMode == 1 ? CBTxt::T('Blog Intro') : CBTxt::T('Blog')) . '</label>' . '<div class="cb_field col-sm-9">' . $input['blog_intro'] . getFieldIcons(1, 0, null, CBTxt::T('Input HTML supported blog intro contents. Suggested to use minimal but well formatting for easy readability.')) . '</div>' . '</div>';
     }
     if (in_array($blogMode, array(1, 3))) {
         $return .= '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">' . '<label for="blog_full" class="col-sm-3 control-label">' . ($blogMode == 1 ? CBTxt::T('Blog Full') : CBTxt::T('Blog')) . '</label>' . '<div class="cb_field col-sm-9">' . $input['blog_full'] . getFieldIcons(1, 0, null, CBTxt::T('Input HTML supported blog contents. Suggested to use minimal but well formatting for easy readability.')) . '</div>' . '</div>';
     }
     if ($cbModerator) {
         $return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">' . '<label for="user" class="col-sm-3 control-label">' . CBTxt::T('Owner') . '</label>' . '<div class="cb_field col-sm-9">' . $input['user'] . getFieldIcons(1, 1, null, CBTxt::T('Input owner of blog as single integer user_id.')) . '</div>' . '</div>';
     }
     if ($plugin->params->get('blog_captcha', 0) && !$cbModerator) {
         $_PLUGINS->loadPluginGroup('user');
         $captcha = $_PLUGINS->trigger('onGetCaptchaHtmlElements', array(false));
         if (!empty($captcha)) {
             $captcha = $captcha[0];
             $return .= '<div class="form-group cb_form_line clearfix">' . '<label class="col-sm-3 control-label">' . CBTxt::Th('Captcha') . '</label>' . '<div class="cb_field col-sm-9">' . (isset($captcha[0]) ? $captcha[0] : null) . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<div class="cb_field col-sm-offset-3 col-sm-9">' . str_replace('inputbox', 'form-control', isset($captcha[1]) ? $captcha[1] : null) . getFieldIcons(1, 1, null) . '</div>' . '</div>';
         }
     }
     $return .= '<div class="form-group cb_form_line clearfix">' . '<div class="col-sm-offset-3 col-sm-9">' . '<input type="submit" value="' . htmlspecialchars($row->get('id') ? CBTxt::T('Update Blog') : CBTxt::T('Create Blog')) . '" class="blogsButton blogsButtonSubmit btn btn-primary"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />&nbsp;' . ' <input type="button" value="' . htmlspecialchars(CBTxt::T('Cancel')) . '" class="blogsButton blogsButtonCancel btn btn-default" onclick="if ( confirm( \'' . addslashes(CBTxt::T('Are you sure you want to cancel? All unsaved data will be lost!')) . '\' ) ) { location.href = \'' . $_CB_framework->userProfileUrl($row->get('user', $user->get('id')), false, 'cbblogsTab') . '\'; }" />' . '</div>' . '</div>' . cbGetSpoofInputTag('plugin') . '</form>' . '</div>';
     echo $return;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:49,代码来源:blog_edit.php

示例6: showDisable

	/**
	 * @param int             $userId
	 * @param UserTable       $user
	 * @param cbPluginHandler $plugin
	 */
	static public function showDisable( $userId, $user, $plugin )
	{
		global $_CB_framework;

		cbValidator::loadValidation();

		$profileUrl		=	$_CB_framework->userProfileUrl( $user->get( 'id' ) );
		$pageTitle		=	CBTxt::T( 'Disable My Account' );

		$_CB_framework->setPageTitle( $pageTitle );
		$_CB_framework->appendPathWay( htmlspecialchars( $pageTitle ), $profileUrl );

		initToolTip();

		$tooltip		=	cbTooltip( null, CBTxt::T( 'Optionally input a reason for disabling your account.' ), null, null, null, null, null, 'data-hascbtooltip="true"' );

		$return			=	'<div class="privacyDisableAccount">'
						.		'<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'privacy', 'func' => 'disableuser', 'id' => (int) $userId ) ) . '" method="post" enctype="multipart/form-data" name="privacyForm" id="privacyForm" class="cb_form privacyForm form-auto cbValidation">'
						.			( $pageTitle ? '<div class="privacyTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null )
						.			'<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
						.				'<label for="reason" class="col-sm-3 control-label">' . CBTxt::T( 'Reason' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					'<textarea id="reason" name="reason" class="form-control" cols="40" rows="5"' . ( $tooltip ? ' ' . $tooltip : null ) . '></textarea>'
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Optionally input a reason for disabling your account.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="form-group cb_form_line clearfix">'
						.				'<div class="col-sm-offset-3 col-sm-9">'
						.					'<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Disable Account' ) ) . '" class="privacyButton privacyButtonSubmit btn btn-primary"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />&nbsp;'
						.					' <input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="privacyButton privacyButtonCancel btn btn-default" onclick="location.href = \'' . $profileUrl . '\';" />'
						.				'</div>'
						.			'</div>'
						.			cbGetSpoofInputTag( 'plugin' )
						.		'</form>'
						.	'</div>';

		echo $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:43,代码来源:disable.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: showAutoEdit


//.........这里部分代码省略.........
						.					'<td>' . CBTxt::Th( 'Select type of auto. Auto determines what type of action is performed automatically.' ) . '</td>'
						.				'</tr>'
						.				'<tr id="list_groups">'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Groups' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['groups'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select groups to automatically join/leave.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Status' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['status'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select status of the user for the specified groups.' ) . '</td>'
						.				'</tr>'
						.				'<tr id="list_category">'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Category' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['category'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select category for the new group.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Category Parent' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['cat_parent'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select category parent of new category.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Category Name' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['cat_name'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Input substitution supported new category (e.g. [username]).' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Category Description' ) . '</th>'
						.					'<td width="40%">' . $input['cat_description'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Optionally input substitution supported new category (e.g. [name]).' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Category Types' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['types'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select categories available group types. Types determine the way a groups is joined (e.g. Invite requires new users to be invited to join a group).' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Category Owner' ) . '</th>'
						.					'<td width="40%">' . $input['cat_owner'] . '</td>'
						.					'<td>' . CBTxt::T( 'Optionally input substitution supported category owner override. If left blank the user triggering the auto will be used.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Category Unique' ) . '</th>'
						.					'<td width="40%">' . $input['cat_unique'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select if category should be unique to the user. When checking if a category exists by name it will also check if exists by user id. If disabled only name is checked.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Group Parent' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['grp_parent'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select parent group of new group.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Group Name' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['grp_name'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Input substitution supported new group (e.g. [username]).' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Group Description' ) . '</th>'
						.					'<td width="40%">' . $input['grp_description'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Optionally input substitution supported new group (e.g. [name]).' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%"><div>' . CBTxt::Th( 'Group Type' ) . '</div><div><small>' . CBTxt::Th( '(required)' ) . '</small></div></th>'
						.					'<td width="40%">' . $input['type'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select group type. Type determines the way your group is joined (e.g. Invite requires new users to be invited to join your group).' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Group Owner' ) . '</th>'
						.					'<td width="40%">' . $input['grp_owner'] . '</td>'
						.					'<td>' . CBTxt::T( 'Optionally input substitution supported group owner override. If left blank the user triggering the auto will be used.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Group Unique' ) . '</th>'
						.					'<td width="40%">' . $input['grp_unique'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select if groups should be unique to the user. When checking if a group exists by name it will also check if exists by user id. If disabled only name is checked.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Auto Join' ) . '</th>'
						.					'<td width="40%">' . $input['grp_autojoin'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Select if group should be automatically joined if duplicate found.' ) . '</td>'
						.				'</tr>'
						.				'<tr>'
						.					'<th width="15%">' . CBTxt::Th( 'Exclude' ) . '</th>'
						.					'<td width="40%">' . $input['exclude'] . '</td>'
						.					'<td>' . CBTxt::Th( 'Optionally input comma separated list of user ids to be excluded from auto action (e.g. 62,39,21,8).' ) . '</td>'
						.				'</tr>'
						.			'</tbody>'
						.		'</table>'
						.		'<input type="hidden" id="id" name="id" value="' . (int) $row->get( 'id' ) . '" />'
						.		'<input type="hidden" id="ordering" name="order" value="' . (int) $row->get( 'ordering', 99999 ) . '" />'
						.		'<input type="hidden" id="option" name="option" value="' . htmlspecialchars( $plugin->option ) . '" />'
						.		'<input type="hidden" id="task" name="task" value="editPlugin" />'
						.		'<input type="hidden" id="cid" name="cid" value="' . (int) $plugin->id . '" />'
						.		'<input type="hidden" id="action" name="action" value="plugin.auto_save" />'
						.		cbGetSpoofInputTag( 'plugin' )
						.	'</form>';

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

示例9: showUsers


//.........这里部分代码省略.........
      	<?php 
            }
            ?>
      		<img src="<?php 
            echo $imgpath . $img;
            ?>
" width="16" height="16" border="0" title="<?php 
            echo $hover1;
            ?>
" alt="<?php 
            echo $hover1;
            ?>
" />
      	<?php 
            if ($canEditState) {
                ?>
      	</a>
      	<?php 
            }
            ?>
      </td>
      <td width="10%">
      	<img src="<?php 
            echo $imgpath . $img3;
            ?>
" width="16" height="16" border="0" title="<?php 
            echo $hover3;
            ?>
" alt="<?php 
            echo $hover3;
            ?>
" />
      </td>
      <td width="10%">
      	<?php 
            if ($canEditState) {
                ?>
      	<a href="javascript: void(0);" onClick="return cbListItemTask( this, '<?php 
                echo $task2;
                ?>
', null, null, 'cb', '<?php 
                echo $i;
                ?>
' )">
      	<?php 
            }
            ?>
      		<img src="<?php 
            echo $imgpath . $img2;
            ?>
" width="16" height="16" border="0" title="<?php 
            echo $hover;
            ?>
" alt="<?php 
            echo $hover;
            ?>
" />
      	<?php 
            if ($canEditState) {
                ?>
      	</a>
      	<?php 
            }
            ?>
      </td>
      <td><?php 
            echo $row->id;
            ?>
</td>

    </tr>
    <?php 
            $k = 1 - $k;
        }
        ?>
   </tbody>
   <tfoot>
    <tr>
      <th align="center" colspan="<?php 
        echo $colspans;
        ?>
"> <?php 
        echo $pageNav->getListFooter();
        ?>
</th>
    </tr>
   </tfoot>
  </table>
  <input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
  <input type="hidden" name="task" value="showusers" />
  <input type="hidden" name="boxchecked" value="0" />
  <?php 
        echo cbGetSpoofInputTag('user');
        ?>
</form>
<?php 
    }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:view.users.php

示例10: _drawActionButton

	/**
	 * returns HTML code to show a renewal button for a  subscribed plan
	 * @access private
	 *
	 * @param  UserTable           $user               reflecting the user being displayed
	 * @param  int                 $ui                 1: frontend, 2: backend
	 * @param  cbpaidUsersubscriptionRecord  $subscription       subscription being paid/renewed/reactivated
	 * @param  int                 $planId             plan id being chosen
	 * @param  string              $renewButtonText    Text to display in button !!!! HTML-safe
	 * @param  string              $renewButtonAction  Action string to post
	 * @param  string              $areYouSureText     Ask question are you sure: text
	 * @return string                                  HTML for display
	 */
	protected function _drawActionButton( &$user, $ui, &$subscription, $planId, $renewButtonText, $renewButtonAction, $areYouSureText = null ) {
		$return = '';
		if ( $ui == 1 ) {
			$base_url = $this->getHttpsAbsURLwithParam( array( 'Itemid' => 0, 'user' => $user->id ), 'pluginclass' );
			$return .= '<form method="post" class="cbregRenewButtonForm" action="'.$base_url.'">';
			$return .= '<input type="hidden" name="user" value="'.$user->id.'" />';
			$return .= '<input type="hidden" name="' . $this->_getPagingParamName("act") . '" value="' . $renewButtonAction . '" />';
			$return .= '<input type="hidden" name="' . $this->_getPagingParamName("plan") . '" value="'. $planId .'" />';
			$return .= '<input type="hidden" name="' . $this->_getPagingParamName("subscriptionid[" . $planId ) . ']" value="' . $subscription->plan_id . ',' . $subscription->id . '" />';
			$return .= '<span class="cb_button_wrapper cpay_button_' . htmlspecialchars( $renewButtonAction ) . '_wrapper">'
//					.	'<input type="submit" class="button" name="' . $this->_getPagingParamName("cbregRenew") . '" value="' . htmlspecialchars( $renewButtonText ) . '" ';
					.	'<button type="submit" class="button" name="' . $this->_getPagingParamName("cbregRenew") . '" value="' . htmlspecialchars( strip_tags( $renewButtonText ) ) . '" ';
			if ( $areYouSureText ) {
				$return .= 'onclick="return confirm( \'' . addslashes( htmlspecialchars( $areYouSureText ) ) . '\' );" ';
			}
//			$return .= '/></span>';
			$return .= '>' . $renewButtonText . '</button></span>';
			$return .= cbGetSpoofInputTag( 'plugin' );
			$return .= "</form>\n";
		} elseif ( $ui == 2 ) {
			$return .= '<input type="checkbox" name="' . $this->_getPagingParamName( "subscription" . $renewButtonAction ) .'[]" id="renewsub_'.$planId.'_'.$subscription->id.'" class="inputbox" value="'.$planId.','.$subscription->id.'" ';
			if ( $areYouSureText ) {
				$return .= 'onchange="if (this.checked == true) { if ( confirm( \'' . addslashes( htmlspecialchars( $areYouSureText ) ) . '\' ) == 0 ) { this.checked = false ; } };" ';
			}
			$return .= '/> ';
			$return .= '<label for="renewsub'.$subscription->id.'">' . $renewButtonText ."</label>\n";
		}
		return $return;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:42,代码来源:cbpaidControllerUI.php

示例11: displayIntegrationForm

	/**
	 * Displays the integrations form for the basket
	 *
	 * @param  string  $html         HTML text to put inside the <form> element
	 * @param  string  $integration  Integration name for the form params and css id
	 * @return string                HTML with form
	 */
	public function displayIntegrationForm( $html, $integration ) {
		static $nameId	=	1;

		$checkHash				=	$this->checkHashUser();
		$baseClass				=	cbpaidApp::getBaseClass();
		$urlHtmlSpecialChared	=	$baseClass->getHttpsAbsURLwithParam( array( 'Itemid' => 0, 'act' => 'saveeditbasketintegration', 'integration' => $integration, 'bskt' => (int) $this->id, 'bck' => $checkHash ), 'pluginclass' );
		$classes				=	'cbregintformdiv cbregint_' . $integration;
		return '<div class="' . $classes . '" id="cbregintformdiv' . $nameId . '">'
			. '<form enctype="multipart/form-data" action="' . $urlHtmlSpecialChared . '" method="post" name="adminForm' . $nameId . '" id="cbregintform' . $nameId++ . '" class="cb_form cbregfrontendform cbregBasketIntegration">'
			. $html
			. cbGetSpoofInputTag( 'plugin' )
			. '</form></div>';
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:20,代码来源:cbpaidPaymentBasket.php

示例12: showBlock

	/**
	 * @param cbantispamBlockTable $row
	 * @param array                $input
	 * @param string               $type
	 * @param int|string           $tab
	 * @param UserTable            $user
	 * @param cbPluginHandler      $plugin
	 */
	static public function showBlock( $row, $input, $type, $tab, $user, $plugin )
	{
		global $_CB_framework, $ueConfig;

		cbValidator::loadValidation();

		$name			=	CBuser::getInstance( (int) $user->get( 'id' ), false )->getField( 'formatname', null, 'html', 'none', 'profile', 0, true );
		$pageTitle		=	CBTxt::T( 'BLOCK_NAME', 'Block [name]', array( '[name]' => $name ) );

		$_CB_framework->setPageTitle( $pageTitle );
		$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( 'Blocks' ) ), $_CB_framework->userProfileUrl( (int) $user->get( 'id' ), true, $tab ) );
		$_CB_framework->appendPathWay( htmlspecialchars( $pageTitle ), $_CB_framework->pluginClassUrl( $plugin->element, true, ( $row->get( 'id' ) ? array( 'action' => 'block', 'func' => ( $type ? $type : 'edit' ), 'id' => (int) $row->get( 'id' ), 'usr' => (int) $user->get( 'id' ) ) : array( 'action' => 'block', 'func' => ( $type ? $type : 'new' ), 'usr' => (int) $user->get( 'id' ) ) ) ) );

		$return			=	'<div class="blockEdit">'
						.		'<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'block', 'func' => 'save', 'id' => (int) $row->get( 'id' ), 'usr' => (int) $user->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="blockForm" id="blockForm" class="cb_form blockForm form-auto cbValidation">'
						.			( $pageTitle ? '<div class="blockTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null )
						.			'<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
						.				'<label for="type" class="col-sm-3 control-label">' . CBTxt::T( 'Type' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['type']
						.					getFieldIcons( 1, 1, null, CBTxt::T( 'Select the block type. Type determines what value should be supplied.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
						.				'<label for="value" class="col-sm-3 control-label">' . CBTxt::T( 'Value' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['value']
						.					getFieldIcons( 1, 1, null, CBTxt::T( 'Input block value in relation to the type. User type use the users user_id (e.g. 42). IP Address type use a full valid IP Address (e.g. 192.168.0.1). Email type use a fill valid email address (e.g. invalid@cb.invalid). Email Domain type use a full email address domain after @ (e.g. example.com).' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="cbft_date cbtt_input form-group cb_form_line clearfix">'
						.				'<label for="date" class="col-sm-3 control-label">' . CBTxt::T( 'Date' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['date']
						.					getFieldIcons( 1, 1, null, CBTxt::T( 'Select the date and time the block should go in affect. Note date and time always functions in UTC.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
						.				'<label for="duration" class="col-sm-3 control-label">' . CBTxt::T( 'Duration' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['duration'] . ' ' . $input['durations']
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Input the strtotime relative date (e.g. +1 Day). This duration will be added to the datetime specified above. Leave blank for a forever duration.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
						.				'<label for="reason" class="col-sm-3 control-label">' . CBTxt::T( 'Reason' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['reason']
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Optionally input block reason. If left blank will default to spam.' ) )
						.				'</div>'
						.			'</div>';

		if ( isset( $ueConfig['allowUserBanning'] ) && $ueConfig['allowUserBanning'] ) {
			$return		.=			'<div id="banUsr" class="cbft_select cbtt_select form-group cb_form_line clearfix">'
						.				'<label for="ban_user" class="col-sm-3 control-label">' . CBTxt::T( 'Ban Profile' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['ban_user']
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Optionally ban the users profile using Community Builder moderator ban feature. Note normal ban notification will be sent with the ban.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div id="banUsrReason" class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
						.				'<label for="ban_reason" class="col-sm-3 control-label">' . CBTxt::T( 'Ban Reason' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['ban_reason']
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Optionally input reason for profile ban.' ) )
						.				'</div>'
						.			'</div>';
		}

		$return			.=			'<div id="blockUsr" class="cbft_select cbtt_select form-group cb_form_line clearfix">'
						.				'<label for="block_user" class="col-sm-3 control-label">' . CBTxt::T( 'Block Profile' ) . '</label>'
						.				'<div class="cb_field col-sm-9">'
						.					$input['block_user']
						.					getFieldIcons( 1, 0, null, CBTxt::T( 'Optionally block the users profile using Joomla block state.' ) )
						.				'</div>'
						.			'</div>'
						.			'<div class="form-group cb_form_line clearfix">'
						.				'<div class="col-sm-offset-3 col-sm-9">'
						.					'<input type="submit" value="' . htmlspecialchars( ( $row->get( 'id' ) ? CBTxt::T( 'Update Block' ) : CBTxt::T( 'Create Block' ) ) ) . '" class="blockButton blockButtonSubmit btn btn-primary"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />&nbsp;'
						.					' <input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="blockButton blockButtonCancel btn btn-default" onclick="if ( confirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '\' ) ) { location.href = \'' . $_CB_framework->userProfileUrl( (int) $user->get( 'id' ), false, $tab ) . '\'; }" />'
						.				'</div>'
						.			'</div>'
						.			cbGetSpoofInputTag( 'plugin' )
						.		'</form>'
						.	'</div>';

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

示例13: edittab


//.........这里部分代码省略.........
			</tr>
			<?php 
        }
        ?>
			</table>
		</td>
		<td width="40%">
			<table class="adminform">
			<tr>
				<th colspan="2">
				<?php 
        echo CBTxt::T('Parameters');
        ?>
				</th>
			</tr>
			<tr>
				<td>
				<?php 
        if ($row->tabid && $row->pluginid > 0) {
            $plugin = new moscomprofilerPlugin($_CB_database);
            $plugin->load((int) $row->pluginid);
            // fail if checked out not by 'me'
            if ($plugin->checked_out && $plugin->checked_out != $_CB_framework->myId()) {
                echo "<script type=\"text/javascript\">alert('" . addslashes(sprintf(CBTxt::T('The plugin %s is currently being edited by another administrator'), $plugin->name)) . "'); document.location.href='" . $_CB_framework->backendUrl("index.php?option={$option}") . "'</script>\n";
                exit(0);
            }
            // get params values
            if ($plugin->type !== "language" && $plugin->id) {
                $_PLUGINS->loadPluginGroup($plugin->type, array((int) $plugin->id), 0);
            }
            $element = $_PLUGINS->loadPluginXML('editTab', $row->pluginclass, $plugin->id);
            /*
            					$xmlfile = $_CB_framework->getCfg('absolute_path') . '/components/com_comprofiler/plugin/' .$plugin->type . '/'.$plugin->folder . '/' . $plugin->element .'.xml';
            					// $params = new cbParameters( $row->params, $xmlfile );
            					cbimport('cb.xml.simplexml');
            					$xmlDoc = new CBSimpleXML();
            					if ( $xmlDoc->loadFile( $xmlfile ) ) {
            						$element =& $xmlDoc->document;
            					} else {
            						$element = null;
            					}
            */
            $pluginParams = new cbParamsBase($plugin->params);
            $params = new cbParamsEditorController($row->params, $element, $element, $plugin, $row->tabid);
            $params->setPluginParams($pluginParams);
            $options = array('option' => $option, 'task' => $task, 'pluginid' => $row->pluginid, 'tabid' => $row->tabid);
            $params->setOptions($options);
            echo $params->draw('params', 'tabs', 'tab', 'class', $row->pluginclass);
        } else {
            echo '<em>' . CBTxt::T('No Parameters') . '</em>';
        }
        if ($paramsEditorHtml) {
            foreach ($paramsEditorHtml as $paramsEditorHtmlBlock) {
                ?>
					<table class="adminform" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<th colspan="2">
								<?php 
                echo $paramsEditorHtmlBlock['title'];
                ?>
							</th>
						</tr>
						<tr>
							<td>
								<?php 
                echo $paramsEditorHtmlBlock['content'];
                ?>
							</td>
						</tr>
					</table>
<?php 
            }
        }
        ?>
				</td>
			</tr>
			</table>
		</td>
	</tr>
	</table>
  <input type="hidden" name="tabid" value="<?php 
        echo $row->tabid;
        ?>
" />
  <input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
  <input type="hidden" name="task" value="" />
  <?php 
        if (!$lists['useraccessgroup']) {
            ?>
  <input type="hidden" name="useraccessgroupid" value="-2" />
  <?php 
        }
        echo cbGetSpoofInputTag('tab');
        ?>
</form>
<?php 
    }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:view.tab.php

示例14: getDisplayTab

 /**
  * Generates the HTML to display the user profile tab
  *
  * @param  TabTable  $tab  the tab database entry
  * @param  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;
     $viewer = CBuser::getMyUserDataInstance();
     if (!$this->isInstalled() || !$viewer->get('id') || !$user->get('id') || $viewer->get('id') == $user->get('id')) {
         return null;
     }
     if (!$tab->params instanceof ParamsInterface) {
         $tab->params = new Registry($tab->params);
     }
     $showTitle = (int) $tab->params->get('pmsShowTitle', 1);
     $showSubject = (int) $tab->params->get('pmsShowSubject', 0);
     $description = $this->_writeTabDescription($tab, $user);
     cbValidator::loadValidation();
     $return = '<form action="' . $_CB_framework->pluginClassUrl($this->element, true, array('id' => (int) $user->get('id'))) . '" method="post" name="quickMsgForm" id="quickMsgForm" class="cb_form quickMsgForm cbValidation">' . '<div class="panel panel-default">' . ($showTitle ? '<div class="panel-heading">' . CBTxt::T($tab->title) . '</div>' : null) . '<div class="panel-body">';
     if ($description) {
         $return .= '<div class="cbft_delimiter form-group cb_form_line clearfix">' . '<div class="cb_field col-sm-12">' . $description . '</div>' . '</div>';
     }
     if ($showSubject) {
         $return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">' . '<label for="subject" class="col-sm-3 control-label">' . CBTxt::T('PM_SUBJECT', 'Subject') . '</label>' . '<div class="cb_field col-sm-9">' . '<input type="text" name="subject" value="" class="form-control" />' . '</div>' . '</div>';
     }
     $return .= '<div class="cbft_textarea cbtt_textarea cb_form_line clearfix">' . ($showSubject ? '<label for="subject" class="col-sm-3 control-label">' . CBTxt::T('PM_MESSAGE', 'Message') . '</label>' : null) . '<div class="cb_field col-sm-' . ($showSubject ? 9 : 12) . '">' . '<textarea name="message" class="form-control required" rows="5"></textarea>' . '</div>' . '</div>' . '</div>' . '<div class="panel-footer">' . '<div class="cb_form_line clearfix">' . '<div class="' . ($showSubject ? 'col-sm-offset-3 col-sm-9' : 'col-sm-12') . '">' . '<input type="submit" value="' . htmlspecialchars(CBTxt::T('PM_SEND_MESSAGE', 'Send Message')) . '" class="quickMsgButton quickMsgButtonSubmit btn btn-primary" ' . cbValidator::getSubmitBtnHtmlAttributes() . ' />&nbsp;' . '</div>' . '</div>' . '</div>' . '</div>' . cbGetSpoofInputTag('plugin') . '</form>';
     return $return;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:32,代码来源:pms.mypmspro.php

示例15: showOverviewMain


//.........这里部分代码省略.........
	static function showOverviewMain( $rows, $pageNav, $user, $plugin ) {
		$authorized			=	cbgjClass::getAuthorization( null, null, $user );
		$overviewSearch		=	$plugin->params->get( 'overview_search', 1 );
		$overviewPaging		=	$plugin->params->get( 'overview_paging', 1 );
		$overviewLimitbox	=	$plugin->params->get( 'overview_limitbox', 1 );
		$categoryDescLimit	=	(int) $plugin->params->get( 'overview_cat_desc_limit', 150 );
		$categoryApprove	=	$plugin->params->get( 'category_approve', 0 );
		$newCategory		=	( $plugin->params->get( 'overview_new_category', 0 ) && cbgjClass::hasAccess( 'cat_create', $authorized ) );
		$newGroup			=	( $plugin->params->get( 'overview_new_group', 0 ) && cbgjClass::hasAccess( 'grp_create', $authorized ) );

		$return				=	null;

		if ( $newCategory || $newGroup ) {
			$return			.=	'<div class="gjTop gjTopCenter">'
							.		'<div class="btn-group">'
							.			( $newCategory ? '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'new' ), true ) . '" />' : null )
							.			( $newGroup ? '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'new' ), true, true, false, null, true ) . '" />' : null )
							.		'</div>'
							.	'</div>';
		}

		$return				.=	'<form action="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '" method="post" name="gjForm" id="gjForm" class="gjForm">'
							.		( $overviewSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );

		if ( $rows ) foreach ( $rows as $row ) {
			$authorized		=	cbgjClass::getAuthorization( $row, null, $user );

			if ( $row->get( 'published' ) == 1 ) {
				$state		=	'<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'unpublish', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [category]?', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), true, false, null, true ) . '"><i class="icon-ban-circle"></i> ' . CBTxt::Th( 'Unpublish' ) . '</a></div>';
			} else {
				$state		=	'<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-ok"></i> ' . CBTxt::Th( 'Publish' ) . '</a></div>';
			}

			$canApprove		=	( $categoryApprove && ( $row->get( 'published' ) == -1 ) && cbgjClass::hasAccess( 'cat_can_publish', $authorized ) );

			$beforeMenu		=	cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryMenu', array( $row, $user, $plugin ) );
			$afterMenu		=	cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryMenu', array( $row, $user, $plugin ) );

			$return			.=		'<div class="gjContent row-fluid">'
							.			'<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
							.			'<div class="gjContentBody mini-layout span10">'
							.				'<div class="gjContentBodyHeader row-fluid">'
							.					'<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . '</small></h5></div>'
							.					'<div class="gjContentBodyMenu span3">';

			if ( $canApprove ) {
				$return		.=						'<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Approve' ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
			} else {
				if ( ( $row->get( 'published' ) == 0 ) || ( ( $row->get( 'published' ) == 1 ) && ( ! cbgjClass::hasAccess( 'cat_approved', $authorized ) ) ) ) {
					$return	.=						cbgjClass::getIcon( null, CBTxt::P( 'This [category] is currently unpublished.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), 'icon-eye-close' );
				}
			}

			if ( $beforeMenu || cbgjClass::hasAccess( array( 'mod_lvl1', 'cat_can_publish' ), $authorized ) || $afterMenu ) {
				$menuItems	=	$beforeMenu
							.	( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
							.	( ( ! $canApprove ) && cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ? $state : null )
							.	( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
							.	$afterMenu;

				$return		.=						cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
			}

			$return			.=					'</div>'
							.				'</div>'
							.				'<div class="gjContentBodyInfo">' . ( $row->getDescription( $categoryDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $categoryDescLimit ) . '</div>' : null ) . '</div>'
							.				'<div class="gjContentDivider"></div>'
							.				'<div class="gjContentBodyFooter">'
							.					cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
							.					( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'category', $row->nestedCount() ) . ' | ' : null )
							.					( $row->groupCount() ? cbgjClass::getOverride( 'group', $row->groupCount() ) . ' | ' : null )
							.					implode( ', ', $row->getTypes() )
							.					cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
							.				'</div>'
							.			'</div>'
							.		'</div>';
		} else {
			$return			.=		'<div class="gjContent">';

			if ( $overviewSearch && $pageNav->searching ) {
				$return		.=			CBTxt::Ph( 'No [category] search results found.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) );
			} else {
				$return		.=			CBTxt::Ph( 'There are no [categories] available.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) );
			}

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

		if ( $overviewPaging ) {
			$return			.=		'<div class="gjPaging pagination pagination-centered">'
							.			( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
							.			( ! $overviewLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
							.		'</div>';
		}

		$return				.=		cbGetSpoofInputTag( 'plugin' )
							.	'</form>';

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


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