]*(\"?)/g,'size=\"0\"') );"
. "\n } );"
. "\n }"
. "\n }"
. "\n }"
. "\n $('div.cbSearchKind select').click( function() {"
. "\n cbsearchkrit( this );"
// At page startup fires the click event, which executes the callback just defined above:
. "\n } ).click();"
. "\n $('div.cbSearchKind select').change( function() {"
. "\n cbsearchkrit( this );"
// At page startup fires the click event, which executes the callback just defined above:
. "\n } );"
. "\n}"
/*
= " $('.cbSearchCriteria').each( function() {"
. "\n if ( $(this).prev().children('select')[0].val() == '' ) {"
. "\n $(this).hide();"
. "\n }"
. "\n } );"
. "\n var searchkind = $(this).prev().children('select')[0];"
. "\n var searchcrit = this;"
. "\n $(this).children('input,select').each( function() {"
. "\n if ( $(this).value() == '' ) {"
. "\n $(searchcrit).hide();"
*/
;
$_CB_framework->outputCbJQuery( $searchTabJs );
}
// list title:
?>
*/
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 \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 = '
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">
\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 "";
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 "\n";
}
echo " ";
echo " ";
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 = " memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\" onclick=\"return confirmSubmit();\" > ";
elseif($connection->accepted==1 && $connection->pending==0) $actionIMG="memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\" onclick=\"return confirmSubmit();\" > ";
elseif($connection->accepted==0) $actionIMG="memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\"> memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))."\"> ";
$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".$onlineIMG.' '.getNameFormat($connection->name,$connection->username,$ueConfig['name_format'])
." ".$tooltip." "
.$actionIMG." memberid.($Itemid ? "&Itemid=". (int) $Itemid : ""))
."\"> ".$emailIMG." ".$pmIMG." ";
echo "\n\t".$list['connectionType']." ";
echo "\n\tid."description\">"
. htmlspecialchars( $connection->description )
. " id."\" /> ";
echo "\n ";
$i= ($i==1) ? 2 : 1;
}
echo " ";
echo "
";
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 '';
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 = ' '
. ''
. ' '
;
} elseif ( $connected->accepted == 1 && $connected->pending == 0 ) {
$actionIMG = ''
. ' '
;
} elseif ( $connected->accepted == 0 ) {
$actionIMG = ''
. ' '
. ''
. ' '
;
}
$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 '
'.$emailIMG.' '.$pmIMG."\n";
echo "
\n";
}
echo ' ';
echo ' ';
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 '';
}
} // 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 "".getNameFormat($row[$i]->bannedname,$row[$i]->bannedusername,$ueConfig['name_format']). " ";
echo "".nl2br($row[$i]->bannedreason)." ";
echo "".dateConverter($row[$i]->banneddate,'Y-m-d',$ueConfig['date_format'])." ";
echo "".getNameFormat($row[$i]->bannedbyname,$row[$i]->bannedbyusername,$ueConfig['name_format']). " ";
echo "".dateConverter($row[$i]->unbanneddate,'Y-m-d',$ueConfig['date_format'])." ";
echo "".getNameFormat($row[$i]->unbannedbyname,$row[$i]->unbannedbyusername,$ueConfig['name_format']). " ";
echo "";
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 " ";
echo '';
}
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 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 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) { ?>
\n";
if($total > $limit) { ?>
\n";
echo "
\n";
echo ' \n";
echo " \n\n";
}
?>