diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-12 21:12:52 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-12 21:12:52 +0000 |
commit | 6584bc4ec2de3b1c377baf763ef5b0ac1e6c807a (patch) | |
tree | e827ceb550d4035515bc394b89e94ca7a07cae9d /views/default | |
parent | db557a6331d2be1496d22627b3de61575567ad1a (diff) | |
download | elgg-6584bc4ec2de3b1c377baf763ef5b0ac1e6c807a.tar.gz elgg-6584bc4ec2de3b1c377baf763ef5b0ac1e6c807a.tar.bz2 |
Marcus Povey <marcus@elgg.com>
* Some basic statistics committed after a fruitless day fighting with Eclipse.
git-svn-id: https://code.elgg.org/elgg/trunk@904 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/admin/main_opt/statistics.php | 17 | ||||
-rw-r--r-- | views/default/admin/statistics.php | 54 |
2 files changed, 70 insertions, 1 deletions
diff --git a/views/default/admin/main_opt/statistics.php b/views/default/admin/main_opt/statistics.php new file mode 100644 index 000000000..da37decf6 --- /dev/null +++ b/views/default/admin/main_opt/statistics.php @@ -0,0 +1,17 @@ +<?php + /** + * Elgg satistics sub-component on the main menu. + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ +?> +<div class="admin-menu-option"> + <h2><?php echo elgg_echo('admin:statistics'); ?> </h2> + <p><?php echo elgg_echo('admin:statistics:opt:description'); ?><br /> + <a href="<?php echo $CONFIG->wwwroot . "admin/statistics/"; ?>"><?php echo elgg_echo('admin:statistics:opt:linktext'); ?></a></p> +</div> diff --git a/views/default/admin/statistics.php b/views/default/admin/statistics.php index ad9356276..d8e2bd276 100644 --- a/views/default/admin/statistics.php +++ b/views/default/admin/statistics.php @@ -12,5 +12,57 @@ global $CONFIG; + echo "<p>" . nl2br(elgg_echo("admin:statistics:description")) . "</p>"; + + + + // Get entity statistics + $entity_stats = get_entity_statistics(); + + // Work out number of users + $users_stats = get_number_users(); + + // users online + $users_online = get_number_online(); + + -?>
\ No newline at end of file +?> +<div id="basic_site_statistics"> + <h2><?php echo elgg_echo('admin:statistics:label:basic'); ?></h2> + <table> + <tr> + <td><b><?php echo elgg_echo('admin:statistics:label:numusers'); ?> :</b></td> + <td><?php echo $users_stats; ?></td> + </tr> + <tr> + <td><b><?php echo elgg_echo('admin:statistics:label:numonline'); ?> :</b></td> + <td><?php echo $users_online; ?></td> + </tr> + </table> + + <h2><?php echo elgg_echo('admin:statistics:label:numentities'); ?></h2> + <table> + <?php + foreach ($entity_stats as $k => $entry) + { + echo "<table>"; + foreach ($entry as $a => $b) + { + if ($a == "__base__") + $a=$k; + else + $a = "$k $a"; + echo <<< END + <tr> + <td><b>$a :</b></td> + <td>$b</td> + </tr> +END; + } + echo "</table>"; + } + ?> + </table> + +</div>
\ No newline at end of file |