/**/ echo "{\n"; ?> var cbDefaultFieldBackground; function cbFrmChksubmitbutton() { var me = this.elements; var errorMSG = ''; var iserror=0; // loop through all input elements in form 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 (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) { // add up all error messages errorMSG += me[i].getAttribute('mosLabel') + ' : \n'; // notify user by changing background color, in this case to red if (cbDefaultFieldBackground === undefined) cbDefaultFieldBackground = ((me[i].style.getPropertyValue) ? me[i].style.getPropertyValue("backgroundColor") : me[i].style.backgroundColor); 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') + ' : \n'; // notify user by changing background color, in this case to red if (cbDefaultFieldBackground === undefined) cbDefaultFieldBackground = ((me[i].style.getPropertyValue) ? me[i].style.getPropertyValue("backgroundColor") : me[i].style.backgroundColor); me[i].style.backgroundColor = "red"; iserror=1; } else if ((me[i].getAttribute('mosLength')) && (me[i].value.length > me[i].getAttribute('mosLength'))) { errorMSG += me[i].getAttribute('mosLabel') + " " + (me[i].value.length - me[i].getAttribute('mosLength')) + " \n"; // notify user by changing background color, in this case to red if (cbDefaultFieldBackground === undefined) cbDefaultFieldBackground = ((me[i].style.getPropertyValue) ? me[i].style.getPropertyValue("backgroundColor") : me[i].style.backgroundColor); 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; } } outputCbJQuery( $cbjavascript ); } // end of php method HTML_comprofiler::outputMosFormVal() function emailUser( $option, $rowFrom, $rowTo, $subject = '', $message = '' ) { global $ueConfig, $_PLUGINS; if($rowFrom->id == $rowTo->id) { echo "
"._UE_NOSELFEMAIL."
"; return; } HTML_comprofiler::outputMosFormVal( '#adminForm' ); $_PLUGINS->loadPluginGroup('user'); $results = $_PLUGINS->trigger( 'onBeforeEmailUserForm', array( &$rowFrom, &$rowTo, 1 )); //$ui=1 if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } ?>
id )."\">".getNameFormat($rowTo->name,$rowTo->username,$ueConfig['name_format']).""); ?>
" method="post" id="adminForm" name="adminForm">

", $results ); } ?>


