From 24d5295a9d5124243d9de2f5fd629450a65122a4 Mon Sep 17 00:00:00 2001 From: seek3r Date: Mon, 25 Sep 2000 20:47:40 +0000 Subject: [PATCH] switched to a new distributed pref and admin which allow add-on apps to have their settings put into the main screens --- admin/deleteaccount.php | 12 ++++++---- admin/inc/admin.inc.php | 2 +- admin/index.php | 49 +++++++++++++++++++++++++++++++-------- admin/viewheadline.php | 51 ----------------------------------------- 4 files changed, 47 insertions(+), 67 deletions(-) delete mode 100755 admin/viewheadline.php diff --git a/admin/deleteaccount.php b/admin/deleteaccount.php index 20e4833f96..ff2541ce32 100755 --- a/admin/deleteaccount.php +++ b/admin/deleteaccount.php @@ -78,8 +78,8 @@ $phpgw->db->query("delete from webcal_entry_user where cal_login='$lid'"); $phpgw->db->query("delete from preferences where owner='$lid'"); - $phpgw->db->query("delete from todo where owner='$lid'"); - $phpgw->db->query("delete from addressbook where owner='$lid'"); + $phpgw->db->query("delete from todo where todo_owner='$lid'"); + $phpgw->db->query("delete from addressbook where ab_owner='$lid'"); $phpgw->db->query("delete from accounts where loginid='$lid'"); //$phpgw->db->query("delete from users_headlines where owner='$lid'"); //$phpgw->db->query("delete from profiles where owner='$lid'"); @@ -88,9 +88,11 @@ $sep = $phpgw->common->filesystem_separator(); - $basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "users" - . $sep; + //$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "users" + // . $sep; + $basedir = $phpgw_info["server"]["files_dir"] . $sep . "users" . $sep; +//echo "

rmdir:".$basedir . $lid."

\n"; if (! @rmdir($basedir . $lid)) { $cd = 34; } else { @@ -99,4 +101,4 @@ Header("Location: " . $phpgw->link("accounts.php","cd=$cd")); } -?> \ No newline at end of file +?> diff --git a/admin/inc/admin.inc.php b/admin/inc/admin.inc.php index a78c8dcdbc..41a41fc6a8 100644 --- a/admin/inc/admin.inc.php +++ b/admin/inc/admin.inc.php @@ -45,4 +45,4 @@ section_end(); } -?> \ No newline at end of file +?> diff --git a/admin/index.php b/admin/index.php index af854a3a35..0f17db4252 100755 --- a/admin/index.php +++ b/admin/index.php @@ -3,6 +3,8 @@ * phpGroupWare - administration * * http://www.phpgroupware.org * * Written by Joseph Engo * + * Modified by Stephen Brown * + * to distribute admin across the application directories * * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * @@ -16,17 +18,44 @@ include("../header.inc.php"); check_code($cd); -?> -

-
" . lang("User accounts"); ?> -
" . lang("User groups"); ?> -
" . lang("Applications"); ?> -

" . lang("View sessions"); ?> -
" . lang("View Access Log"); ?> -

" . lang("Headline Sites"); ?> -

" . lang("Network News"); ?> -\n"; + echo ""; + if ($icon != "") { + echo "[Icon]"; + echo "".lang($name).""; + } else { + echo "$name"; + } + echo "\n"; + echo "\n"; + } + function section_end() { + echo "\n\n"; + } + + // We only want to list applications that are enabled, plus the common stuff + // (if they can get to the admin page, the admin app is enabled, hence it is shown) + + $phpgw->db->query("select app_name from applications where app_enabled = 1 order by app_title"); + + // Stuff it in an array in the off chance the admin includes need the db + while ($phpgw->db->next_record() ) { + $apps[] = $phpgw->db->f("app_name"); + } + + for( $i =0; $i < sizeof($apps); $i++) { + $appname = $apps[$i]; + $f = $phpgw_info["server"]["server_root"] . "/" . $appname . "/inc/admin.inc.php"; + if (file_exists($f)) { + include($f); + echo "

\n"; + } + } + if ( $SHOW_INFO > 0 ) { echo "

link($PHP_SELF, "SHOW_INFO=0")."\">Hide PHP Information"; echo "


\n"; diff --git a/admin/viewheadline.php b/admin/viewheadline.php deleted file mode 100755 index eed040fb1c..0000000000 --- a/admin/viewheadline.php +++ /dev/null @@ -1,51 +0,0 @@ - * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ - - $phpgw_info["flags"]["currentapp"] = "admin"; - - include("../header.inc.php"); - if (! $con) - Header("Location: ".$phpgw->link("headlines.php")); - - $phpgw->db->query("select * from news_site where con=$con"); - $phpgw->db->next_record(); - - ?> -
- - - - - - - - -db->query("select title,link from news_headlines where site=$con"); - - if ($phpgw->db->num_rows() <> 0) { - echo ""; - while($phpgw->db->next_record()) { -?> - - -
db->f("display"); ?>
db->f("base_url"); ?>
db->f("newsfile"); ?>
common->show_date($phpgw->db->f("lastread")); ?>
db->f("cachetime"); ?>
db->f("listings"); ?>
db->f("newstype"); ?>






" target="_new">db->f("title") ?>
-
- -