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' ); } cbimport( 'cb.database' ); cbimport( 'language.front' ); function getNameFormatOnline($name,$uname,$format) { if ( $format != 3 ) { $name = str_replace( array("&",""","'","<",">"), array("&","\"","'","<",">"), $name ); } SWITCH ($format) { CASE 1 : $returnName = $name; break; CASE 2 : $returnName = $name." (".$uname.")"; break; CASE 3 : $returnName = $uname; break; CASE 4 : $returnName = $uname." (".$name.")"; break; } return $returnName; } // $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 = ''; } $query = "SELECT DISTINCT a.username, a.userid, u.name" ."\n FROM #__session AS a, #__users AS u" ."\n WHERE (a.userid = u.id) AND (a.guest = 0) AND " . ( ( checkJversion() == 1 ) ? "(a.client_id = 0)" : "(NOT ( a.usertype is NULL OR a.usertype = ''))" ) ."\n ORDER BY " . ( ( $ueConfig['name_format'] > 2 ) ? "a.username" : "u.name" ) . " ASC"; $_CB_database->setQuery($query); $rows = $_CB_database->loadObjectList(); $result = ''; if ( count( $rows ) > 0) { $result .= "\n"; if ( $pretext != '' ) { $result = $pretext . "
\n" . $result; } $result .= $posttext; } else { $result .= _UE_NONE; } echo $result; ?>