'; $warning = _UE_EMAILFORMWARNING; $results = $_PLUGINS->trigger( 'onAfterEmailUserForm', array( &$rowFrom, &$rowTo, &$warning, 1 )); //$ui=1 if (is_array($results)) { echo implode( "
", $results ); } ?>
email ); ?>
trigger( 'onBeforeUserProfileEditDisplay', array( &$user, 1 ) ); if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } $output = 'htmledit'; outputCbTemplate( 1 ); initToolTip(1); $title = cbSetTitlePath( $user, _UE_EDIT_TITLE, _UE_EDIT_OTHER_USER_TITLE ); $tabs = new cbTabs( 0, 1 ); $tabcontent = $tabs->getEditTabs( $user, null, $output ); $bottomIcons = getFieldIcons( 1, true, true, '', '', true ); ob_start(); ?> var cbDefaultFieldBackground; function cbFrmSubmitButton() { var me = this.elements; var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&]", "i"); var r = new RegExp("[^A-Za-z0-9]", "i"); var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i"); var errorMSG = ''; var iserror=0; if (cbDefaultFieldBackground === undefined) cbDefaultFieldBackground = ((me['username'].style.getPropertyValue) ? me['username'].style.getPropertyValue("backgroundColor") : me['username'].style.backgroundColor); fieldJS; ?> if (me['username'].value == "") { errorMSG += "\n"; me['username'].style.backgroundColor = "red"; iserror=1; } else if (r.exec(me['username'].value) || (me['username'].value.length < 3)) { errorMSG += "\n"; me['username'].style.backgroundColor = "red"; iserror=1; } else if (me['username'].style.backgroundColor.slice(0,3)=="red") { me['username'].style.backgroundColor = cbDefaultFieldBackground; } if ((me['password'].value) && (me['password'].value.length < 6)) { errorMSG += "\n"; me['password'].style.backgroundColor = "red"; iserror=1; } else if ((me['password'].value != "") && (me['password'].value != me['password__verify'].value)){ errorMSG += "\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 = cbDefaultFieldBackground; if (me['password__verify'].style.backgroundColor.slice(0,3)=="red") me['password__verify'].style.backgroundColor = cbDefaultFieldBackground; } // loop through all input elements in form var fieldErrorMessages = new Array; for (var i=0; i < me.length; i++) { // check if element is active input and 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') + ' : \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') + ' : \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 ); $('#cbbtncancel').click( function() { window.location='id == $_CB_framework->myId() ) ? '' : ( '&user=' . $user->id ) ) . getCBprofileItemid( true ) ); ?>'; return false; } ); outputCbJQuery( $cbjavascript ); if ( is_array( $results ) ) { echo implode( '', $results ); } ?>
" method="post" id="cbcheckedadminForm" name="adminForm" enctype="multipart/form-data" autocomplete="off"> ".$regErrorMSG."
\n"; } if ( $user->id != $_CB_framework->myId() ) { echo "
" . sprintf( _UE_WARNING_EDIT_OTHER_USER_PROFILE, getNameFormat( $user->name, $user->username, $ueConfig['name_format'] ) ) . "
\n"; } echo HTML_comprofiler::_cbTemplateRender( $user, 'Profile', 'drawEditProfile', array( &$user, $tabcontent, $submitvalue, _UE_CANCEL, $bottomIcons ), $output ); ?>
outputCbJQuery( "showCBTab('" . addslashes( $tab ) . "');" ); } $_PLUGINS->trigger( 'onAfterUserProfileEditDisplay', array( $user, $tabcontent ) ); } function userProfile($user, $option, $submitvalue) { global $_CB_framework, $ueConfig,$_POST,$_PLUGINS; $_PLUGINS->loadPluginGroup('user'); $results = $_PLUGINS->trigger( 'onBeforeUserProfileRequest', array(&$user,1)); if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } $cbMyIsModerator = isModerator( $_CB_framework->myId() ); $cbUserIsModerator = isModerator($user->id); $showProfile=1; if ( ( $user->banned != 0 ) || ( ( $user->block == 1 ) && $user->confirmed && $user->approved ) ) { echo ""; if ($user->banned != 0 ) { if ( $_CB_framework->myId() != $user->id ) { echo _UE_USERPROFILEBANNED; } else { echo _UE_BANNED_CHANGE_PROFILE; } } if ( ( $user->block == 1 ) && $user->confirmed && $user->approved ) { echo _UE_USERPROFILEBLOCKED; } if ( ( $_CB_framework->myId() != $user->id ) && ( $cbMyIsModerator != 1 ) ) { $showProfile=0; } else { if ($user->block == 1) { echo ": "._UE_LOGIN_BLOCKED; } if ($user->banned != 0) { echo "
".nl2br($user->bannedreason); } } echo "
"; } if ( ! $user->confirmed ) { echo ""._UE_USER_NOT_CONFIRMED."
"; } if ( ! $user->approved ) { echo ""._UE_USER_NOT_APPROVED."
"; } if ( ( ! $user->confirmed || ! $user->approved) && $cbMyIsModerator != 1 ) { $showProfile = 0; } if ( $showProfile == 1 ) { $results = $_PLUGINS->trigger( 'onBeforeUserProfileDisplay', array( &$user, 1, $cbUserIsModerator, $cbMyIsModerator ) ); if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } $output = 'html'; $cbUser =& CBuser::getInstance( $user->id ); $_CB_framework->displayedUser( (int) $user->id ); $userViewTabs = $cbUser->getProfileView(); /* $tabs = new cbTabs( 0, 1 ); $userViewTabs = $tabs->getViewTabs($user); // this loads, registers menu and user status and renders the tabs */ $_CB_framework->setPageTitle( unHtmlspecialchars(getNameFormat($user->name,$user->username,$ueConfig['name_format']))); $_CB_framework->appendPathWay( getNameFormat($user->name,$user->username,$ueConfig['name_format'])); outputCbTemplate(1); initToolTip(1); $_CB_framework->document->addHeadScriptDeclaration( ' function cbConnSubmReq() { cClick(); document.connOverForm.submit(); } function confirmSubmit() { if (confirm("' . _UE_CONFIRMREMOVECONNECTION . '")) return true ; else return false ; } ' ); if ( is_array( $results ) ) { echo implode( '', $results ); } echo "\n\t
"; echo HTML_comprofiler::_cbTemplateRender( $user, 'Profile', 'drawProfile', array( &$user, &$userViewTabs ), $output ); echo "
\n" . "
"; // end of cbProfile floating div $tab = null; if ( isset( $_GET['tab'] ) ) { $tab = urldecode( stripslashes( cbGetParam( $_GET, 'tab', '' ) ) ); } elseif ( isset( $_POST['tab'] ) ) { $tab = stripslashes( cbGetParam( $_POST, 'tab', '' ) ); } if ($tab) { $_CB_framework->outputCbJQuery( "showCBTab('" . addslashes( $tab ) . "');" ); } if ( $_CB_framework->myId() != $user->id ) { recordViewHit( $_CB_framework->myId(), $user->id, getenv( 'REMOTE_ADDR' ) ); } $_PLUGINS->trigger( 'onAfterUserProfileDisplay', array($user,true)); } } /** * Invokes CB template rendering engine... * * @param moscomprofilerUser $user * @param string $view * @param string $method * @param array $paramsArray * @param string $output 'html' * @return string */ function _cbTemplateRender( &$user, $view, $method, $paramsArray, $output = 'html' ) { global $_PLUGINS; static $loaded = array(); $element = selectTemplate( 'dir' ); $templatePhpFile = selectTemplate( 'absolute_path' ) . '/' . $element . '.php'; if ( ! is_readable( $templatePhpFile ) ) { $element = 'default'; } if ( ! isset( $loaded[$element] ) ) { $_PLUGINS->loadPluginGroup( 'templates', $element ); $loaded[$element] = true; } if ( ( $output == 'html' ) || ( $output == 'htmledit' ) ) { return '
' . $_PLUGINS->callTemplate( $element, $view, $method, $paramsArray, $output ) . '
'; } else { return $_PLUGINS->callTemplate( $element, $view, $method, $paramsArray, $output ); } } function userAvatar( &$row, $option, $submitvalue ) { global $_CB_framework, $_REQUEST, $ueConfig, $_FILES; outputCbTemplate(1); $title = cbSetTitlePath( $row, _UE_UPDATEAVATAR, _UE_EDIT_OTHER_USER_TITLE ); ?>

"._UE_UPLOAD_SUBMIT.""; echo sprintf( _UE_UPLOAD_DIMENSIONS_AVATAR, $ueConfig['avatarWidth'], $ueConfig['avatarHeight'], $ueConfig['avatarSize'] ); echo "\n
"; echo "\n\t"; if ( $_CB_framework->myId() != $row->id ) { echo "\n\t"; } echo "\n\t"; echo "\n\t\t\n\t\t\t\n\t\t"; echo "\n\t\t\n\t\t\t\n\t\t"; echo "
"; //echo " "; echo _UE_UPLOAD_SELECT_FILE." "; echo " "; echo "
"; echo ( $ueConfig['reg_enable_toc'] ? sprintf( _UE_AVATAR_UPLOAD_DISCLAIMER_TERMS, " " . _UE_AVATAR_TOC_LINK . "" ) : _UE_AVATAR_UPLOAD_DISCLAIMER ); echo "


"; echo "\n"; echo cbGetSpoofInputTag( 'userAvatar' ); echo "
"; } if($ueConfig['allowAvatarGallery']){ echo "\n
"._UE_UPLOAD_GALLERY."
"; echo "\n
"; echo "\n\t"; if ( $_CB_framework->myId() != $row->id ) { echo "\n\t"; } echo "\n\t"; echo "\n\t\t"; echo ''; echo "\n\t\t"; $live_site = $_CB_framework->getCfg( 'live_site' ); $avatar_gallery_path = $_CB_framework->getCfg( 'absolute_path' ) . '/images/comprofiler/gallery'; $avatar_images = display_avatar_gallery($avatar_gallery_path); for($i = 0; $i < count($avatar_images); $i++) { $j=$i+1; echo "\n\t\t\t'; if (function_exists('fmod')) { if (!fmod(($j),5)) { echo "\n\t\t"; } } else { if (!fmodReplace(($j),5)) { echo "\n\t\t"; } } } echo "\n\t\t\n\t\t"; echo ''; echo "\n\t
 
"; $avatar_name = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $avatar_images[$i]))); echo ''.$avatar_name.''; echo ''; echo '
'; echo ''; echo '
"; echo "\n"; echo cbGetSpoofInputTag( 'userAvatar' ); echo "
\n"; } } /****************************** List Functions ******************************/ function usersList( &$row, &$users, &$columns, &$allFields, &$lists, $listid, $search, $searchmode, $option_itemid, $limitstart, $limit, $total, &$myUser, &$searchableFields, &$searchVals, &$tabs, $list_compare_types, $showPaging, $hotlink_protection, $errorMsg ) { global $_CB_framework, $ueConfig, $_PLUGINS, $_POST, $_GET, $_REQUEST; $results = $_PLUGINS->trigger( 'onBeforeDisplayUsersList', array( &$row, &$users, &$columns, &$allFields, &$lists, $listid, &$search, &$option_itemid, 1 ) ); // $uid = 1 // regroup parts of the different plugins: $pluginAdditions = array( 'search', 'header', 'footer' ); $pluginAdditions['search'] = array(); $pluginAdditions['header'] = array(); $pluginAdditions['footer'] = array(); if ( is_array( $results ) && ( count( $results ) > 0 ) ) { foreach ($results as $res ) { if ( is_array( $res ) ) { foreach ( $res as $k => $v ) { $pluginAdditions[$k][] = $v; } } } } $listTitleHtml = cbReplaceVars( getLangDefinition( $row->title ), $myUser ); $listTitleNoHtml = strip_tags( cbReplaceVars( getLangDefinition( $row->title ), $myUser, false, false ) ); $listDescription = cbReplaceVars( getLangDefinition( $row->description ), $myUser ); $_CB_framework->setPageTitle( $listTitleNoHtml ); $_CB_framework->appendPathWay( $listTitleHtml ); $cbSpoofField = cbSpoofField(); if ( $hotlink_protection == 1 ) { $cbSpoofString = cbSpoofString( null, 'usersList' ); $spoofAmp = "&" . $cbSpoofField . '=' . urlencode( $cbSpoofString ); } else { $cbSpoofString = null; $spoofAmp = null; } // Base URL string: $ue_base_url = $_CB_framework->getCfg( 'live_site' ) . '/index.php?option=com_comprofiler&task=usersList&listid=' . (int) $listid . '&Itemid=' . (int) $option_itemid; // $adminimagesdir = "components/com_comprofiler/images/"; $searchTabContent = $tabs->getSearchablesContents( $searchableFields, $myUser, $searchVals, $list_compare_types ); // table content: $tableContent =& HTML_comprofiler::_getListTableContent( $users, $columns, $allFields ); outputCbTemplate( 1 ); //no need for now: initToolTip(1); // paginator addition: $pagingSearch = ''; foreach ( get_object_vars( $searchVals ) as $k => $v ) { if ( is_array( $v ) ) { $pArr = '&' . urlencode( $k ); foreach ( $v as $kk => $vv ) { $pagingSearch .= $pArr . '[' . urlencode( $kk ) . ']=' . urlencode( $vv ); } } else { $pagingSearch .= '&' . urlencode( $k ) . '=' . urlencode( $v ); } } // Add Javascript to click tr: $jsClickTr = " {" . "\n var cbUserURLs = new Array("; if ( is_array( $users ) && ( $ueConfig['allow_profilelink'] == 1 ) ) { foreach( $users as $user ) { $jsClickTr .= "'" . cbSef( 'index.php?option=com_comprofiler&task=userProfile&user=' . $user->id . getCBprofileItemid( true ), false ) . "',"; } } $jsClickTr .= "'');" // CLICK a table row: . "\n $('#cbUserTable > tbody > tr').click( function(e) {" // If it's not a link within the row which is getting clicked: . "\n if ( ! ( $(e.target).is('a') || ( $(e.target).is('img') && $(e.target).parent().is('a') ) || $(e.target).hasClass('cbClicksInside') || ( $(e.target).parents('.cbClicksInside').length > 0 ) ) ) {" // Get the href of the user profile link (if profile links are allowed): . ( ( $ueConfig['allow_profilelink'] == 1 ) ? "\n window.location = cbUserURLs[this.id.substr(3)];" : '' ) // And avoid the link being followed: . "\n return false;" . "\n }" . "\n } );" . "\n }" ; $_CB_framework->outputCbJQuery( $jsClickTr ); /* // Add Javascript to pagination of list $jsPagination = " $('#cbUserList a.pagenav').click( function() {" // Get the href of the pagination link: . "\n var href = $(this).attr('href');" // Get the page limitstart value: . "\n var matches = /limitstart=(\\d*)/.exec(href);" . "\n if ( matches && matches.length == 2 ) {" // Set limitstart input: . "\n $('input#cbListlimitstart').val( matches[1] );" // Submit the form, so the values are taken: . "\n $('form#adminForm').submit();" // And avoid the link being followed: . "\n return false;" . "\n }" // Link doesn't match, simply follow link: . "\n return true;" . "\n } );" ; $_CB_framework->outputCbJQuery( $jsPagination ); */ if ( count( $searchableFields ) > 0 ) { // Searchable fields appearing in the users list: // Search box: //TBD: display if there is a search criteria: if ( $search === null ) { // Show the "Search" button: $jsSearch = " $('#cbUserListsSearchTrigger').show();" // Hide the Search Criteria part and Results title: . "\n $('#cbUserListsSearcher').hide();" // When button link is clicked: . "\n $('#cbUserListsSearchTrigger').click( function() {" // Hide the button: . "\n $('#cbUserListsSearchTrigger').hide('medium', function() {" // Show the Search Criteria part: . "\n $('#cbUserListsSearcher').slideDown('slow');" . "\n } );" // And avoid the link being followed: . "\n return false;" . "\n } );" ; $_CB_framework->outputCbJQuery( $jsSearch ); } else { /* $ajaxCode = "$('#cbUserListsSearchTrigger').hide();" . "$('#cbUserListsSearcher').show();" . "} );" ; $_CB_framework->outputCbJQuery( $ajaxCode ); */ } // When a search kind ('is', 'is not', 'contains', etc) is clicked (change does not work correctly in some safari 2 and IE 6 versions): $searchTabJs = "\n{" . "\n function cbsearchkrit(thisSelect) {" // Get value of the selected option: . "\n var kindval = $(thisSelect).val();" . "\n if ( kindval == '' ) {" // Hide the search criteria if there is 'no preference' selected: . "\n $(thisSelect).parent( 'div' ).next('div.cbSearchCriteria').slideUp('slow');" . "\n } else {" // Otherwise show the search criteria: . "\n $(thisSelect).parent( 'div' ).next('div.cbSearchCriteria').slideDown('slow');" // Check for search kind being precise search: . "\n if ( ( kindval == 'is' ) || ( kindval == 'isnot' ) ) {" // For radio buttons, insure they are (again) radios: unfortunately, DOM doesn't allow to change type of input on the fly, so do it by regex replacing html: . "\n $(thisSelect).parent('div').next('div.cbSearchCriteria.cb__js_radio').find('input:checkbox').parent().each( function() {" . "\n return $(this).html( $(this).html().replace(/(name=)(\"?)([^\"\\[ >]+)(\\[\\])(\"?)([ >])/g, '\$1\"\$3\"\$6').replace(/type=\"?checkbox\"?/g,'type=\"radio\"') );" . "\n } );" // For single-selects, insure they are not multiple anymore: . "\n $(thisSelect).parent('div').next('div.cbSearchCriteria.cb__js_select').each( function() {" . "\n return $(this).html( $(this).html().replace(/(name=)(\"?)([^\"\\[ >]+)(\\[\\])(\"?)([ >])/g, '\$1\"\$3\"\$6').replace(/multiple(=(\"?)multiple(\"?))?/gi,'') );" . "\n } );" . "\n } else {" // If search criteria is multiple, then make also radios into checkboxes (and below single-selects into multi-selects): . "\n $(thisSelect).parent('div').next('div.cbSearchCriteria.cb__js_radio').find('input:radio').parent().each( function() {" . "\n return $(this).html( $(this).html().replace(/(name=)(\"?)([^\"\\[ >]+)(\\[\\])?(\"?)([ >])/g, '\$1\"\$3\\[\\]\"\$6').replace(/type=\"?radio\"?/g,'type=\"checkbox\"') );" . "\n } );" . "\n $(thisSelect).parent('div').next('div.cbSearchCriteria.cb__js_select').each( function() {" . "\n return $(this).html( $(this).html().replace(/(name=)(\"?)([^\"\\[ >]+)(\\[\\])?(\"?)([ >])/g, '\$1\"\$3\\[\\]\"\$6').replace(/(
*/ if ( $cbSpoofString ) { echo cbGetSpoofInputTag( null, $cbSpoofString ); } // Render search-area header: if ( count( $pluginAdditions['search'] ) ) { $searchTabContent .= '
' . implode( '
', $pluginAdditions['search'] ) . '
'; } $totalIsAllUsers = ! ( ( $search !== null) || ( $row->filterfields != '' ) ); $searchResultDisplaying = ( $search !== null ); $searchCriteriaTitleHtml = cbReplaceVars( _UE_SEARCH_CRITERIA, $myUser ); if ( $searchmode == 0 ) { $searchResultsTitleHtml = cbReplaceVars( _UE_SEARCH_RESULTS, $myUser ); } else { $searchResultsTitleHtml = null; } echo HTML_comprofiler::_cbTemplateRender( $myUser, 'List', 'drawListHead', array( &$lists, $listid, $total, $totalIsAllUsers, $searchTabContent, $searchResultDisplaying, $ue_base_url, $listTitleHtml, $listDescription, $searchCriteriaTitleHtml, $searchResultsTitleHtml ) ); ?>
' . implode( '
', $pluginAdditions['header'] ) . '
'; } if ( $showPaging && ( ( $limitstart != 0 ) || ( $limit <= $total ) ) ) { // top page links: ?>
' . implode( '
', $pluginAdditions['footer'] ) . '
'; } } // end of if ( $searchmode == 0 ) ?>
0) { foreach($users as $userIdx => $user) { $tableContent[$userIdx] = array(); foreach ( $columns as $colIdx => $column ) { $tableContent[$userIdx][$colIdx] = array(); foreach ( $column->fields as $fieldIdx => $fieldId ) { $field = $fields[$fieldId]; $tableContent[$userIdx][$colIdx][$fieldIdx] = new stdClass(); $fieldView =& $tableContent[$userIdx][$colIdx][$fieldIdx]; $fieldView->name = $field->name; $fieldView->value = $_PLUGINS->callField( $field->type, 'getFieldRow', array( &$field, &$user, 'html', 'none', 'list', 0 ), $field ); if ( $column->captions ) { $fieldView->title = $_PLUGINS->callField( $field->type, 'getFieldTitle', array( &$field, &$user, 'html', 'list' ), $field ); } else { $fieldView->title = null; } } } } } return $tableContent; } /****************************** Registration Functions ******************************/ function confirmation() { ?>

loadPluginGroup('user'); $results = $_PLUGINS->trigger( 'onLostPassForm', array( 1 )); //$ui=1 if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } $cbSpoofField = cbSpoofField(); $cbSpoofString = cbSpoofString( null, 'registerForm' ); $regAntiSpamFieldName = cbGetRegAntiSpamFieldName(); $regAntiSpamValues = cbGetRegAntiSpams(); $checkUsername = ( ( isset( $ueConfig['reg_username_checker'] ) ) && ( $ueConfig['reg_username_checker'] ) ); $checkEmail = ( ( isset( $ueConfig['reg_email_checker'] ) ) && ( $ueConfig['reg_email_checker'] > 1 ) ); outputCbTemplate( 1 ); ob_start(); /* $('#adminForm').validate( { errorClass: 'cb_result_warning', rules: { checkusername: { required: false, minlength: 3 //, // remote: "users.php" }, /* password: { required: true, minlength: 5 }, password_confirm: { required: true, minlength: 5, equalTo: "#password" }, * checkemail: { required: true, email: true, // remote: "emails.php" }, }, messages: { checkusername: { required: "Enter a username", minlength: jQuery.format("Enter at least {0} characters"), remote: jQuery.format("{0} is already in use") }, /* password: { required: "Provide a password", rangelength: jQuery.format("Enter at least {0} characters") }, password_confirm: { required: "Repeat your password", minlength: jQuery.format("Enter at least {0} characters"), equalTo: "Enter the same password as above" }, * checkemail: { required: "Please enter a valid email address", minlength: "Please enter a valid email address", remote: jQuery.format("{0} is already in use") }, }, errorPlacement: function(error, element) { if ( element.is(":radio") ) error.appendTo( element.parent().next().next() ); else if ( element.is(":checkbox") ) error.appendTo ( element.next() ); else // error.appendTo( element.parent().next() ); error.appendTo( element.parent().next().children()[0] ); } } ); */ /* $('#adminForm').ajaxForm( { url: '< ?php echo $_CB_framework->getCfg( 'live_site' ); ? >/index2.php?no_html=1&output=raw', target: '#cb_lost_username_passwd_content', beforeSubmit: function(formData, jqForm, options) { $('#cb_line_lostbutton').fadeOut('fast', function() { $('#cb_line_lostbutton').html('getCfg( 'live_site' ); ?>/components/com_comprofiler/images/wait.gif\" /> ').fadeIn('fast'); } ); return true; }, success: function(responseText, statusText) { alert('Got reply !status: ' + statusText + '\n\nresponseText: \n' + responseText + '\n\nThe output div should have already been updated with the responseText.'); } } ); */ // checkboxes onchange trigger only on blur: ?> $.fn.cb_uncheck = function() { return this.each( function() { this.checked = false; }); }; $('#boxLostUsername,#boxLostPassword').click( function() { if ( $('#boxLostUsername').get(0).checked ) { $('#cb_step1_form').slideDown('medium'); $('#cb_line_checkusername').slideUp('medium'); if ( $('#boxLostPassword').get(0).checked ) { $('#cb_lost_username_password').slideDown('medium'); $('#cb_lost_username,#cb_lost_password').slideUp('medium'); } else { $('#cb_lost_username').slideDown('medium'); $('#cb_lost_password,#cb_lost_username_password').slideUp('medium'); } } else { if ( $('#boxLostPassword').get(0).checked ) { $('#cb_step1_form,#cb_lost_password,#cb_line_checkusername').slideDown('medium'); $('#cb_lost_username,#cb_lost_username_password').slideUp('medium'); } else { $('#cb_lost_username,#cb_lost_password,#cb_lost_username_password,#cb_step1_form').slideUp('medium'); } } return true; } ); $('#cb_lost_username,#cb_lost_password,#cb_lost_username_password,#cb_step1_form,#cb_line_checkusername').hide(); $('#boxLostUsername,#boxLostPassword').cb_uncheck(); $('#checkusername,#checkemail').val(''); $('#cbsendnewuspass').attr('disabled',true); $('#cb_lost_username').html(''); $('#checkusername,#checkemail').keyup( function() { var respField = $('#'+$(this).attr('id')+'Response'); if ( respField.html() != ' ' ) { respField.fadeOut('medium', function() { respField.html(' '); } ); } if ( $.trim( $('#checkusername').val() ) == '' ) { if ( $.trim( $('#checkemail').val() ) == '' ) { $('#cbsendnewuspass').val('').attr('disabled',true); } else { $('#cbsendnewuspass').attr('disabled',false).val(''); } } else { $('#cbsendnewuspass').attr('disabled',false).val(''); } return true; } ); $('#checkusername,#checkemail').change( function() { if ( ( $(this).val() != '' ) && ( $('#'+$(this).attr('id')+'Response').length ) ) { $('#'+$(this).attr('id')+'Response').html('getCfg( 'live_site' ); ?>/components/com_comprofiler/images/wait.gif\" /> ').fadeIn('fast'); var cbInputField = this; $.ajax( { type: 'POST', url: 'getCfg( 'live_site' ); ?>/index2.php?option=com_comprofiler&task=perform'+$(this).attr('id')+'&function=testexists&no_html=1&format=raw', data: 'value=' + encodeURIComponent( $(this).val() ) + '&=' + encodeURIComponent('') + '&=' + encodeURIComponent(''), success: function(response) { var respField = $('#'+$(cbInputField).attr('id')+'Response'); respField.fadeOut('fast', function() { respField.html(response).fadeIn('fast'); } ); }, dataType: 'html' }); } else { $('#'+$(this).attr('id')+'Response').html(' '); } } ); outputCbJQuery( $jsContent /* , array( 'form', 'validate' ) */ ); //TODO: Add ability to change password on form. ?>
 
 
>
trigger( 'onBeforeLoginFormDisplay', array( &$postvars, $regErrorMSG ) ); if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } outputCbTemplate(1); outputCbJs(1); initToolTip(1); $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', 'loginform' ); $_CB_database->setQuery( "SELECT params from #__modules WHERE module = 'mod_cblogin' ORDER BY ordering LIMIT 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(); } else { $moduleContent = CBTxt::Th("Error: CB Login module not installed (required)."); } if ($regErrorMSG) { echo "
".$regErrorMSG."
\n"; } // output results of plugins event "onBeforeRegisterFormDisplay": if ( is_array( $results ) ) { echo implode( '', $results ); } echo '
' . _LOGIN_TITLE . '
'; echo $moduleContent; echo '
'; echo "
"; } function registerForm( $option, $emailpass, &$user, &$postvars, $regErrorMSG = null ) { global $_CB_framework, $_CB_database, $ueConfig, $_PLUGINS; $results = $_PLUGINS->trigger( 'onBeforeRegisterFormDisplay', array( &$user, $regErrorMSG ) ); if ($_PLUGINS->is_errors()) { echo "\n"; exit(); } outputCbTemplate(1); outputCbJs(1); initToolTip(1); $output = 'htmledit'; // 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, 'table', 'register', true ); // 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 ); $tabcontent .= "\t\n" . "\t\t \n
","") . '' . getFieldIcons( $_CB_framework->getUi(), 1, null, null, null ) . "
\n" . "\t\n" ; } $_CB_framework->setPageTitle( _UE_REGISTRATION ); $_CB_framework->appendPathWay( _UE_REGISTRATION ); // starts outputing: // $cbSpoofField = cbSpoofField(); $cbSpoofString = cbSpoofString( null, 'registerForm' ); // $regAntiSpamFieldName = cbGetRegAntiSpamFieldName(); $regAntiSpamValues = cbGetRegAntiSpams(); // ob_start(); ?> var cbDefaultFieldBackground; function cbFrmSubmitButton() { var me = this.elements; var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&]", "i"); var r = new RegExp("[^A-Za-z0-9]", "i"); var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i"); 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); fieldJS; ?> if (typeof(me['username'])!='undefined' && me['username'].value == "") { errorMSG += "\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 += "\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; } if (typeof(me['password'])!='undefined' && me['password'].value.length < 6) { errorMSG += "\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 += "\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; } if(!me['acceptedterms'].checked) { errorMSG += "\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" 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') + ' : \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') + ' : \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 ); outputCbJQuery( $cbjavascript ); if ($regErrorMSG) { echo "
".$regErrorMSG."
\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 ); $regFormTag = '
' . 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 ) && ! $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 LIMIT 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( $user, 'RegisterForm', 'drawProfile', array( &$user, $tabcontent, $regFormTag, $introMessage, _LOGIN_REGISTER_TITLE, _REGISTER_TITLE, _UE_REGISTER, $moduleContent, $topIcons, $bottomIcons, $conclusionMessage ), $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();'); } } /****************************** Moderation Functions ******************************/ function reportUserForm($option,$uid) { global $_CB_framework, $ueConfig, $Itemid; if($ueConfig['allowUserReports']==0) { echo _UE_FUNCTIONALITY_DISABLED; return; } HTML_comprofiler::outputMosFormVal( '#adminForm' ); ?>
' method="post" id="adminForm" name="adminForm">
myId() != $uid ) echo _UE_REPORTBAN_TITLE; ELSE echo _UE_REPORTUNBAN_TITLE;; ?>
myId() != $uid ) ? '1': '2').'&user='.$uid.($Itemid ? "&Itemid=". (int) $Itemid : "")) ?>' method="post" id="adminForm" name="adminForm">
myId() != $uid ) echo _UE_BANREASON; ELSE echo _UE_UNBANREQUEST; ?>



