'canAddAllContent' => array( 'action', 'add', 'users', null, 'content', 'all' ), 'canEditAllContent' => array( 'action', 'edit', 'users', null, 'content', 'all' ), 'canPublishContent' => array( 'action', 'publish', 'users', null, 'content', 'all' ), 'canInstallPlugins' => array( 'administration', 'install', 'users', null, 'components', 'all' ), 'canManageUsers' => array( 'administration', 'manage', 'users', null, 'components', 'com_users' ) ); break; } /** * CB framework * @global CBframework $_CB_framework */ global $_CB_framework; $optionOfCb = 'com_comprofiler'; // cbGetParam( $_REQUEST, 'option', 'com_comprofiler' ) $_CB_framework = new CBframework( $mainframe, $tmpDatabase, $acl, $aclParams, $sefFunc, $sefFuncHtmlEnt, $cmsUser, $cmsUserNeedsDb, $cmsRedirectFunc, $my->id, $my->username, $my->usertype, $myAid, $myLanguage, $myLanguageTag, array( 'option' => $optionOfCb ), $getVarFunction, $getDocFunction, $outputCharst, $editorDisplay ); cbimport( 'cb.acl' ); $_CB_framework->acl = new CBACL( $acl ); if ( checkJversion() == 2 ) { $_CB_framework->_myCmsGid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( array_values( (array) $my->groups ) ); } /** * CB text languages EXPERIMENTAL * @access private * @global CBText $_CB_framework */ global $_CB_TxtIntStore; $_CB_TxtIntStore = new CBTxtStorage( $_CB_framework->outputCharset(), ( isset( $ueConfig['translations_debug'] ) ? (int) $ueConfig['translations_debug'] : 0 ) );
static function pendingApprovalUsers($option, $users) { global $ueConfig; $Itemid = CBframework::framework()->itemid(); ?> <div class="componentheading"><?php echo _UE_MODERATE_TITLE; ?> </div> <br /> <?php if (count($users) < 1) { echo _UE_NOUSERSPENDING; return; } ?> <br /> <div class='contentheading'><?php echo _UE_USERAPPROVAL_MODERATE; ?> </div><br /> <form action='<?php echo cbSef("index.php?option={$option}" . ($Itemid ? "&Itemid=" . (int) $Itemid : "")); ?> ' method='post' id='adminForm' name='adminForm'> <table width='100%' border='0' cellpadding='4' cellspacing='2'> <thead><tr align='left'> <th> </th> <th><?php echo _UE_USER; ?> </th> <th><?php echo _UE_EMAIL; ?> </th> <th><?php echo _UE_REGISTERDATE; ?> </th> <th><?php echo _UE_COMMENT; ?> </th> </tr></thead> <?php for ($i = 0; $i < count($users); $i++) { echo "<tr align='left' valign='middle'>"; echo "<td><input id='u" . $users[$i]->id . "' type=\"checkbox\" checked=\"checked\" name=\"uids[]\" value=\"" . $users[$i]->id . "\" /></td>"; echo "<td><a href='" . cbSef("index.php?option=com_comprofiler&task=userProfile&user="******"&Itemid=" . (int) $Itemid : "")) . "'>" . getNameFormat($users[$i]->name, $users[$i]->username, $ueConfig['name_format']) . "</a></td>"; echo "<td>" . $users[$i]->email . "</td>"; echo "<td>" . cbFormatDate($users[$i]->registerDate) . "</td>"; echo "<td><textarea name='comment" . $users[$i]->id . "' cols='20' rows='3'></textarea></td>"; echo "</tr>"; } echo '<tr align="center" valign="middle"><td colspan="5">' . '<input class="button" style="background-color:#CFC;" onclick="this.form.task.value=\'approveUser\';this.form.submit();" type="button" value="' . _UE_APPROVE . '" />' . ' ' . '<input class="button" style="background-color:#FCC;" onclick="this.form.task.value=\'rejectUser\';this.form.submit();" type="button" value="' . _UE_REJECT . '" /></td></tr>'; echo "</table>\n"; echo "<input type='hidden' name='task' value='' />\n"; echo "<input type='hidden' name='option' value='" . $option . "' />\n"; echo cbGetSpoofInputTag('pendingApprovalUsers'); echo "</form>\n"; }