本文整理汇总了PHP中CBTxt类的典型用法代码示例。如果您正苦于以下问题:PHP CBTxt类的具体用法?PHP CBTxt怎么用?PHP CBTxt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CBTxt类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: showOverview
/**
* render frontend overview
*
* @param object $rows
* @param object $pageNav
* @param moscomprofilerUser $user
* @param object $plugin
*/
static function showOverview( $rows, $pageNav, $user, $plugin ) {
global $_CB_framework;
$generalTitle = $plugin->params->get( 'general_title', $plugin->name );
$_CB_framework->setPageTitle( cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) );
if ( $generalTitle != '' ) {
$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( $generalTitle ) ), cbgjClass::getPluginURL() );
}
$_CB_framework->appendPathWay( cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ), cbgjClass::getPluginURL( array( 'overview' ) ) );
$main = HTML_groupjiveOverviewMain::showOverviewMain( $rows, $pageNav, $user, $plugin );
$return = '<div class="gjOverview">';
if ( $plugin->params->get( 'general_panes', 1 ) ) {
$return .= '<div class="gjHeader">'
. HTML_groupjiveOverviewPanes::showOverviewPanes( $user, $plugin )
. '</div>'
. '<div class="gjBody">'
. $main
. '</div>';
} else {
$return .= $main;
}
$return .= '</div>';
echo $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:40,代码来源:overview.php
示例2: showGroupPanes
/**
* render frontend group panes
*
* @param cbgjGroup $row
* @param cbgjCategory $category
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showGroupPanes( $row, $category, $user, $plugin ) {
$authorized = cbgjClass::getAuthorization( $category, $row, $user );
if ( $row->get( 'published' ) == 1 ) {
$state = '<div><i class="icon-ban-circle"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'unpublish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '">' . CBTxt::Ph( 'Unpublish [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>';
} else {
$state = '<div><i class="icon-ok"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Publish [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>';
}
$groupAdmins = $row->getAdmins();
$groupMods = $row->getModerators();
$return = '<legend class="gjHeaderTitle">' . $row->getName() . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. $row->getLogo( true )
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforeGroupInfo', array( $row, $category, $user, $plugin ) )
. ( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $row->nestedCount() . '</div>' : null )
. ( $row->userCount() ? '<div>' . cbgjClass::getOverride( 'user', true ) . ': ' . $row->userCount() . '</div>' : null )
. ( $row->get( 'user_id' ) ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $row->getOwnerName( true ) . '</div>' : null )
. ( ! empty( $groupMods ) ? '<div>' . cbgjClass::getOverride( 'moderator', true ) . ': ' . implode( ', ', $groupMods ) . '</div>' : null )
. ( ! empty( $groupAdmins ) ? '<div>' . cbgjClass::getOverride( 'admin', true ) . ': ' . implode( ', ', $groupAdmins ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Type: [grp_type]', array( '[grp_type]' => $row->getType() ) ) . '</div>'
. '<div>' . CBTxt::Ph( 'Access: [grp_access]', array( '[grp_access]' => $row->getAccess() ) ) . '</div>'
. '<div>' . cbgjClass::getOverride( 'category' ) . ': ' . $category->getName( 0, true ) . '</div>'
. ( $row->get( 'parent' ) ? '<div>' . cbgjClass::getOverride( 'group' ) . ': ' . $row->getParent()->getName( 0, true ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Created: [grp_date]', array( '[grp_date]' => cbFormatDate( $row->get( 'date' ), 1, false ) ) ) . '</div>'
. cbgjClass::getIntegrations( 'gj_onAfterGroupInfo', array( $row, $category, $user, $plugin ) )
. '</div>';
if ( $row->get( 'description' ) ) {
$return .= '<div class="gjGridLeftDesc span12 well well-small">'
. $row->getDescription()
. '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforeGroupMenu', array( $row, $category, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( array( 'grp_join', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . ( cbgjClass::hasAccess( 'grp_invited', $authorized ) ? CBTxt::Th( 'Accept Invite' ) : CBTxt::Ph( 'Join [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( array( 'grp_nested_create', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( array( 'grp_leave', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-minus"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'leave', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to leave this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '">' . CBTxt::Ph( 'Leave [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ? '<div><i class="icon-pencil"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Edit [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'grp_message', $authorized ) && $row->userCount() ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'message', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Message [users]', array( '[users]' => cbgjClass::getOverride( 'user', true ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ? $state : null )
. ( cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ? '<div><i class="icon-remove"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'delete', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [group] and all its associated [users]?', array( '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ) ) . '">' . CBTxt::Ph( 'Delete [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterGroupMenu', array( $row, $category, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'grp_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. ( $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $row->getParent()->getUrl() . '">' . CBTxt::Ph( 'Back to [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( ! $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $category->getUrl() . '">' . CBTxt::Ph( 'Back to [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. '</div>'
. '</div>';
return $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:67,代码来源:group_panes.php
示例3: loadJquery
/**
* output form validation jquery
*
* @param string $selector
* @param string $params
*/
static function loadJquery( $selector, $params ) {
global $_CB_framework;
if ( ! $selector ) {
$selector = '#gjForm';
}
$js = "$( '" . addslashes( $selector ) . "' ).validate( {"
. "submitHandler: function( form ) {"
. "$( form ).find( 'input[type=\"submit\"]' ).attr( 'disabled', 'disabled' ).addClass( 'disabled' ).val( '" . addslashes( CBTxt::T( 'Loading...' ) ) . "' );"
. "form.submit();"
. "},";
if ( $params ) {
$js .= $params . ( ( cbIsoUtf_substr( trim( $params ), -1 ) != ',' ) ? ',' : null );
}
$js .= "ignoreTitle: true,"
. "errorClass: 'gjValidationError',"
. "highlight: function( element, errorClass ) {"
. "$( element ).parent().parent().addClass( 'error');"
. "},"
. "unhighlight: function( element, errorClass ) {"
. "$( element ).parent().parent().removeClass( 'error' );"
. "},"
. "errorElement: 'div',"
. "errorPlacement: function( error, element ) {"
. "$( element ).parent().children().last().after( error );"
. "}"
. "});"
. "$.extend( jQuery.validator.messages, {"
. "required: '" . addslashes( CBTxt::T( 'This input is required.' ) ) . "',"
. "remote: '" . addslashes( CBTxt::T( 'Please fix this input.' ) ) . "',"
. "email: '" . addslashes( CBTxt::T( 'Please input a valid email address.' ) ) . "',"
. "url: '" . addslashes( CBTxt::T( 'Please input a valid URL.' ) ) . "',"
. "date: '" . addslashes( CBTxt::T( 'Please input a valid date.' ) ) . "',"
. "dateISO: '" . addslashes( CBTxt::T( 'Please input a valid date (ISO).' ) ) . "',"
. "number: '" . addslashes( CBTxt::T( 'Please input a valid number.' ) ) . "',"
. "digits: '" . addslashes( CBTxt::T( 'Please input only digits.' ) ) . "',"
. "creditcard: '" . addslashes( CBTxt::T( 'Please input a valid credit card number.' ) ) . "',"
. "equalTo: '" . addslashes( CBTxt::T( 'Please input the same value again.' ) ) . "',"
. "accept: '" . addslashes( CBTxt::T( 'Please input a value with a valid extension.' ) ) . "',"
. "maxlength: $.validator.format('" . addslashes( CBTxt::T( 'Please input no more than {0} characters.' ) ) . "'),"
. "minlength: $.validator.format('" . addslashes( CBTxt::T( 'Please input at least {0} characters.' ) ) . "'),"
. "rangelength: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value between {0} and {1} characters long.' ) ) . "'),"
. "range: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value between {0} and {1}.' ) ) . "'),"
. "max: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value less than or equal to {0}.' ) ) . "'),"
. "min: $.validator.format('" . addslashes( CBTxt::T( 'Please input a value greater than or equal to {0}.' ) ) . "')"
. "});";
$_CB_framework->outputCbJQuery( $js, 'validate' );
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:jquery_validation.php
示例4: showCategoryPanes
/**
* render frontend category panes
*
* @param cbgjCategory $row
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showCategoryPanes( $row, $user, $plugin ) {
$authorized = cbgjClass::getAuthorization( $row, null, $user );
if ( $row->get( 'published' ) == 1 ) {
$state = '<div><i class="icon-ban-circle"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'unpublish', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [category]?', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '">' . CBTxt::Ph( 'Unpublish [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>';
} else {
$state = '<div><i class="icon-ok"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Publish [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>';
}
$return = '<legend class="gjHeaderTitle">' . $row->getName() . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. $row->getLogo( true )
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforeCategoryInfo', array( $row, $user, $plugin ) )
. ( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $row->nestedCount() . '</div>' : null )
. ( $row->groupCount() ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $row->groupCount() . '</div>' : null )
. ( $row->get( 'user_id' ) ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $row->getOwnerName( true ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Types: [cat_types]', array( '[cat_types]' => implode( ', ', $row->getTypes() ) ) ) . '</div>'
. '<div>' . CBTxt::Ph( 'Access: [cat_access]', array( '[cat_access]' => $row->getAccess() ) ) . '</div>'
. ( $row->get( 'parent' ) ? '<div>' . cbgjClass::getOverride( 'category' ) . ': ' . $row->getParent()->getName( 0, true ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Created: [cat_date]', array( '[cat_date]' => cbFormatDate( $row->get( 'date' ), 1, false ) ) ) . '</div>'
. cbgjClass::getIntegrations( 'gj_onAfterCategoryInfo', array( $row, $user, $plugin ) )
. '</div>';
if ( $row->get( 'description' ) ) {
$return .= '<div class="gjGridLeftDesc span12 well well-small">'
. $row->getDescription()
. '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforeCategoryMenu', array( $row, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'cat_nested_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'cat_grp_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><i class="icon-pencil"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Edit [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'cat_message', $authorized ) && $row->groupCount() ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ? $state : null )
. ( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><i class="icon-remove"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) ) . '">' . CBTxt::Ph( 'Delete [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterCategoryMenu', array( $row, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'cat_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. ( $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $row->getParent()->getUrl() . '">' . CBTxt::Ph( 'Back to [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( ! $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '">' . CBTxt::Ph( 'Back to [overview]', array( '[overview]' => cbgjClass::getOverride( 'overview' ) ) ) . '</a></div>' : null )
. '</div>'
. '</div>';
return $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:59,代码来源:category_panes.php
示例5: showCategoryMessage
/**
* render frontend category message
*
* @param cbgjCategory $row
* @param array $input
* @param moscomprofilerUser $user
* @param object $plugin
*/
static function showCategoryMessage( $row, $input, $user, $plugin ) {
$row->setPathway( CBTxt::P( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) );
$return = '<div class="gjCategoryMessage">'
. '<form action="' . cbgjClass::getPluginURL( array( 'categories', 'send', (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
. '<legend class="gjEditTitle">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</legend>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['subject']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [groups] message subject.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
. '</span>'
. '</div>'
. '</div>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['body']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [groups] message body.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
. '</span>'
. '</div>'
. '</div>';
if ( $input['captcha'] !== false ) {
$return .= '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Captcha' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. '<div style="margin-bottom: 5px;">' . $input['captcha']['code'] . '</div>'
. '<div>' . $input['captcha']['input'] . '</div>'
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. '</span>'
. '</div>'
. '</div>';
}
$return .= '<div class="gjButtonWrapper form-actions">'
. '<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" /> '
. '<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'show', (int) $row->get( 'id' ) ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
. '</div>'
. cbGetSpoofInputTag( 'plugin' )
. '</form>'
. '</div>';
echo $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:category_message.php
示例6: showOverviewMessage
/**
* render frontend overview message
*
* @param array $input
* @param moscomprofilerUser $user
* @param object $plugin
*/
static function showOverviewMessage( $input, $user, $plugin ) {
global $_CB_framework;
$generalTitle = $plugin->params->get( 'general_title', $plugin->name );
$pageTitle = CBTxt::P( 'Message [category]', array( '[category]' => cbgjClass::getOverride( 'category', true ) ) );
$_CB_framework->setPageTitle( htmlspecialchars( $pageTitle ) );
if ( $generalTitle != '' ) {
$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( $generalTitle ) ), cbgjClass::getPluginURL() );
}
$_CB_framework->appendPathWay( htmlspecialchars( cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) ), cbgjClass::getPluginURL( array( 'overview' ) ) );
$_CB_framework->appendPathWay( htmlspecialchars( $pageTitle ), cbgjClass::getPluginURL( array( 'overview', 'message' ) ) );
$return = '<div class="gjOverviewMessage">'
. '<form action="' . cbgjClass::getPluginURL( array( 'overview', 'send' ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
. '<legend class="gjEditTitle">' . $pageTitle . '</legend>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['subject']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [categories] message subject.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) )
. '</span>'
. '</div>'
. '</div>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['body']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [categories] message body.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) )
. '</span>'
. '</div>'
. '</div>'
. '<div class="gjButtonWrapper form-actions">'
. '<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" /> '
. '<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'overview' ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
. '</div>'
. cbGetSpoofInputTag( 'plugin' )
. '</form>'
. '</div>';
echo $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:55,代码来源:overview_message.php
示例7: ShowExpert
/**
* Generates HTML for expert kunena sidebar mode
*
* @param moscomprofilerUser $user
* @param object $forum
* @param object $model
* @return mixed
*/
function ShowExpert( $user, $forum, $model, $params ) {
$html = '<div>'
. '<span class="view-username">' . $model->getFieldValue( $user, 'formatname', 'html', 'list' ) . '</span> '
. '<span class="msgusertype">(' . $user->usertype . ')</span>'
. '</div>'
. '<div>' . $model->getFieldValue( $user, 'avatar', 'html', 'list' ) . '</div>'
. '<div class="viewcover">' . $model->getFieldValue( $user, 'forumrank' ) . '</div>'
. '<div class="viewcover"><strong>' . CBTxt::T( 'Karma: ' ) . '</strong>' . $model->getFieldValue( $user, 'forumkarma' ) . '</div>'
. '<div class="viewcover"><strong>' . CBTxt::T( 'Posts: ' ) . '</strong>' . $model->getFieldValue( $user, 'forumposts' ) . '</div>'
. '<div>'
. $model->getStatusIcon( $user )
. $model->getPMIcon( $user )
. $model->getProfileIcon( $user )
. '</div>';
return $html;
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:25,代码来源:cb.simpleboardtab.sidebar.php
示例8: listUsedStrings
/**
* Lists the used translations into an HTML table for display
*
* @return string
*/
public function listUsedStrings()
{
$r = null;
if ($this->translatedStrings) {
$r = '<table class="adminlist" id="cbtranslatedstrings"><tr class="sectiontableheader"><th>' . ($this->mode == 3 ? CBTxt::Th('Untranslated strings on this page') : CBTxt::Th('Translations on this page')) . ': ' . CBTxt::Th('Keys') . '</th><th>' . CBTxt::Th('Default string') . '</th><th>' . CBTxt::Th('Translated string') . '</th></tr>';
$s = 0;
foreach ($this->translatedStrings as $k => $v) {
$columns = $this->generateHtmlColumns($k, $v);
$r .= '<tr class="sectiontableentry' . (($s & 1) + 1) . ' row' . ($s++ & 1) . '">';
foreach ($columns as $htmlColumn) {
$r .= '<td>' . $htmlColumn . '</td>';
}
$r .= '</tr>';
}
$r .= '</table>';
}
return $r;
}
开发者ID:Raul-mz,项目名称:web-erpcya,代码行数:23,代码来源:TranslationsLogger.php
示例9: showOverviewPanes
/**
* render frontend overview panes
*
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showOverviewPanes( $user, $plugin ) {
$overviewDesc = CBTxt::Th( $plugin->params->get( 'overview_desc', null ) );
$authorized = cbgjClass::getAuthorization( null, null, $user );
$categoryCount = count( cbgjData::getCategories( array( 'cat_access', 'mod_lvl1' ), array( 'parent', '=', 0 ) ) );
$return = '<legend class="gjHeaderTitle">' . cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. '<img alt="' . htmlspecialchars( CBTxt::T( 'Logo' ) ) . '" src="' . $plugin->livePath . '/images/' . $plugin->params->get( 'overview_logo', 'default_overview.png' ) . '" class="gjLogoDefault img-polaroid" />'
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforeOverviewInfo', array( $user, $plugin ) )
. ( $categoryCount ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $categoryCount . '</div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterOverviewInfo', array( $user, $plugin ) )
. '</div>';
if ( $overviewDesc ) {
if ( $plugin->params->get( 'overview_desc_content', 0 ) ) {
$overviewDesc = cbgjClass::prepareContentPlugins( $overviewDesc );
}
$return .= '<div class="gjGridLeftDesc span12 well well-small">' . $overviewDesc . '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforeOverviewMenu', array( $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'cat_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new' ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'usr_mod', $authorized ) && $categoryCount ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview', 'message' ) ) . '">' . CBTxt::Ph( 'Message [categories]', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'usr_panel', $authorized ) ? '<div><i class="icon-home"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel' ) ) . '">' . CBTxt::Ph( 'My [panel]', array( '[panel]' => cbgjClass::getOverride( 'panel' ) ) ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterOverviewMenu', array( $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'gen_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show' ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. '</div>'
. '</div>';
return $return;
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:45,代码来源:overview_panes.php
示例10: edituser
function edituser($user, $option, $newCBuser, &$postdata)
{
global $_CB_framework, $_PLUGINS;
$results = $_PLUGINS->trigger('onBeforeUserProfileEditDisplay', array(&$user, 2));
if ($_PLUGINS->is_errors()) {
echo "<script type=\"text/javascript\">alert(\"" . str_replace(array("\n", '<br />'), array('\\n', '\\n'), addslashes($_PLUGINS->getErrorMSG())) . "\"); window.history.go(-1); </script>\n";
exit;
}
_CBsecureAboveForm('edituser');
outputCbTemplate(2);
initToolTip(2);
$tabs = new cbTabs($_CB_framework->getUi() == 2 && !isset($_REQUEST['tab']) ? 1 : 0, 2);
// use cookies in backend to remember selected tab.
$tabcontent = $tabs->getEditTabs($user, $postdata);
outputCbJs(2);
global $_CB_Backend_Title;
//OLD: $_CB_Backend_Title = array( 0 => array( 'cbicon-48-users', "Community Builder User: <small>" . ( $user->id ? "Edit" . ' [ '. $user->username .' ]' : "New" ) . '</small>' ) );
//NEW:
$_CB_Backend_Title = array(0 => array('cbicon-48-users', CBTxt::T('Community Builder User') . ": <small>" . ($user->id ? CBTxt::T('Edit') . ' [ ' . $user->username . ' ]' : CBTxt::T('New')) . '</small>'));
ob_start();
if (defined('_CB_VALIDATE_NEW')) {
cbimport('cb.validator');
cbValidator::renderGenericJs();
?>
$('div.cbtoolbaractions .cbtoolbaraction').click( function() {
if ( $(this).attr('href') ) {
var taskVal = $(this).attr('href').substring(1);
} else if ( $(this).attr('value') ) {
taskVal = $(this).attr('value').substring(1);
}
$('#cbcheckedadminForm input[name=task]').val( taskVal );
if (taskVal == 'showusers') {
$('#cbcheckedadminForm')[0].submit();
} else {
$('#cbcheckedadminForm').submit();
}
return false;
} );
<?php
$cbjavascript = ob_get_contents();
ob_end_clean();
$_CB_framework->outputCbJQuery($cbjavascript, array('metadata', 'validate'));
} else {
// old way:
?>
var cbDefaultFieldbackgroundColor;
function cbFrmSubmitButton() {
var me = this.elements;
<?php
$version = checkJversion();
if ($version == 1) {
// var r = new RegExp("^[a-zA-Z](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i");
?>
var r = new RegExp("^[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]*$", "i");
<?php
} elseif ($version == -1) {
?>
var r = new RegExp("[^A-Za-z0-9]", "i");
<?php
} else {
?>
var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");
<?php
}
?>
var errorMSG = '';
var iserror=0;
if (cbDefaultFieldbackgroundColor === undefined) cbDefaultFieldbackgroundColor = ((me['username'].style.getPropertyValue) ? me['username'].style.getPropertyValue("backgroundColor") : me['username'].style.backgroundColor);
<?php
echo $tabs->fieldJS;
?>
if (me['username'].value == "") {
errorMSG += "<?php
echo str_replace(array("\n", "\r"), ' ', CBTxt::html_entity_decode(_REGWARN_UNAME));
?>
\n";
me['username'].style.backgroundColor = "red";
iserror=1;
} else if (r.exec(me['username'].value) || (me['username'].value.length < 3)) {
errorMSG += "<?php
echo str_replace(array("\n", "\r"), ' ', sprintf(CBTxt::html_entity_decode(_VALID_AZ09), CBTxt::html_entity_decode(_PROMPT_UNAME), 2));
?>
\n";
me['username'].style.backgroundColor = "red";
iserror=1;
} else if (me['username'].style.backgroundColor.slice(0,3)=="red") {
me['username'].style.backgroundColor = cbDefaultFieldbackgroundColor;
}
if ((me['password'].value != "") && (me['password'].value != me['password__verify'].value)){
errorMSG += "<?php
echo CBTxt::html_entity_decode(_REGWARN_VPASS2);
?>
\n";
me['password'].style.backgroundColor = "red"; me['password__verify'].style.backgroundColor = "red";
iserror=1;
} else {
if (me['password'].style.backgroundColor.slice(0,3)=="red") me['password'].style.backgroundColor = cbDefaultFieldbackgroundColor;
if (me['password__verify'].style.backgroundColor.slice(0,3)=="red") me['password__verify'].style.backgroundColor = cbDefaultFieldbackgroundColor;
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:view.user.php
示例11: _cbadmin_emailUsers
function _cbadmin_emailUsers( &$rows, $emailSubject, $emailBody, $limitstart, $limit, $total, $simulationMode ) {
global $_PLUGINS;
// simple spoof check security
cbSpoofCheck( 'cbadmingui' );
cbRegAntiSpamCheck();
$cbNotification = new cbNotification();
$mode = 1; // html
$usernames = '';
foreach ( $rows as $row ) {
$user = CBuser::getUserDataInstance( (int) $row->id );
$usernames .= ( $usernames ? ', ' : '' ) . htmlspecialchars( $user->username );
if ( $simulationMode ) {
$usernames .= ' (' . htmlspecialchars( CBTxt::T('email not send: simulation mode') ) . ')';
} else {
$extraStrings = array();
$_PLUGINS->trigger( 'onBeforeBackendUserEmail', array( &$user, &$emailSubject, &$emailBody, $mode, &$extraStrings, $simulationMode ) );
if ( ! $cbNotification->sendFromSystem( $user, $emailSubject, $this->_cbadmin_makeLinksAbsolute( $emailBody ), true, $mode, null, null, null, $extraStrings, false ) ) {
$usernames .= ': <span class="cb_result_error">' . htmlspecialchars( CBTxt::T('Error sending email!') ) . '</span>';
}
}
}
if ( $total < $limit ) {
$limit = $total;
}
ob_start();
$usersView = _CBloadView( 'users' );
$usersView->ajaxResults( $usernames, $emailSubject, $this->_cbadmin_makeLinksAbsolute( $emailBody ), $limitstart, $limit, $total );
$html = ob_get_contents();
ob_end_clean();
$reply = array( 'result' => 1,
'htmlcontent' => $html );
if ( ! ( $total - ( $limitstart + $limit ) > 0 ) ) {
$reply['result'] = 2;
}
echo json_encode( $reply );
sleep(3);
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:41,代码来源:controller.users.php
示例12: getAccess
public function getAccess() {
global $_CB_framework;
static $cache = array();
$id = $this->get( 'access' );
if ( ! isset( $cache[$id] ) ) {
$access = array();
if ( $id ) foreach ( explode( '|*|', $id ) as $k => $v ) {
if ( $v == -1 ) {
$access[$k] = CBTxt::T( 'Everybody' );
} elseif ( $v == -2 ) {
$access[$k] = CBTxt::T( 'All Non-Registered Users' );
} elseif ( $v == -3 ) {
$access[$k] = CBTxt::T( 'All Registered Users' );
} elseif ( $v == -4 ) {
$access[$k] = CBTxt::T( 'All Non-Moderators' );
} elseif ( $v == -5 ) {
$access[$k] = CBTxt::T( 'All Moderators' );
} else {
$access[$k] = CBTxt::T( $_CB_framework->acl->get_group_name( $v ) );
}
}
$cache[$id] = $access;
}
return $cache[$id];
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:cbgroupjiveauto.php
示例13: _cbadmin_ajaxBatch
function _cbadmin_ajaxBatch($ajaxUrl, $cssSelectorReply, $formSelector, $postArray, $delay, $limitstart = 0, $limit = 30, $textDuringExecution = null, $textWhenDone = null, $cssSelectorTitle, $titleTextWhenDone)
{
global $_CB_framework;
$ajaxUrl = addslashes($ajaxUrl);
$cbSpoofField = cbSpoofField();
$cbSpoofString = cbSpoofString(null, 'cbadmingui');
$regAntiSpamFieldName = cbGetRegAntiSpamFieldName();
$regAntiSpamValues = cbGetRegAntiSpams();
cbGetRegAntiSpamInputTag($regAntiSpamValues);
// sets the cookie
$regAntiSpZ = $regAntiSpamValues[0];
$postString = '';
foreach ($postArray as $k => $v) {
if (is_array($v)) {
foreach ($v as $vv) {
$postString .= '&' . urlencode($k) . '[]=' . urlencode($vv);
}
} else {
$postString .= '&' . urlencode($k) . '=' . urlencode($v);
}
}
$postString = addslashes($postString);
//$errorText = addslashes( $errorText );
$textWaiting = addslashes(CBTxt::T('Waiting delay for next batch...'));
$textExecuting = addslashes($textDuringExecution ? $textDuringExecution : CBTxt::T('Executing'));
$textFinished = addslashes($textWhenDone ? $textWhenDone : CBTxt::T('Done'));
$textError = addslashes(CBTxt::T('ERROR!'));
$titleTextWhenDone = addslashes($titleTextWhenDone);
$_CB_framework->outputCbJQuery(<<<EOT
\t{
\t\tvar cbanimate = function() {
\t\t\t\$(this).animate({width:'100%'},20000,function(){
\t\t\t\t\$(this).animate({width:'0%'},1000,cbanimate);
\t\t\t});
\t\t};
\t\tvar cbajaxjsonbatch = function(limitstart,limit,successFnct){
\t\t\t\$.ajax( {\ttype: 'POST',
\t\t\t\t\t\turl: '{$ajaxUrl}',
\t\t\t\t\t\tdata: \$('{$formSelector}').serialize() + '&{$cbSpoofField}=' + encodeURIComponent('{$cbSpoofString}') + '&{$regAntiSpamFieldName}=' + encodeURIComponent('{$regAntiSpZ}') + '{$postString}' + '&limitstart=' + limitstart,
\t\t\t\t\t\tsuccess: function(response) {
\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar div').stop().animate( {width:'100%'},500).animate( {width:'0%'},200, function() { \$(this).css({"background-color":"#8f8"}) });
\t\t\t\t\t\t\t\$('{$cssSelectorReply}').fadeOut(400, function() {
\t\t\t\t\t\t\t\t\$(this).html(response.htmlcontent).fadeIn(400, function() {
\t\t\t\t\t\t\t\t\tif ( response.result == 1 ) {
\t\t\t\t\t\t\t\t\t\$(this).each( function() {
\t\t\t\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textWaiting}')
\t\t\t\t\t\t\t\t\t\t.siblings('div').animate( {width:'100%'},{$delay}*1000,'linear', function() {
\t\t\t\t\t\t\t\t\t\t\t\$(this).animate( {width:'0%'},200, function() {
\t\t\t\t\t\t\t\t\t\t\t\tcbajaxjsonbatch(limitstart+limit,limit,successFnct);
\t\t\t\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t\t\t} else if ( response.result == 2 ) {
\t\t\t\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textFinished}');
\t\t\t\t\t\t\t\t\t\tif (successFnct) {
\t\t\t\t\t\t\t\t\t\t\tsuccessFnct.call(response);
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textError}')
\t\t\t\t\t\t\t\t\t\t.siblings('div').css({"background-color":"#fcc"});
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t})
\t\t\t\t\t\t},
\t\t\t\t\t\terror: function (XMLHttpRequest, textStatus, errorThrown) {
\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar div').stop().animate( {width:'100%'},500).css({"background-color":"#f87"});
\t\t\t\t\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textError}');
\t\t\t\t\t\t\t\$('{$cssSelectorReply}').hide().html( ( errorThrown ? errorThrown : textStatus ? textStatus : 'No additional message' ).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">") ).fadeIn('fast');
\t\t\t\t\t\t},
\t\t\t\t\t\tdataType: 'json'
\t\t\t});
\t\t\t\$('{$cssSelectorReply}'+'Bar span').html('{$textExecuting}')
\t\t\t.siblings('div').css({"background-color":"#ee8"}).each(cbanimate);
\t\t};
\t\t
\t\tvar cbTitleSetDone = function() {
\t\t\t\$('{$cssSelectorTitle}').html('{$titleTextWhenDone}');
\t\t};
\t\t\tcbajaxjsonbatch({$limitstart},{$limit},cbTitleSetDone);
\t}
EOT
);
}
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:83,代码来源:view.users.php
|
请发表评论