"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo ''; echo "
 
id."\" />".getNameFormat($users[$i]->name,$users[$i]->username,$ueConfig['name_format']). "".$users[$i]->email."".cbFormatDate($users[$i]->registerDate)."
' .'' .'   ' .'
\n"; echo "\n"; echo "\n"; echo cbGetSpoofInputTag( 'pendingApprovalUsers' ); echo "
\n"; } function manageConnections($connections,$actions,$total,&$connMgmtTabs,&$pagingParams,$perpage,$connecteds=null) { global $_CB_framework, $ueConfig, $_REQUEST, $Itemid; $ui=1; outputCbTemplate($ui); initToolTip(1); ob_start(); ?> var tabPanemyCon; function showCBTabPaneMy( sName ) { if (typeof tabPanemyCon != "undefined" ) { switch ( sName.toLowerCase() ) { case "": case "manageactions": case "0": tabPanemyCon.setSelectedIndex( 0 ); break; case "": case "manageconnections": case "1": tabPanemyCon.setSelectedIndex( 1 ); break; case "": case "connectedfrom": case "2": tabPanemyCon.setSelectedIndex( 2 ); break; } } } outputCbJQuery( $cbjavascript ); ob_start(); ?> function confirmSubmit() { if (confirm("")) return true ; else return false ; } document->addHeadScriptDeclaration( $cbjavascript ); $tabs = new cbTabs( 0, $ui); $cTypes=explode("\n",$ueConfig['connection_categories']); $connectionTypes=array(); foreach($cTypes as $cType) { if(trim($cType)!=null && trim($cType)!="") $connectionTypes[]=moscomprofilerHTML::makeOption( trim($cType) , getLangDefinition(trim($cType)) ); } ?>


