26 $query =
"SELECT distinct e.type,s.subtype,e.subtype as subtype_id 27 from {$CONFIG->dbprefix}entities e left 28 join {$CONFIG->dbprefix}entity_subtypes s on e.subtype=s.id";
32 $query .=
" where owner_guid=$owner_guid";
33 $owner_query =
"and owner_guid=$owner_guid ";
39 foreach ($types as
$type) {
45 $query =
"SELECT count(*) as count 46 from {$CONFIG->dbprefix}entities where type='{$type->type}' $owner_query";
49 $query .=
" and subtype={$type->subtype_id}";
55 $entity_stats[$type->type][$type->subtype] = $subtype_cnt->count;
76 if (!$show_deactivated) {
80 $query =
"SELECT count(*) as count 81 from {$CONFIG->dbprefix}entities where type='user' $access";
118 elgg_extend_view(
'core/settings/statistics',
'core/settings/statistics/online');
119 elgg_extend_view(
'core/settings/statistics',
'core/settings/statistics/numentities');
get_entity_statistics($owner_guid=0)
Return an array reporting the number of various entities in the system.
get_data_row($query, $callback="")
Retrieve a single row from the database.
statistics_init()
Initialise the statistics admin page.
get_online_users(array $options=array())
Render a list of currently online users.
elgg_extend_view($view, $view_extension, $priority=501, $viewtype= '')
Extends a view with another view.
elgg global
Pointer to the global context.
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
Register a callback as an Elgg event handler.
elgg_list_entities(array $options=array(), $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
get_data($query, $callback="")
Retrieve rows from the database.
get_number_users($show_deactivated=false)
Return the number of users registered in the system.
_elgg_get_access_where_sql(array $options=array())
Returns the SQL where clause for enforcing read access to data.