本文整理汇总了PHP中getFieldIcons函数的典型用法代码示例。如果您正苦于以下问题:PHP getFieldIcons函数的具体用法?PHP getFieldIcons怎么用?PHP getFieldIcons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFieldIcons函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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. 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() . ' /> '
. ' <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;
}
示例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;
}
示例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;
}
示例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;
}
示例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">'
//.........这里部分代码省略.........
示例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;
}
示例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;
}
示例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. 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() . ' /> '
. ' <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;
}
示例12: showEventEdit
/**
* render frontend event edit
*
* @param EventTable $row
* @param array $input
* @param GroupTable $group
* @param UserTable $user
* @param CBplug_cbgroupjiveevents $plugin
* @return string
*/
static function showEventEdit( $row, $input, $group, $user, $plugin )
{
global $_CB_framework, $_PLUGINS;
$pageTitle = ( $row->get( 'id' ) ? CBTxt::T( 'Edit Event' ) : CBTxt::T( 'New Event' ) );
$_CB_framework->setPageTitle( $pageTitle );
cbValidator::loadValidation();
initToolTip();
$isModerator = CBGroupJive::isModerator( $user->get( 'id' ) );
$canModerate = ( CBGroupJive::getGroupStatus( $user, $group ) >= 2 );
$return = null;
$_PLUGINS->trigger( 'gj_onBeforeDisplayEventEdit', array( &$return, &$row, &$input, $group, $user ) );
$return .= '<div class="gjEventEdit">'
. '<form action="' . $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'events', 'func' => 'save', 'id' => (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjEventEditForm" id="gjEventEditForm" class="cb_form gjEventEditForm form-auto cbValidation">'
. ( $pageTitle ? '<div class="gjEventEditTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null );
if ( $isModerator || $canModerate || ( $row->get( 'id' ) && ( $row->get( 'published' ) != -1 ) ) || ( $group->params()->get( 'events', 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 event. Unpublished events 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, 1, null, CBTxt::T( 'Input the event title. This is the title that will distinguish this event from others. Suggested to input something to uniquely identify your event.' ) )
. '</div>'
. '</div>'
. '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
. '<label for="event" class="col-sm-3 control-label">' . CBTxt::T( 'Event' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['event']
. getFieldIcons( null, 1, null, CBTxt::T( 'Input a detailed description about this event.' ) )
. '</div>'
. '</div>'
. '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
. '<label for="location" class="col-sm-3 control-label">' . CBTxt::T( 'Location' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['location']
. getFieldIcons( null, 1, null, CBTxt::T( 'Input the location for this event (e.g. My House, The Park, Restaurant Name, etc..).' ) )
. '</div>'
. '</div>';
if ( $plugin->params->get( 'groups_events_address', 1 ) ) {
$js = "$( '.gjButtonLocation' ).on( 'click', function() {"
. "if ( typeof navigator.geolocation == 'undefined' ) {"
. "return null;"
. "}"
. "var input = $( this ).siblings( 'input' );"
. "navigator.geolocation.getCurrentPosition( function( position ) {"
. "input.val( position.coords.latitude + ',' + position.coords.longitude );"
. "});"
. "});";
$_CB_framework->outputCbJQuery( $js );
$return .= '<div class="cbft_text cbtt_input form-group cb_form_line clearfix">'
. '<label for="address" class="col-sm-3 control-label">' . CBTxt::T( 'Address' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. '<span class="gjEventEditAddress">'
. $input['address']
. '<button type="button" class="gjButton gjButtonLocation btn btn-default"><span class="fa fa-map-marker"></span></button>'
. '</span>'
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally input the address for this event or click the map button to attempt to find your current location.' ) )
. '</div>'
. '</div>';
}
$return .= '<div class="cbft_datetime cbtt_input form-group cb_form_line clearfix">'
. '<label for="start" class="col-sm-3 control-label">' . CBTxt::T( 'Start Date' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['start']
. getFieldIcons( null, 1, null, CBTxt::T( 'Select the date and time this event starts.' ) )
. '</div>'
. '</div>'
. '<div class="cbft_datetime cbtt_input form-group cb_form_line clearfix">'
. '<label for="end" class="col-sm-3 control-label">' . CBTxt::T( 'End Date' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['end']
. getFieldIcons( null, 0, null, CBTxt::T( 'Optionally select the end date and time for this event.' ) )
//.........这里部分代码省略.........
示例13: getField
/**
* Accessor:
* Returns a field in specified format
*
* @param FieldTable $field
* @param UserTable $user
* @param string $output 'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
* @param string $reason 'profile' for user profile view, 'edit' for profile edit, 'register' for registration, 'search' for searches
* @param int $list_compare_types IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
* @return mixed
*/
public function getField( &$field, &$user, $output, $reason, $list_compare_types )
{
$return = null;
if ( ( ! Application::Cms()->getClientId() ) && ( ! Application::MyUser()->isGlobalModerator() ) && ( $output == 'htmledit' ) && in_array( $reason, array( 'register', 'edit' ) ) ) {
$return = cbantispamCaptcha::getInstance( $field->get( 'name' ), $field->params->get( 'cbantispam_captcha_mode', null ) )->getCaptchaHTML( null, null, null, null, $field->get( 'size' ), $this->getDataAttributes( $field, $user, $output, $reason ) )
. getFieldIcons( null, $this->_isRequired( $field, $user, $reason ), null, $this->getFieldDescription( $field, $user, $output, $reason ), $this->getFieldTitle( $field, $user, $output, $reason ) );
}
return $return;
}
示例14: showFolderEdit
/**
* @param cbgalleryFolderTable $row
* @param array $input
* @param string $type
* @param TabTable $tab
* @param UserTable $user
* @param UserTable $viewer
* @param cbPluginHandler $plugin
*/
static public function showFolderEdit( $row, $input, $type, $tab, $user, $viewer, $plugin )
{
global $_CB_framework, $_PLUGINS;
$_PLUGINS->trigger( 'gallery_onBeforeFolderEdit', array( &$row, &$input, $type, $tab, $user, $viewer, $plugin ) );
cbValidator::loadValidation();
switch( $type ) {
case 'photos':
$galleryType = CBTxt::T( 'Photos' );
break;
case 'files':
$galleryType = CBTxt::T( 'Files' );
break;
case 'videos':
$galleryType = CBTxt::T( 'Videos' );
break;
case 'music':
$galleryType = CBTxt::T( 'Music' );
break;
default:
$galleryType = CBTxt::T( 'Items' );
break;
}
switch( $type ) {
case 'photos':
case 'videos':
case 'music':
$typeTranslated = CBTxt::T( 'Album' );
break;
default:
$typeTranslated = CBTxt::T( 'Folder' );
break;
}
$cbModerator = Application::User( (int) $viewer->get( 'id' ) )->isGlobalModerator();
$pageTitle = ( $row->get( 'id' ) ? CBTxt::T( 'EDIT_FOLDER_TYPE', 'Edit [type]', array( '[type]' => $typeTranslated ) ) : CBTxt::T( 'NEW_FOLDER_TYPE', 'New [type]', array( '[type]' => $typeTranslated ) ) );
if ( $plugin->input( 'folder', false, GetterInterface::BOOLEAN ) ) {
$returnUrl = $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'folders', 'func' => 'show', 'type' => $type, 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) );
$formUrl = $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'folders', 'func' => 'save', 'type' => $type, 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ), 'folder' => true ) );
} else {
$returnUrl = $_CB_framework->userProfileUrl( (int) $user->get( 'id' ), true, $tab->get( 'tabid' ) );
$formUrl = $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'folders', 'func' => 'save', 'type' => $type, 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) );
}
$_CB_framework->setPageTitle( $pageTitle );
$_CB_framework->appendPathWay( htmlspecialchars( $galleryType ), $returnUrl );
$_CB_framework->appendPathWay( htmlspecialchars( $pageTitle ), $_CB_framework->pluginClassUrl( $plugin->element, true, ( $row->get( 'id' ) ? array( 'action' => 'folders', 'func' => 'edit', 'type' => $type, 'id' => (int) $row->get( 'id' ), 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) : array( 'action' => 'folders', 'func' => 'new', 'type' => $type, 'user' => (int) $user->get( 'id' ), 'tab' => (int) $tab->get( 'tabid' ) ) ) ) );
initToolTip();
$return = '<div class="' . htmlspecialchars( $type ) . 'FolderEdit">'
. '<form action="' . $formUrl . '" method="post" enctype="multipart/form-data" name="' . htmlspecialchars( $type ) . 'FolderForm" id="' . htmlspecialchars( $type ) . 'FolderForm" class="cb_form ' . htmlspecialchars( $type ) . 'FolderForm galleryFolderForm form-auto cbValidation">'
. ( $pageTitle ? '<div class="galleryFolderTitle page-header"><h3>' . $pageTitle . '</h3></div>' : null );
if ( $cbModerator || ( ! $plugin->params->get( $type . '_folder_approval', 0 ) ) || ( $row->get( 'id' ) && ( $row->get( 'published' ) != -1 ) ) ) {
$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( 1, 0, null, CBTxt::T( 'FOLDER_PUBLISHED_DESCRIPTION', 'Select publish status of the [type]. If unpublished the [type] will not be visible to the public.', array( '[type]' => $typeTranslated ) ) )
. '</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( 1, 0, null, CBTxt::T( 'FOLDER_TITLE_DESCRIPTION', 'Optionally input a title. If no title is provided the date will be displayed as the title.', array( '[type]' => $typeTranslated ) ) )
. '</div>'
. '</div>'
. '<div class="cbft_textarea cbtt_textarea form-group cb_form_line clearfix">'
. '<label for="description" class="col-sm-3 control-label">' . CBTxt::T( 'Description' ) . '</label>'
. '<div class="cb_field col-sm-9">'
. $input['description']
. getFieldIcons( 1, 0, null, CBTxt::T( 'FOLDER_DESCRIPTION_DESCRIPTION', 'Optionally input a description.', array( '[type]' => $typeTranslated ) ) )
. '</div>'
. '</div>';
if ( $cbModerator ) {
$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( 1, 1, null, CBTxt::T( 'FOLDER_OWNER_DESCRIPTION', 'Input owner as single integer user_id.', array( '[type]' => $typeTranslated ) ) )
. '</div>'
. '</div>';
//.........这里部分代码省略.........
示例15: edituser
//.........这里部分代码省略.........
alreadyFlagged = true;
break
}
}
if ( ! alreadyFlagged ) {
fieldErrorMessages.push(me[i].getAttribute('name'));
// add up all error messages
errorMSG += me[i].getAttribute('mosLabel') + ' : <?php
echo CBTxt::html_entity_decode(_UE_REQUIRED_ERROR);
?>
\n';
// notify user by changing background color, in this case to red
me[i].style.backgroundColor = "red";
iserror=1;
}
} else if (me[i].style.backgroundColor.slice(0,3)=="red") me[i].style.backgroundColor = cbDefaultFieldbackgroundColor;
}
if (me[i].value == '') {
// add up all error messages
errorMSG += me[i].getAttribute('mosLabel') + ' : <?php
echo CBTxt::html_entity_decode(_UE_REQUIRED_ERROR);
?>
\n';
// notify user by changing background color, in this case to red
me[i].style.backgroundColor = "red";
iserror=1;
} else if (me[i].style.backgroundColor.slice(0,3)=="red") me[i].style.backgroundColor = cbDefaultFieldbackgroundColor;
}
}
if(iserror==1) {
alert(errorMSG);
return false;
} else {
return true;
}
}
$('#cbcheckedadminForm').submit( cbFrmSubmitButton );
$('div.cbtoolbaractions .cbtoolbaraction').click( function() {
if ( $(this).attr('href') ) {
var taskVal = $(this).attr('href').substring(1);
} else if ( $(this).attr('value') ) {
taskVal = $(this).attr('value').substring(1);
}
$('#cbcheckedadminForm input[name=task]').val( taskVal );
if (taskVal == 'showusers') {
$('#userEditTable input').val('');
$('#cbcheckedadminForm')[0].submit();
} else {
$('#cbcheckedadminForm').submit();
}
return false;
} );
<?php
$cbjavascript = ob_get_contents();
ob_end_clean();
$_CB_framework->outputCbJQuery($cbjavascript);
// end of old way
}
if (is_array($results)) {
echo implode('', $results);
}
$this->_overideWebFxLayout();
?>
<div id="cbErrorMessages"></div>
<form action="<?php
echo $_CB_framework->backendUrl('index.php');
?>
" method="post" name="adminForm" id="cbcheckedadminForm" enctype="multipart/form-data" autocomplete="off">
<?php
echo "<table cellspacing='0' cellpadding='4' border='0' width='100%' id='userEditTable'><tr><td width='100%'>\n";
echo $tabcontent;
echo "</td></tr></table>";
?>
<input type="hidden" name="id" value="<?php
echo $user->id;
?>
" />
<input type="hidden" name="newCBuser" value="<?php
echo $newCBuser;
?>
" />
<input type="hidden" name="option" value="<?php
echo $option;
?>
" />
<input type="hidden" name="task" value="save" />
<?php
echo cbGetSpoofInputTag('user');
?>
</form>
<div style="align:center;">
<?php
echo getFieldIcons(2, true, true, "", "", true);
if (isset($_REQUEST['tab'])) {
$_CB_framework->outputCbJQuery("showCBTab( '" . addslashes(urldecode(stripslashes(cbGetParam($_REQUEST, 'tab')))) . "' );");
}
?>
</div>
<?php
}