startPane("myCon"); // Tab 0: Manange Actions: echo $tabs->startTab("myCon",_UE_MANAGEACTIONS." (".count($actions).")","action"); if(!count($actions)>0) { echo "\t\t
"._UE_NOACTIONREQUIRED."
\n"; } else { echo '
'; echo "\t\t
"._UE_CONNECT_ACTIONREQUIRED."
\n"; // echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; foreach($actions AS $action) { $conAvatar = null; $conAvatar = getFieldValue('image',$action->avatar,$action); $onlineIMG = ($ueConfig['allow_onlinestatus']==1) ? getFieldValue('status',$action->isOnline,$action,null,1) : ""; $tipField = ""._UE_CONNECTIONREQUIREDON." : ".dateConverter($action->membersince,'Y-m-d',$ueConfig['date_format']); if($action->reason!=null) $tipField .= "
"._UE_CONNECTIONMESSAGE." :
".htmlspecialchars($action->reason, ENT_QUOTES); $tipTitle = _UE_CONNECTIONREQUESTDETAIL; $htmltext = $conAvatar; $style = "style=\"padding:5px;\""; $tooltip = cbFieldTip($ui, $tipField, $tipTitle, '250', '', $htmltext, '', $style, '',false); echo "
"; echo $onlineIMG.' '.getNameFormat($action->name,$action->username,$ueConfig['name_format'])."
" .$tooltip ."
\""._UE_ACCEPTCONNECTIONid ."action\"/> \""._UE_DECLINECONNECTIONid ."action\"/>id."\" />"; echo "
\n"; } echo "
"; echo "
"; echo cbGetSpoofInputTag( 'manageConnections' ); echo "
"; } echo $tabs->endTab(); // Tab 1: Manange Connections: echo $tabs->startTab("myCon",_UE_MANAGECONNECTIONS,"connections"); if(!count($connections)>0) { echo "\t\t
"._UE_NOCONNECTIONS."
\n"; } else { ?>
' method='post' name='userAdmin'>
type)); $k = array(); foreach($ks as $kv) { $k[]->value=$kv; } $list=array(); $list['connectionType'] = moscomprofilerHTML::selectList( $connectionTypes, $connection->id.'connectiontype[]', 'class="inputbox" multiple="multiple" size="5"', 'value', 'text', $k,0 ); $conAvatar = null; $conAvatar = getFieldValue('image',$connection->avatar,$connection); $emailIMG = getFieldValue('primaryemailaddress',$connection->email,$connection,null,1); $pmIMG = getFieldValue('pm',$connection->username,$connection,null,1); $onlineIMG = ($ueConfig['allow_onlinestatus']==1) ? getFieldValue('status',$connection->isOnline,$connection,null,1) : ""; if($connection->accepted==1 && $connection->pending==1) $actionIMG = "\""._UE_CONNECTIONPENDING."\"memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\" onclick=\"return confirmSubmit();\" >\""._UE_REMOVECONNECTION."\""; elseif($connection->accepted==1 && $connection->pending==0) $actionIMG="memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\" onclick=\"return confirmSubmit();\" >\""._UE_REMOVECONNECTION."\""; elseif($connection->accepted==0) $actionIMG="memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\">\""._UE_ACCEPTCONNECTION."\"memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\">\""._UE_REMOVECONNECTION."\""; $tipField = ""._UE_CONNECTEDSINCE." : ".dateConverter($connection->membersince,'Y-m-d',$ueConfig['date_format']); if($connection->type!=null) $tipField .= "
"._UE_CONNECTIONTYPE." : ".getConnectionTypes($connection->type); if($connection->description!=null) $tipField .= "
"._UE_CONNECTEDCOMMENT." : ".htmlspecialchars($connection->description); $tipTitle = _UE_CONNECTEDDETAIL; $htmltext = $conAvatar; $style = "style=\"padding:5px;\""; $tooltip = cbFieldTip($ui, $tipField, $tipTitle, '200', '', $htmltext, '', $style, '',false); echo "\n"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n"; $i= ($i==1) ? 2 : 1; } echo ""; echo "
".$onlineIMG.' '.getNameFormat($connection->name,$connection->username,$ueConfig['name_format']) ."
".$tooltip."
" .$actionIMG." memberid.($Itemid ? "&Itemid=". (int) $Itemid : "")) ."\">\""._UE_VIEWPROFILE."\" ".$emailIMG." ".$pmIMG."
".$list['connectionType']."id."\" />

