From 0cadc4e68340e02e6b51c29a672db7bb92386fa7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 23 Dec 2000 15:13:34 +0000 Subject: - intermediate commit: some bugfixes, changes and some drastic changes to block and module support --- admin.php | 69 ++++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 29 deletions(-) (limited to 'admin.php') diff --git a/admin.php b/admin.php index b20e98efd..7fb758535 100644 --- a/admin.php +++ b/admin.php @@ -1,39 +1,50 @@ id || ($user->permissions != 1 && $user->id > 1)) exit(); -include "includes/admin.inc"; -include "includes/cron.inc"; - -// display admin header: -admin_header(); - -// generate administrator menu: -$handle = opendir("modules"); -while ($file = readdir($handle)) { - if ($filename = substr($file, 0, strpos($file, ".module"))) { - if ($filename == $mod) { - $output .= "$filename | "; - } - else { - include_once "modules/$filename.module"; - if ($module["cron"] && !cron_get($filename)) cron_set($filename, 172800); - if ($module["admin"]) $output .= "$filename | "; - } +include_once "includes/theme.inc"; +include_once "includes/cron.inc"; + +function admin_page($mod) { + global $repository, $menu, $modules; + + function module($name, $module) { + global $menu, $modules; + if ($module["admin"]) $output .= "$name | "; + $menu .= $output; } -} -closedir($handle); + + ?> + + + <? echo $site_name; ?> administration center + + +

Administration center

+ $output home
"; + module_iterate("module"); + + ?> +
home
+ + + + \ No newline at end of file +?> -- cgit v1.2.3