getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) { echo 'CB not installed'; return; } include_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ); } if ( ! ( $_CB_framework->myId() > 0 ) ) { return; } cbimport( 'cb.database' ); cbimport( 'language.front' ); cbimport( 'cb.acl' ); // $params is defined by include: ignore this warning: if ( is_callable( array( $params, 'get' ) ) ) { // Mambo 4.5.0 compatibility $class_sfx = $params->get( 'moduleclass_sfx', ""); $pretext = $params->get( 'pretext', "" ); $posttext = $params->get( 'posttext', "" ); } else { $class_sfx = ''; $pretext = ''; $posttext = ''; } $results = null; $andItemid = getCBprofileItemid( true ); $query = "SELECT banned FROM #__comprofiler WHERE id = " . $_CB_framework->myId(); $_CB_database->setQuery( $query); $banStatus = $_CB_database->loadResult(); if ( $banStatus === null ) { trigger_error( $_CB_database->getErrorMsg(), E_USER_WARNING ); } if ( $banStatus > 0 ) { $results .= "
" . ( ( $banStatus == 1 ) ? _UE_PLEAE_CHECK_PROFILE : _UE_BANSTATUS_UNBAN_REQUEST_PENDING ) . "
"; } if ( isModerator( $_CB_framework->myId() ) ) { $query = "SELECT count(*) FROM #__comprofiler WHERE avatarapproved=0 AND approved=1 AND confirmed=1 AND banned=0"; $_CB_database->setQuery($query); $totalimages = $_CB_database->loadResult(); if ( $totalimages === null ) trigger_error( $_CB_database->getErrorMsg(), E_USER_WARNING ); $query = "SELECT count(*) FROM #__comprofiler_userreports WHERE reportedstatus=0"; $_CB_database->setQuery($query); $totaluserreports = $_CB_database->loadResult(); if ( $totaluserreports === null ) trigger_error( $_CB_database->getErrorMsg(), E_USER_WARNING ); $query = "SELECT count(*) FROM #__comprofiler WHERE banned=2 AND approved=1 AND confirmed=1"; $_CB_database->setQuery($query); $totalunban = $_CB_database->loadResult(); if ( $totalunban === null ) trigger_error( $_CB_database->getErrorMsg(), E_USER_WARNING ); $query = "SELECT count(*) FROM #__comprofiler WHERE approved=0 AND confirmed=1"; $_CB_database->setQuery($query); $totaluserpendapproval = $_CB_database->loadResult(); if ( $totaluserpendapproval === null ) trigger_error( $_CB_database->getErrorMsg(), E_USER_WARNING ); if($totalunban > 0 || $totaluserreports > 0 || $totalimages > 0 || ($totaluserpendapproval > 0 && $ueConfig['allowModUserApproval'])) { if($totalunban > 0) $results .= "
".$totalunban." "._UE_UNBANREQUIREACTION."
"; if($totaluserreports > 0) $results .= "
".$totaluserreports." "._UE_USERREPORTSREQUIREACTION."
"; if($totalimages > 0) $results .= "
".$totalimages." "._UE_IMAGESREQUIREACTION."
"; if($totaluserpendapproval > 0 && $ueConfig['allowModUserApproval']) $results .= "
".$totaluserpendapproval." "._UE_USERPENDAPPRACTION."
"; } } if($ueConfig['allowConnections']) { // $query = "SELECT count(*) FROM #__comprofiler_members WHERE pending=1 AND memberid=". $_CB_framework->myId(); $query = "SELECT COUNT(*)" . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.referenceid=c.id" . "\n LEFT JOIN #__users AS u ON m.referenceid=u.id" . "\n WHERE m.memberid=" . (int) $_CB_framework->myId() . " AND m.pending=1" . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" ; $_CB_database->setQuery($query); $totalpendingconnections = $_CB_database->loadResult(); if ( $totalpendingconnections === null ) trigger_error( $_CB_database->getErrorMsg(), E_USER_WARNING ); if($totalpendingconnections > 0) { $results .= "
".$totalpendingconnections." "._UE_CONNECTIONREQUIREACTION."
"; } } if($results==null) { echo _UE_NOACTIONREQUIRED; } else { if($pretext != "") echo "
".$pretext."
"; echo $results; if($posttext != "") echo "
".$posttext."
"; } ?>