"; if ( $perpage < $total ) { echo "
" . $connMgmtTabs->_writePaging( $pagingParams, 'connections_', $perpage, $total, 'manageConnections' )."
"; } echo "
"; echo cbGetSpoofInputTag( 'manageConnections' ); echo "
"; } echo $tabs->endTab(); // Tab 2: Users connected with me: if ( $ueConfig['autoAddConnections'] == 0 ) { echo $tabs->startTab( 'myCon', _UE_CONNECTEDWITH, 'connected' ); if ( ! count( $connecteds ) > 0 ) { echo _UE_NOCONNECTEDWITH; } else { // tooltip params: $width = '200'; $icon = ''; $href = ''; echo ''; echo ''; echo ''; echo ''; echo '
'; foreach ( $connecteds AS $connected ) { $conAvatar = null; $conAvatar = getFieldValue('image',$connected->avatar,$connected); $emailIMG = getFieldValue('primaryemailaddress',$connected->email,$connected,null,1); $pmIMG = getFieldValue('pm',$connected->username,$connected,null,1); $onlineIMG = ( $ueConfig['allow_onlinestatus'] == 1 ) ? getFieldValue('status',$connected->isOnline,$connected,null,1) : ''; if ( $connected->accepted == 1 && $connected->pending == 1 ) { $actionIMG = ''._UE_CONNECTIONPENDING.' ' . '' . ''._UE_REMOVECONNECTION.'' ; } elseif ( $connected->accepted == 1 && $connected->pending == 0 ) { $actionIMG = '' . ''._UE_REMOVECONNECTION.'' ; } elseif ( $connected->accepted == 0 ) { $actionIMG = '' . ''._UE_ACCEPTCONNECTION.' ' . '' . ''._UE_REMOVECONNECTION.'' ; } $tipField = ''._UE_CONNECTEDSINCE.' : '.dateConverter($connected->membersince,'Y-m-d',$ueConfig['date_format']); if ( getLangDefinition( $connected->type ) != null ) { $tipField .= '
'._UE_CONNECTIONTYPE.' : '.getLangDefinition($connected->type); } if ( $connected->description != null ) { $tipField .= '
'._UE_CONNECTEDCOMMENT.' : '.htmlspecialchars($connected->description); } $tipTitle = _UE_CONNECTEDDETAIL; $htmltext = $conAvatar; $style = 'style="padding:5px;"'; $tooltip = cbFieldTip( $ui, $tipField, $tipTitle, $width, $icon, $htmltext, $href, $style, '',false); echo '
'; echo $actionIMG.'
'; echo $tooltip.'
'; echo $onlineIMG.' '.getNameFormat($connected->name,$connected->username,$ueConfig['name_format']); echo '
'._UE_VIEWPROFILE
				.' '.$emailIMG.' '.$pmIMG."\n"; echo "
