本文整理汇总了PHP中getFieldIcons函数的典型用法代码示例。如果您正苦于以下问题:PHP getFieldIcons函数的具体用法?PHP getFieldIcons怎么用?PHP getFieldIcons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFieldIcons函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: emailUsers
/**
* Outputs legacy mass mailer display
*
* @deprecated 2.0
*
* @param UserTable[] $rows
* @param string $emailSubject
* @param string $emailBody
* @param string $emailAttach
* @param string $emailFromName
* @param string $emailFromAddr
* @param string $emailReplyName
* @param string $emailReplyAddr
* @param int $emailsPerBatch
* @param int $emailsBatch
* @param int $emailPause
* @param bool $simulationMode
* @param array $pluginRows
*/
public function emailUsers($rows, $emailSubject, $emailBody, $emailAttach, $emailFromName, $emailFromAddr, $emailReplyName, $emailReplyAddr, $emailsPerBatch, $emailsBatch, $emailPause, $simulationMode, $pluginRows)
{
global $_CB_framework, $_CB_Backend_Title;
_CBsecureAboveForm('showUsers');
cbimport('cb.validator');
outputCbTemplate(2);
outputCbJs(2);
$_CB_Backend_Title = array(0 => array('fa fa-envelope-o', CBTxt::T('Community Builder: Mass Mailer')));
$editorSave = $_CB_framework->saveCmsEditorJS('emailbody');
if ($editorSave) {
$js = "\$( '.cbEmailUsersForm' ).submit( function() { " . $editorSave . "});";
} else {
$js = null;
}
cbValidator::outputValidatorJs($js);
$emailsList = array();
foreach (array_slice($rows, 0, 100) as $row) {
$emailsList[] = htmlspecialchars($row->name) . ' <' . htmlspecialchars($row->email) . '>';
}
$return = '<form action="' . $_CB_framework->backendUrl('index.php') . '" method="post" name="adminForm" class="cb_form form-auto cbEmailUsersForm">' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('SEND_EMAIL_TO_TOTAL_USERS', 'Send Email to [total] users', array('[total]' => (int) count($rows))) . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . implode(', ', $emailsList) . (count($rows) > 100 ? ' <strong>' . CBTxt::Th('AND_COUNT_MORE_USERS', 'and [count] more users.', array('[count]' => (int) (count($rows) - 100))) . '</strong>' : null) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_SIMULATION_MODE_LABEL', 'Simulation Mode') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="checkbox" name="simulationmode" id="simulationmode"' . ($simulationMode ? ' checked="checked"' : null) . ' /> <label for="simulationmode">' . CBTxt::T('Do not send emails, just show me how it works') . '</label>' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_SIMULATION_MODE_TOOLTIP', 'Check this box to simulate email sending in a dry run mode. No emails are actually sent.'), CBTxt::T('MASS_MAILER_SIMULATION_MODE_LABEL', 'Simulation Mode'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_SUBJECT_LABEL', 'Email Subject') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailsubject" value="' . htmlspecialchars($emailSubject) . '" class="form-control required" size="60" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_SUBJECT_TOOLTIP', 'Type in the subject of the mass mailing (CB field substitutions are supported).'), CBTxt::T('MASS_MAILER_SUBJECT_LABEL', 'Email Subject'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_MESSAGE_LABEL', 'Email Message') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . $_CB_framework->displayCmsEditor('emailbody', $emailBody, 600, 200, 50, 7) . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_MESSAGE_TOOLTIP', 'Type in the main message body of your mass mailing (HTML editor and CB field substitutions are supported).'), CBTxt::T('MASS_MAILER_MESSAGE_LABEL', 'Email Message'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_ATTACHMENTS_LABEL', 'Email Attachments') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailattach" value="' . htmlspecialchars($emailAttach) . '" class="form-control" size="80" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_ATTACHMENTS_TOOLTIP', 'Absolute server path to file that should be attached to each email. Multiple files can be specified using a comma separator.'), CBTxt::T('MASS_MAILER_ATTACHMENTS_LABEL', 'Email Attachments'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('Substitutions for Subject, Message, and Attachments') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . CBTxt::T('You can use all CB substitutions as in most parts: e.g.: [cb:if team="winners"] Congratulations [cb:userfield field="name" /], you are in the winning team! [/cb:if]') . '</div>' . '</div>' . '</div>' . $this->_pluginRows($pluginRows) . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_FROM_NAME_LABEL', 'From Name') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailfromname" value="' . htmlspecialchars($emailFromName) . '" class="form-control" size="30" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_FROM_NAME_TOOLTIP', 'The name to be used in the From field of email. If left empty the CB and Joomla configuration defaults will be used.'), CBTxt::T('MASS_MAILER_FROM_NAME_LABEL', 'From Name'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_FROM_ADDRESS_LABEL', 'From Email Address') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailfromaddr" value="' . htmlspecialchars($emailFromAddr) . '" class="form-control" size="40" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_FROM_ADDRESS_TOOLTIP', 'The email address to be user in the From field of email. If left empty the CB and Joomla settings will be used.'), CBTxt::T('MASS_MAILER_FROM_ADDRESS_LABEL', 'From Email Address'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_REPLY_TO_NAME_LABEL', 'Reply-To Name') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailreplyname" value="' . htmlspecialchars($emailReplyName) . '" class="form-control" size="30" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_REPLY_TO_NAME_TOOLTIP', 'The Reply-To Name value to be used in the From field of email. If left empty the CB and Joomla settings will be used.'), CBTxt::T('MASS_MAILER_REPLY_TO_NAME_LABEL', 'Reply-To Name'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_REPLY_TO_ADDRESS_LABEL', 'Reply-To Email Address') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailreplyaddr" value="' . htmlspecialchars($emailReplyAddr) . '" class="form-control" size="40" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_REPLY_TO_ADDRESS_TOOLTIP', 'The Reply-To Email address to be used in the email.'), CBTxt::T('MASS_MAILER_REPLY_TO_ADDRESS_LABEL', 'Reply-To Email Address'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_EMAILS_PER_BATCH_LABEL', 'Emails per batch') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailsperbatch" value="' . htmlspecialchars($emailsPerBatch) . '" class="form-control required digits" size="12" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_EMAILS_PER_BATCH_TOOLTIP', 'The number of emails to be sent in each batch (default 50).'), CBTxt::T('MASS_MAILER_EMAILS_PER_BATCH_LABEL', 'Emails per batch'), false, 4) . '</div>' . '</div>' . '</div>' . '<div class="form-group cb_form_line clearfix">' . '<label class="control-label col-sm-3">' . CBTxt::Th('MASS_MAILER_SECONDS_BETWEEN_BATCHES_LABEL', 'Seconds of pause between batches') . '</label>' . '<div class="cb_field col-sm-9">' . '<div>' . '<input type="text" name="emailpause" value="' . htmlspecialchars($emailPause) . '" class="form-control required digits" size="12" />' . getFieldIcons(2, false, false, CBTxt::T('MASS_MAILER_SECONDS_BETWEEN_BATCHES_TOOLTIP', 'The number of seconds to pause between batch sending (default is 30 sec).'), CBTxt::T('MASS_MAILER_SECONDS_BETWEEN_BATCHES_LABEL', 'Seconds of pause between batches'), false, 4) . '</div>' . '</div>' . '</div>' . '<input type="hidden" name="option" value="com_comprofiler" />' . '<input type="hidden" name="view" value="emailusers" />' . '<input type="hidden" name="boxchecked" value="0" />';
foreach ($rows as $row) {
$return .= '<input type="hidden" name="cid[]" value="' . (int) $row->id . '">';
}
$return .= cbGetSpoofInputTag('user') . '</form>';
echo $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:45,代码来源:view.users.php
示例2: showForumsParams
/**
* render frontend group edit forums params
*
* @param GroupTable $row
* @param array $input
* @param CategoryTable $category
* @param UserTable $user
* @param cbgjForumsPlugin $plugin
* @return string
*/
static function showForumsParams( $row, $input, $category, $user, $plugin )
{
$return = '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="params__forums" class="col-sm-3 control-label">' . CBTxt::T( 'Forums' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['forums']
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally enable or disable usage of forums.' ) )
. '</div>'
. '</div>';
return $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:22,代码来源:group_edit.php
示例3: showPhotoParams
/**
* render frontend group edit photo params
*
* @param GroupTable $row
* @param array $input
* @param CategoryTable $category
* @param UserTable $user
* @param cbgjPhotoPlugin $plugin
* @return string
*/
static function showPhotoParams( $row, $input, $category, $user, $plugin )
{
$return = '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="params__photo" class="col-sm-3 control-label">' . CBTxt::T( 'Photos' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['photo']
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally enable or disable usage of photos. Group owner and group administrators are exempt from this configuration and can always upload photos. Note existing photos will still be accessible.' ) )
. '</div>'
. '</div>';
return $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:22,代码来源:group_edit.php
示例4: 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. [email protected]). 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() . ' /> '
. ' <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
示例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() . ' /> ' . ' <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() . ' /> '
. ' <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: showVideoEdit
/**
* render frontend video edit
*
* @param VideoTable $row
* @param array $input
* @param GroupTable $group
* @param UserTable $user
* @param CBplug_cbgroupjivevideo $plugin
* @return string
*/
static function showVideoEdit( $row, $input, $group, $user, $plugin )
{
global $_CB_framework, $_PLUGINS;
$pageTitle = ( $row->get( 'id' ) ? CBTxt::T( 'Edit Video' ) : CBTxt::T( 'New Video' ) );
$_CB_framework->setPageTitle( $pageTitle );
cbValidator::loadValidation();
initToolTip();
$isModerator = CBGroupJive::isModerator( $user->get( 'id' ) );
$canModerate = ( CBGroupJive::getGroupStatus( $user, $group ) >= 2 );
$return = null;
$_PLUGINS->trigger( 'gj_onBeforeDisplayVideoEdit', array( &$return, &$row, &$input, $group, $user ) );
$return .= '<div class="gjVideoEdit">'
. '<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'video', 'func' => 'save', 'id' => (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjVideoEditForm" id="gjVideoEditForm" class="cb_form gjVideoEditForm form-auto cbValidation">'
. ( $pageTitle ? '<div class="gjVideoEditTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null );
if ( $isModerator || $canModerate || ( $row->get( 'id' ) && ( $row->get( 'published' ) != -1 ) ) || ( $group->params()->get( 'video', 1 ) != 2 ) ) {
$return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="published" class="col-sm-3 control-label">' . CBTxt::T( 'Published' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['published']
. getFieldIcons( null, 0, null, CBTxt::T( 'Select publish state of this video. Unpublished videos will not be visible to the public.' ) )
. '</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::T( 'Title' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['title']
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally input a video title to display instead of url.' ) )
. '</div>'
. '</div>';
if ( $row->get( 'id' ) && $row->exists() ) {
$_CB_framework->outputCbJQuery( "$( '.gjVideoPlayer' ).mediaelementplayer();", 'media' );
$return .= '<div class="cbft_delimiter form-group cb_form_line clearfix">'
. '<div class="cb_field col-sm-offset-3 col-sm-9">'
. '<video width="640" height="360" style="width: 100%; height: 100%;" id="gjVideoPlayer' . (int) $row->get( 'id' ) . '" src="' . htmlspecialchars( $row->get( 'url' ) ) . '" type="' . htmlspecialchars( $row->mimeType() ) . '" controls="controls" preload="none" class="gjVideoPlayer"></video>'
. '</div>'
. '</div>';
}
$return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
. '<label for="url" class="col-sm-3 control-label">' . CBTxt::T( 'Video' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['url']
. getFieldIcons( null, ( ! $row->get( 'id' ) ? 1 : 0 ), null, CBTxt::T( 'Input the URL to the video to publish.' ) )
. ( $input['url_limits'] ? '<div class="help-block">' . $input['url_limits'] . '</div>' : null )
. '</div>'
. '</div>'
. '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
. '<label for="caption" class="col-sm-3 control-label">' . CBTxt::T( 'Caption' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['caption']
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally input a video caption.' ) )
. '</div>'
. '</div>';
if ( $isModerator ) {
$return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
. '<label for="user_id" class="col-sm-3 control-label">' . CBTxt::T( 'Owner' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['user_id']
. getFieldIcons( null, 1, null, CBTxt::T( 'Input the video owner id. Video owner determines the creator of the video specified as User ID.' ) )
. '</div>'
. '</div>';
}
if ( ( ! $isModerator ) && $plugin->params->get( 'groups_video_captcha', 0 ) ) {
$_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::T( '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">'
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:video_edit.php
示例9: showAboutEdit
/**
* render frontend about edit
*
* @param GroupTable $row
* @param array $input
* @param UserTable $user
* @param CBplug_cbgroupjiveabout $plugin
* @return string
*/
static function showAboutEdit( $row, $input, $user, $plugin )
{
global $_CB_framework, $_PLUGINS;
$pageTitle = CBTxt::T( 'About' );
$_CB_framework->setPageTitle( $pageTitle );
cbValidator::loadValidation();
initToolTip();
$return = null;
$_PLUGINS->trigger( 'gj_onBeforeDisplayAboutEdit', array( &$return, &$row, &$input, $user ) );
$return .= '<div class="gjAboutEdit">'
. '<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'about', 'func' => 'save', 'id' => (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjAboutEditForm" id="gjAboutEditForm" class="cb_form gjAboutEditForm form-auto cbValidation">'
. ( $pageTitle ? '<div class="gjAboutEditTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null )
. '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix cbtwolines">'
. '<div class="cb_field col-sm-12">'
. $input['about']
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally input a detailed description about this group.' ) )
. '</div>'
. '</div>';
if ( ( ! CBGroupJive::isModerator( $user->get( 'id' ) ) ) && $plugin->params->get( 'groups_about_captcha', 0 ) ) {
$_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::T( '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( null, 1, null )
. '</div>'
. '</div>';
}
}
$return .= '<div class="form-group cb_form_line clearfix cbtwolines">'
. '<div class="col-sm-12">'
. '<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Update About' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" ' . cbValidator::getSubmitBtnHtmlAttributes() . ' />'
. ' <input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-default" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->_gjPlugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $row->get( 'id' ) ) ) . '\'; })" />'
. '</div>'
. '</div>'
. cbGetSpoofInputTag( 'plugin' )
. '</form>'
. '</div>';
$_PLUGINS->trigger( 'gj_onAfterDisplayAboutEdit', array( &$return, $row, $input, $user ) );
$_CB_framework->setMenuMeta();
echo $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:73,代码来源:about_edit.php
示例10: showWallEdit
/**
* render frontend wall edit
*
* @param WallTable $row
* @param array $input
* @param GroupTable $group
* @param UserTable $user
* @param CBplug_cbgroupjivewall $plugin
* @return string
*/
static function showWallEdit( $row, $input, $group, $user, $plugin )
{
global $_CB_framework, $_PLUGINS;
$pageTitle = ( $row->get( 'id' ) ? CBTxt::T( 'Edit Post' ) : CBTxt::T( 'New Post' ) );
$_CB_framework->setPageTitle( $pageTitle );
cbValidator::loadValidation();
initToolTip();
$isModerator = CBGroupJive::isModerator( $user->get( 'id' ) );
$canModerate = ( CBGroupJive::getGroupStatus( $user, $group ) >= 2 );
$return = null;
$_PLUGINS->trigger( 'gj_onBeforeDisplayWallEdit', array( &$return, &$row, &$input, $group, $user ) );
$return .= '<div class="gjWallEdit">'
. '<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'wall', 'func' => 'save', 'id' => (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjWallEditForm" id="gjWallEditForm" class="cb_form gjWallEditForm form-auto cbValidation">'
. ( $pageTitle ? '<div class="gjWallEditTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null );
if ( $isModerator || $canModerate || ( $row->get( 'id' ) && ( $row->get( 'published' ) != -1 ) ) || ( $group->params()->get( 'wall', 1 ) != 2 ) ) {
$return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="published" class="col-sm-3 control-label">' . CBTxt::T( 'Published' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['published']
. getFieldIcons( null, 0, null, CBTxt::T( 'Select publish state of this post. Unpublished posts will not be visible to the public.' ) )
. '</div>'
. '</div>';
}
if ( $row->reply()->get( 'id' ) ) {
$return .= '<div class="cbft_delimiter form-group cb_form_line clearfix">'
. '<label class="col-sm-3 control-label">' . CBTxt::T( 'Reply' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $row->reply()->post()
. '</div>'
. '</div>';
}
$return .= '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
. '<label for="post" class="col-sm-3 control-label">' . CBTxt::T( 'Post' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['post']
. getFieldIcons( null, 1, null, CBTxt::T( 'Input the post to share.' ) )
. '</div>'
. '</div>';
if ( $isModerator ) {
$return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
. '<label for="user_id" class="col-sm-3 control-label">' . CBTxt::T( 'Owner' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['user_id']
. getFieldIcons( null, 1, null, CBTxt::T( 'Input the post owner id. Post owner determines the creator of the post specified as User ID.' ) )
. '</div>'
. '</div>';
}
$return .= '<div class="form-group cb_form_line clearfix cbtwolines">'
. '<div class="col-sm-offset-3 col-sm-9">'
. '<input type="submit" value="' . htmlspecialchars( ( $row->get( 'id' ) ? CBTxt::T( 'Update Post' ) : CBTxt::T( 'Post' ) ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" ' . cbValidator::getSubmitBtnHtmlAttributes() . ' />'
. ' <input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-default" onclick="cbjQuery.cbconfirm( \'' . addslashes( CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '\' ).done( function() { window.location.href = \'' . $_CB_framework->pluginClassUrl( $plugin->_gjPlugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) ) . '\'; })" />'
. '</div>'
. '</div>'
. ( ! $row->get( 'id' ) ? '<input type="hidden" id="group" name="group" value="' . (int) $group->get( 'id' ) . '" />' : null )
. cbGetSpoofInputTag( 'plugin' )
. '</form>'
. '</div>';
$_PLUGINS->trigger( 'gj_onAfterDisplayWallEdit', array( &$return, $row, $input, $group, $user ) );
$_CB_framework->setMenuMeta();
echo $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:85,代码来源:wall_edit.php
示例11: 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. [email protected]). 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,
|
请发表评论