function emailUsers(&$rows, &$total, $search, $option, &$lists, $cid, $inputTextExtras, $searchTabContent, $emailSubject, $emailBody, $emailsPerBatch, $emailPause, $simulationMode, $pluginRows) { global $_CB_framework; _CBsecureAboveForm('showUsers'); outputCbTemplate(2); outputCbJs(2); global $_CB_Backend_Title; $_CB_Backend_Title = array(0 => array('cbicon-48-massmail', CBTxt::T('CB Email Users'))); ob_start(); 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 != 'startemailusers') { $('#cbcheckedadminForm')[0].submit(); } else { $('#cbcheckedadminForm').submit(); } return false; } ); <?php $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->outputCbJQuery($cbjavascript, array('metadata', 'validate')); // Save code for HTML editor: $jsSaveCode = $_CB_framework->saveCmsEditorJS('emailbody'); if ($jsSaveCode) { $js = "\$('#" . 'emailbody' . "').parent('form').submit( function() { " . $jsSaveCode . " } );"; $_CB_framework->outputCbJQuery($js); } ?> <form action="<?php echo $_CB_framework->backendUrl('index.php'); ?> " method="post" name="adminForm" id="cbcheckedadminForm" class="cb_form"> <?php $this->_userslistFilters($search, $lists, $inputTextExtras, $searchTabContent, true); ?> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <thead> <tr> <th colspan="2" width="100%" class="title"><?php echo CBTxt::Th('CB Email Users'); ?> </th> </tr> </thead> <tbody> <tr> <td width="15%" class="captionCell"><?php echo sprintf(CBTxt::Th('Send Email to %s users'), (int) $total); ?> :</td> <td width="85%" class="fieldCell"> <?php $displayMax = 100; $i = $displayMax; $usermails = array(); foreach ($rows as $row) { $usermails[] = htmlspecialchars($row->name) . ' <' . htmlspecialchars($row->email) . '>'; if (--$i == 0) { if (count($rows) > $displayMax) { $usermails[] = '<strong>' . sprintf(CBTxt::Th('and %s more users.'), (int) ($total - $displayMax)) . '</strong>'; } break; } } echo implode(', ', $usermails); unset($usermails); ?> <br /><br /> </td> </tr> <tr> <td class="captionCell"><?php echo CBTxt::Th('Simulation mode'); ?> :</td> <td class="fieldCell"> <input type="checkbox" name="simulationmode" id="simulationmode"<?php if ($simulationMode) { echo ' checked="checked"'; } ?> " /> <label for="simulationmode"><?php echo CBTxt::Th('Do not send emails, just show me how it works'); ?> </label> </td> </tr> <tr> <td class="captionCell"><?php echo CBTxt::Th('Email Subject'); ?> :</td> <td class="fieldCell"> <input type="text" name="emailsubject" value="<?php echo htmlspecialchars($emailSubject); ?> " class="inputbox required" size="60" /> </td> </tr> <tr> <td class="captionCell"><?php echo CBTxt::Th('Email Message'); ?> :</td> <td class="fieldCell"> <?php echo $_CB_framework->displayCmsEditor('emailbody', $emailBody, 600, 200, 50, 7); ?> </td> </tr> <tr> <td class="captionCell"><?php echo CBTxt::Th('CB substitutions for subject and message'); ?> :</td> <td class="fieldCell"> <?php echo CBTxt::Th('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]'); ?> </td> </tr> <?php $this->_pluginRows($pluginRows); ?> <tr> <td class="captionCell"><?php echo CBTxt::Th('Emails per batch'); ?> :</td> <td class="fieldCell"> <input type="text" name="emailsperbatch" value="<?php echo htmlspecialchars($emailsPerBatch); ?> " class="inputbox required digits" size="12" /> </td> </tr> <tr> <td class="captionCell"><?php echo CBTxt::Th('Seconds of pause between batches'); ?> :</td> <td class="fieldCell"> <input type="text" name="emailpause" value="<?php echo htmlspecialchars($emailPause); ?> " class="inputbox required digits" size="12" /> </td> </tr> </tbody> <tfoot> <tr> <th align="center" colspan="2"></th> </tr> </tfoot> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="emailusers" /> <input type="hidden" name="boxchecked" value="0" /> <?php if (is_array($cid) && count($cid)) { foreach ($cid as $uid) { echo '<input type="hidden" name="cid[]" value="' . (int) $uid . '">'; } } echo cbGetSpoofInputTag('user'); ?> </form> <?php }
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; } if (!$('input[name^=\"gid\"],select[name^=\"gid\"]').val()) { errorMSG += '<?php echo addslashes(CBTxt::T('You must assign user to a group.')); ?> ' + "\n"; iserror=1; } // loop through all input elements in form var fieldErrorMessages = new Array; for (var i=0; i < me.length; i++) { // check if element is mandatory; here mosReq=1 if ( (typeof(me[i].getAttribute('mosReq')) != "undefined") && ( me[i].getAttribute('mosReq') == 1) ) { if (me[i].type == 'radio' || me[i].type == 'checkbox') { var rOptions = me[me[i].getAttribute('name')]; var rChecked = 0; if(rOptions.length > 1) { for (var r=0; r < rOptions.length; r++) { if ( (typeof(rOptions[r].getAttribute('mosReq')) != "undefined") && ( rOptions[r].getAttribute('mosReq') == 1) ) { if (rOptions[r].checked) { rChecked=1; } } } } else { if (me[i].checked) { rChecked=1; } } if(rChecked==0) { for (var k=0; k < me.length; k++) { if (me[i].getAttribute('name') == me[k].getAttribute('name')) { if (me[k].checked) { rChecked=1; break; } } } } if(rChecked==0) { var alreadyFlagged = false; for (var j = 0, n = fieldErrorMessages.length; j < n; j++) { if (fieldErrorMessages[j] == me[i].getAttribute('name')) { 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 }
static function registerForm($option, $emailpass, &$user, &$postvars, $regErrorMSG = null, $stillDisplayLoginModule = false) { global $_CB_framework, $_CB_database, $ueConfig, $_PLUGINS; $results = $_PLUGINS->trigger('onBeforeRegisterFormDisplay', array(&$user, $regErrorMSG)); if ($_PLUGINS->is_errors()) { echo "<script type=\"text/javascript\">alert(\"" . $_PLUGINS->getErrorMSG() . "\"); window.history.go(-1); </script>\n"; exit; } $cbTemplate = HTML_comprofiler::_cbTemplateLoad(); outputCbTemplate(1); outputCbJs(1); initToolTip(1); $output = 'htmledit'; $formatting = isset($ueConfig['use_divs']) && $ueConfig['use_divs'] ? 'divs' : 'tabletrs'; // gets registration tabs from plugins (including the contacts tab core plugin for username, password, etc: $tabs = new cbTabs(0, 1, null, false); // do not output unused JS code in registration page (IE7 and Safari bugs on that) //$tabcontent = $tabs->getEditTabs( $user, $postvars, $output, 'tabletrs', 'register', false ); $tabcontent = $tabs->getEditTabs($user, $postvars, $output, $formatting, 'register', false); // outputs the site terms and conditions link and approval checkbox: Not yet a CB field //TBD if ($ueConfig['reg_enable_toc']) { global $_CB_OneTwoRowsStyleToggle; $class = 'sectiontableentry' . $_CB_OneTwoRowsStyleToggle; $_CB_OneTwoRowsStyleToggle = $_CB_OneTwoRowsStyleToggle == 1 ? 2 : 1; if ($formatting == 'divs') { $tabcontent .= "\t<div class=\"" . $class . " cb_form_line cbclearboth\" id=\"cbfr_termsc\">\n" . '<div class="cb_field"><div id="cbfv_termsc">'; } else { $tabcontent .= "\t<tr class=\"" . $class . "\" id=\"cbfr_termsc\">\n" . "\t\t<td> </td>\n<td class='fieldCell'>"; } $tabcontent .= "<div class=\"cbSnglCtrlLbl\"><input type='checkbox' name='acceptedterms' id='acceptedterms' class='required' value='1' mosReq='0' mosLabel='" . htmlspecialchars(_UE_TOC) . "' /> <label for='acceptedterms'>" . sprintf(_UE_TOC_LINK, "<a href='" . cbSef(htmlspecialchars($ueConfig['reg_toc_url'])) . "' target='_BLANK'> ", "</a>") . '</label>' . getFieldIcons($_CB_framework->getUi(), 1, null, null, null) . "</div>"; if ($formatting == 'divs') { $tabcontent .= "</div></div></div>\n"; } else { $tabcontent .= "</td>\n" . "\t</tr>\n"; } } $_CB_framework->setPageTitle(_UE_REGISTRATION); $_CB_framework->appendPathWay(_UE_REGISTRATION); // starts outputing: // $cbSpoofField = cbSpoofField(); $cbSpoofString = cbSpoofString(null, 'registerForm'); // $regAntiSpamFieldName = cbGetRegAntiSpamFieldName(); $regAntiSpamValues = cbGetRegAntiSpams(); // <script type="text/javascript" src="includes/js/mambojavascript.js"></script> ob_start(); if (defined('_CB_VALIDATE_NEW')) { cbimport('cb.validator'); cbValidator::renderGenericJs(); $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->outputCbJQuery($cbjavascript, array('metadata', 'validate')); } else { // old way: ?> var cbDefaultFieldBackground; 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 (cbDefaultFieldBackground === undefined && typeof(me['username'])!='undefined') cbDefaultFieldBackground = ((me['username'].style.getPropertyValue) ? me['username'].style.getPropertyValue("backgroundColor") : me['username'].style.backgroundColor); <?php echo $tabs->fieldJS; ?> if (typeof(me['username'])!='undefined' && me['username'].value == "") { errorMSG += "<?php echo CBTxt::html_entity_decode(_REGWARN_UNAME); ?> \n"; me['username'].style.backgroundColor = "red"; iserror=1; } else if (typeof(me['username'])!='undefined' && ( r.exec(me['username'].value) || (me['username'].value.length < 3))) { errorMSG += "<?php printf(CBTxt::html_entity_decode(_VALID_AZ09), CBTxt::html_entity_decode(_PROMPT_UNAME), 2); ?> \n"; me['username'].style.backgroundColor = "red"; iserror=1; } else if (typeof(me['username'])!='undefined' && me['username'].style.backgroundColor.slice(0,3)=="red") { me['username'].style.backgroundColor = cbDefaultFieldBackground; <?php if ($emailpass != "1") { ?> } if (typeof(me['password'])!='undefined' && me['password'].value.length < 6) { errorMSG += "<?php printf(CBTxt::html_entity_decode(_VALID_AZ09), CBTxt::html_entity_decode(_REGISTER_PASS), 6); ?> \n"; me['password'].style.backgroundColor = "red"; iserror=1; } else if (typeof(me['password'])!='undefined' && (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 (typeof(me['password'])!='undefined') { if (me['password'].style.backgroundColor.slice(0,3)=="red") me['password'].style.backgroundColor = cbDefaultFieldBackground; if (me['password__verify'].style.backgroundColor.slice(0,3)=="red") me['password__verify'].style.backgroundColor = cbDefaultFieldBackground; <?php } ?> } <?php if ($ueConfig['reg_enable_toc']) { ?> if(!me['acceptedterms'].checked) { errorMSG += "<?php echo CBTxt::html_entity_decode(_UE_TOC_REQUIRED); ?> \n"; iserror=1; } <?php } ?> // loop through all input elements in form var fieldErrorMessages = new Array; for (var i=0; i < me.length; i++) { // check if element is mandatory; here mosReq="1" var myenabled = (typeof(me[i].getAttribute('mosNoReq')) == 'undefined' ) || (me[i].getAttribute('mosNoReq') != 1); var mytyp = me[i].getAttribute('type'); var myact = myenabled && mytyp != 'reset' && mytyp != 'button' && mytyp != 'submit' && mytyp != 'image'; if ( myact && (typeof(me[i].getAttribute('mosReq')) != "undefined") && ( me[i].getAttribute('mosReq') == 1) ) { if (me[i].type == 'radio' || me[i].type == 'checkbox') { var rOptions = me[me[i].getAttribute('name')]; var rChecked = 0; if(rOptions.length > 1) { for (var r=0; r < rOptions.length; r++) { if ( (typeof(rOptions[r].getAttribute('mosReq')) != "undefined") && ( rOptions[r].getAttribute('mosReq') == 1) ) { if (rOptions[r].checked) { rChecked=1; } } } } else { if (me[i].checked) { rChecked=1; } } if (rChecked==0) { for (var k=0; k < me.length; k++) { if (me[i].getAttribute('name') == me[k].getAttribute('name')) { if (me[k].checked) { rChecked=1; break; } } } } if (rChecked==0) { var alreadyFlagged = false; for (var j = 0, n = fieldErrorMessages.length; j < n; j++) { if (fieldErrorMessages[j] == me[i].getAttribute('name')) { 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 = cbDefaultFieldBackground; } 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 = cbDefaultFieldBackground; } } if(iserror==1) { alert(errorMSG); return false; } else { return true; } } $('#cbcheckedadminForm').submit( cbFrmSubmitButton ); <?php $cbjavascript = ob_get_contents(); ob_end_clean(); $_CB_framework->outputCbJQuery($cbjavascript); // end of old } if ($regErrorMSG) { echo "<div class='error'>" . $regErrorMSG . "</div>\n"; } // output results of plugins event "onBeforeRegisterFormDisplay": if (is_array($results)) { echo implode('', $results); } $introMessage = isset($ueConfig['reg_intro_msg']) ? stripslashes(getLangDefinition($ueConfig['reg_intro_msg'])) : null; $conclusionMessage = isset($ueConfig['reg_conclusion_msg']) ? stripslashes(getLangDefinition($ueConfig['reg_conclusion_msg'])) : null; $https_post = checkCBPostIsHTTPS(true); $urlRegister = cbSef("index.php?option=" . $option); if ($https_post) { if (substr($urlRegister, 0, 5) != 'http:' && substr($urlRegister, 0, 6) != 'https:') { $urlRegister = $_CB_framework->getCfg('live_site') . '/' . $urlRegister; } $urlRegister = str_replace('http://', 'https://', $urlRegister); } $regFormTag = '<form action="' . $urlRegister . '" method="post" id="cbcheckedadminForm" name="adminForm" class="cb_form" enctype="multipart/form-data"> <input type="hidden" name="id" value="0" /> <input type="hidden" name="gid" value="0" /> <input type="hidden" name="emailpass" value="' . $emailpass . '" /> <input type="hidden" name="option" value="' . $option . '" /> <input type="hidden" name="task" value="saveregisters" /> ' . cbGetSpoofInputTag(null, $cbSpoofString) . ' ' . cbGetRegAntiSpamInputTag($regAntiSpamValues) . "\n"; $topIcons = null; $bottomIcons = null; if (!isset($ueConfig['reg_show_icons_explain']) || $ueConfig['reg_show_icons_explain'] > 0) { $icons = getFieldIcons(1, true, true, '', '', true); if (in_array($ueConfig['reg_show_icons_explain'], array(1, 3))) { $topIcons = $icons; } if (in_array($ueConfig['reg_show_icons_explain'], array(2, 3))) { $bottomIcons = $icons; } } $moduleContent = null; if (isset($ueConfig['reg_show_login_on_page']) && $ueConfig['reg_show_login_on_page'] == 1 && ($stillDisplayLoginModule || !$regErrorMSG)) { $params = null; $login_module_file = $_CB_framework->getCfg('absolute_path') . '/modules/' . (checkJversion() > 0 ? 'mod_cblogin/' : '') . 'mod_cblogin.php'; if (file_exists($login_module_file)) { define('_UE_LOGIN_FROM', 'regform'); $_CB_database->setQuery("SELECT params from #__modules WHERE module = 'mod_cblogin' ORDER BY ordering", 0, 1); $raw_params = $_CB_database->loadResult(); $params = new cbParamsBase($raw_params); // needed for login module // $params of login module is needed for the include( $login_module_file ) below !! ob_start(); include $login_module_file; $moduleContent = ob_get_contents(); ob_end_clean(); } } // renders using template viewer: echo HTML_comprofiler::_cbTemplateRender($cbTemplate, $user, 'RegisterForm', 'drawProfile', array(&$user, $tabcontent, $regFormTag, $introMessage, _LOGIN_REGISTER_TITLE, _REGISTER_TITLE, _UE_REGISTER, $moduleContent, $topIcons, $bottomIcons, $conclusionMessage, $formatting), $output); // finally small javascript to focus on first field on registration form if there is no introduction text and it's a text field: if (!(isset($ueConfig['reg_intro_msg']) && $ueConfig['reg_intro_msg'] || isset($ueConfig['reg_show_login_on_page']) && $ueConfig['reg_show_login_on_page'] == 1 || $regErrorMSG)) { $_CB_framework->outputCbJQuery('$("#cbcheckedadminForm input[type!=\'hidden\']:first").filter("[type=\'text\'],textarea,[type=\'password\']").focus();'); } }