\n"; } echo '
'; } echo $tabs->endTab(); } echo $tabs->endPane(); if ( isset($_REQUEST['tab'] ) ) { $_CB_framework->outputCbJQuery( "showCBTabPaneMy( '" . addslashes( urldecode( stripslashes( cbGetParam( $_REQUEST, 'tab' ) ) ) ). "' );" ); } elseif ( ! ( count( $actions ) > 0 ) ) { $_CB_framework->outputCbJQuery( "tabPanemyCon.setSelectedIndex( 1 );" ); } echo '
' . _UE_BACK_TO_YOUR_PROFILE . '
'; } } // end class HTML_comprofiler function moderateBans( $option, $act, $uid ) { global $_CB_framework, $_CB_database, $ueConfig, $Itemid, $_REQUEST; $isModerator=isModerator( $_CB_framework->myId() ); if ( ( $isModerator == 0 ) || ( ( $act == 2 ) && ( $uid == $_CB_framework->myId() ) ) ) { cbNotAuth(); return; } $ue_base_url = "index.php?option=com_comprofiler&task=moderateBans".($Itemid ? "&Itemid=". (int) $Itemid : ""); // Base URL string if ( $act == 2 ) { $query = "SELECT count(*) FROM #__comprofiler WHERE NOT(ISNULL(bannedby)) AND approved=1 AND confirmed=1 AND id=" . (int) $uid; } else { $query = "SELECT count(*) FROM #__comprofiler WHERE banned=2 AND approved=1 AND confirmed=1 AND id!=".(int) $_CB_framework->myId(); } if(!$_CB_database->setQuery($query)) print $_CB_database->getErrorMsg(); $total = $_CB_database->loadResult(); $limitstart = (int) cbGetParam( $_REQUEST, 'limitstart', 0 ); if (empty($limitstart)) { $limitstart = 0; } $limit = 20; if ($limit > $total) { $limitstart = 0; } $query = "SELECT c.id, c.banned, u2.name AS bannedbyname, u2.username as bannedbyusername, u3.name AS unbannedbyname, u3.username as unbannedbyusername, " . "u.name as bannedname, u.username as bannedusername, c.banneddate, c.unbanneddate, c.bannedreason, c.bannedby, c.unbannedby" . "\n FROM #__comprofiler AS c" . "\n INNER JOIN #__users AS u ON u.id=c.id" . "\n INNER JOIN #__users AS u2 ON u2.id= c.bannedby" . "\n LEFT JOIN #__users AS u3 ON u3.id = c.unbannedby"; if ( $act == 2 ) { $query .= "\n WHERE NOT(ISNULL(c.bannedby)) AND c.id = " . (int) $uid; } else { $query .= "\n WHERE c.banned = 2 AND c.id != " . (int) $uid; } $query .= " AND c.approved = 1 AND c.confirmed = 1"; $query .= "\n LIMIT $limitstart, $limit"; $_CB_database->setQuery($query); $row = $_CB_database->loadObjectList(); outputCbTemplate(1); ?>




