From 0c732d6f7f952f0359904bbb752f94aff3d98d98 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 14 Oct 2009 21:09:47 +0000 Subject: Standardized admin/* git-svn-id: http://code.elgg.org/elgg/trunk@3543 36083f99-b078-4883-b0ff-0f9b5a30f544 --- admin/index.php | 31 +++++++++------------ admin/plugins.php | 51 +++++++++++++++++---------------- admin/site.php | 37 +++++++++++------------- admin/statistics.php | 38 ++++++++++++------------- admin/user.php | 79 ++++++++++++++++++++++++---------------------------- 5 files changed, 111 insertions(+), 125 deletions(-) diff --git a/admin/index.php b/admin/index.php index 98466cb20..4ee190213 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,21 +1,16 @@ \ No newline at end of file +// Make sure only valid admin users can see this +admin_gatekeeper(); +forward('pg/admin/statistics/'); \ No newline at end of file diff --git a/admin/plugins.php b/admin/plugins.php index 9900c98e9..7c452ad2d 100644 --- a/admin/plugins.php +++ b/admin/plugins.php @@ -1,28 +1,31 @@ get_installed_plugins())))); - -?> \ No newline at end of file +// Set admin user for user block +//set_page_owner($_SESSION['guid']); + +// Regenerate plugin list +regenerate_plugin_list(); + +// Display main admin menu +$vars = array('installed_plugins' => get_installed_plugins()); + +$title = elgg_view_title(elgg_echo('admin:plugins')); +$main_box = elgg_view("admin/plugins", $vars); +$content = elgg_view_layout("two_column_left_sidebar", '', $title . $main_box); + +page_draw(elgg_echo('admin:plugins'), $content); \ No newline at end of file diff --git a/admin/site.php b/admin/site.php index c66dc290a..5e0f2a6a0 100644 --- a/admin/site.php +++ b/admin/site.php @@ -1,26 +1,23 @@ \ No newline at end of file +page_draw(elgg_echo("admin:site"), $content); \ No newline at end of file diff --git a/admin/statistics.php b/admin/statistics.php index 19c6a2731..b71f64ef7 100644 --- a/admin/statistics.php +++ b/admin/statistics.php @@ -1,25 +1,23 @@ +page_draw(elgg_echo("admin:statistics"), $content); \ No newline at end of file diff --git a/admin/user.php b/admin/user.php index a95bb69ce..47c3786de 100644 --- a/admin/user.php +++ b/admin/user.php @@ -1,45 +1,38 @@ +// Get the Elgg framework +require_once(dirname(dirname(__FILE__)) . "/engine/start.php"); + +// Make sure only valid admin users can see this +admin_gatekeeper(); + +// Are we performing a search +$search = get_input('s'); +$limit = get_input('limit', 10); +$offset = get_input('offset', 0); + +$context = get_context(); + +$title = elgg_view_title(elgg_echo('admin:user')); + +set_context('search'); + +$result = list_entities('user', '', 0, $limit, false); + +set_context('admin'); + +// Display main admin menu +page_draw(elgg_echo("admin:user"), + elgg_view_layout("two_column_left_sidebar", + '', + $title . elgg_view("admin/user") . $result + ) +); -- cgit v1.2.3