"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ''; } echo '
".getNameFormat($row[$i]->bannedname,$row[$i]->bannedusername,$ueConfig['name_format']). "".nl2br($row[$i]->bannedreason)."".dateConverter($row[$i]->banneddate,'Y-m-d',$ueConfig['date_format'])."".getNameFormat($row[$i]->bannedbyname,$row[$i]->bannedbyusername,$ueConfig['name_format']). "".dateConverter($row[$i]->unbanneddate,'Y-m-d',$ueConfig['date_format'])."".getNameFormat($row[$i]->unbannedbyname,$row[$i]->unbannedbyusername,$ueConfig['name_format']). ""; switch ( $row[$i]->banned ) { case 1: echo '' . _UE_BANSTATUS_BANNED . ''; break; case 2: echo '' . _UE_BANSTATUS_UNBAN_REQUEST_PENDING . ''; break; default: echo '' . _UE_BANSTATUS_PROCESSED . ''; break; } echo "
'; if ($total > $limit) { ?>
myId() ); if ($isModerator == 0) { cbNotAuth(); return; } $ue_base_url = "index.php?option=com_comprofiler&task=moderateReports".($Itemid ? "&Itemid=". (int) $Itemid : ""); // Base URL string $query = "SELECT count(*) FROM #__comprofiler_userreports WHERE reportedstatus=0 "; if (!$_CB_database->setQuery($query)) { print $_CB_database->getErrorMsg(); } $total = $_CB_database->loadResult(); if($total<1) { echo _UE_NONEWUSERREPORTS; return; } $limitstart = intval( cbGetParam( $_REQUEST, 'limitstart', 0 ) ); if (empty($limitstart)) $limitstart = 0; $limit = 20; if ($limit > $total) { $limitstart = 0; } $query = "SELECT u2.name as reportedbyname, u2.username as reportedbyusername, u.name as reportedname, u.username as reportedusername, ur.* FROM #__users u, #__comprofiler_userreports ur, #__users u2 WHERE u.id=ur.reporteduser AND u2.id=ur.reportedbyuser AND ur.reportedstatus=0 ORDER BY ur.reporteduser,ur.reportedondate"; $query .= " LIMIT $limitstart, $limit"; $_CB_database->setQuery($query); $row = $_CB_database->loadObjectList(); outputCbTemplate(1); ?>



' method='post' name='adminForm'> "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ''; } echo ''; echo '
 
reportid."\" />".getNameFormat($row[$i]->reportedname,$row[$i]->reportedusername,$ueConfig['name_format']). "".$row[$i]->reportexplaination."".dateConverter($row[$i]->reportedondate,'Y-m-d',$ueConfig['date_format'])."".getNameFormat($row[$i]->reportedbyname,$row[$i]->reportedbyusername,$ueConfig['name_format']). "
' .'
'; echo cbGetSpoofInputTag( 'moderateReports' ); echo "
"; if($total > $limit) { ?>
myId() ); if ($isModerator == 0) { cbNotAuth(); return; } $ue_base_url = "index.php?option=com_comprofiler&task=moderateImages".($Itemid ? "&Itemid=". (int) $Itemid : ""); // Base URL string $query = "SELECT count(*) FROM #__comprofiler WHERE avatarapproved=0 AND approved=1 AND confirmed=1 AND banned=0"; if(!$_CB_database->setQuery($query)) print $_CB_database->getErrorMsg(); $total = $_CB_database->loadResult(); $limitstart = intval( cbGetParam( $_REQUEST, 'limitstart', 0 ) ); if (empty($limitstart)) $limitstart = 0; $limit = 20; if ($limit > $total) { $limitstart = 0; } $query = "SELECT * FROM #__comprofiler c, #__users u WHERE u.id= c.id AND c.avatarapproved=0 AND approved=1 AND confirmed=1 AND banned=0"; $query .= " LIMIT $limitstart, $limit"; $_CB_database->setQuery($query); $row = $_CB_database->loadObjectList(); outputCbTemplate(1); ?>



$limit) { ?>

"; echo ""; echo "'; echo ''; echo '
"; $avatar_gallery_path = $_CB_framework->getCfg( 'live_site' ) . '/images/comprofiler/'; $sys_gallery_path = $_CB_framework->getCfg( 'live_site' ) . '/components/com_comprofiler/images/'; for($i = 0; $i < count($row); $i++) { $image = $avatar_gallery_path.'tn'.$row[$i]->avatar; echo '
'; echo '
'; echo ""; echo "
"._UE_APPROVE
	     	." "._UE_REJECT." "._UE_VIEWPROFILE.""; echo "
"; } echo '
' .'' .'   ' .''; echo '
'; echo ''; echo cbGetSpoofInputTag( 'moderateImages' ); echo ""; if ($total > $limit) { ?>
myId() ); if ( $isModerator == 0 ) { cbNotAuth(); return; } $ue_base_url = "index.php?option=com_comprofiler&task=viewReports".($Itemid ? "&Itemid=". (int) $Itemid : ""); // Base URL string $query = "SELECT count(*) FROM #__comprofiler_userreports WHERE " . ( $act == 1 ? '' : "reportedstatus=0 AND " ) . "reporteduser=" . (int) $uid; if(!$_CB_database->setQuery($query)) print $_CB_database->getErrorMsg(); $total = $_CB_database->loadResult(); $limitstart = intval( cbGetParam( $_REQUEST, 'limitstart', 0 ) ); if (empty($limitstart)) $limitstart = 0; $limit = 20; if ($limit > $total) { $limitstart = 0; } $query = "SELECT u2.name as reportedbyname, u2.username as reportedbyusername, u.name as reportedname, u.username as reportedusername, ur.* FROM #__users u, #__comprofiler_userreports ur, #__users u2 WHERE u.id=ur.reporteduser AND u2.id=ur.reportedbyuser AND " . ( $act == 1 ? '' : "ur.reportedstatus=0 AND " ) . "ur.reporteduser=".(int) $uid." ORDER BY ur.reporteduser,ur.reportedondate"; $query .= " LIMIT $limitstart, $limit"; $_CB_database->setQuery($query); $row = $_CB_database->loadObjectList(); outputCbTemplate(1); ?>



$limit) { ?>

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; } echo "
".getNameFormat($row[$i]->reportedname,$row[$i]->reportedusername,$ueConfig['name_format']). "".$row[$i]->reportexplaination."".dateConverter($row[$i]->reportedondate,'Y-m-d',$ueConfig['date_format'])."".getNameFormat($row[$i]->reportedbyname,$row[$i]->reportedbyusername,$ueConfig['name_format']). "". ( $row[$i]->reportedstatus ? ( '' . _UE_REPORTSTATUS_PROCESSED . '' ) : ( '' . _UE_REPORTSTATUS_OPEN . '' ) ) ."
\n"; if($total > $limit) { ?>
\n"; echo "
\n"; echo '\n"; echo "
\n
\n"; } ?>