From 224caa51545c4c901f61cddd25d850e29029e61a Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 27 Aug 2003 11:44:00 +0000 Subject: [PATCH] Nettoyage du code --- htdocs/admin/pre.inc.php | 10 +--- htdocs/admin/system/index.php | 48 +++++++++++++++++ htdocs/admin/{ => system}/phpinfo.php | 0 .../admin/{mysql.php => system/pre.inc.php} | 51 ++++++++++--------- 4 files changed, 75 insertions(+), 34 deletions(-) create mode 100644 htdocs/admin/system/index.php rename htdocs/admin/{ => system}/phpinfo.php (100%) rename htdocs/admin/{mysql.php => system/pre.inc.php} (57%) diff --git a/htdocs/admin/pre.inc.php b/htdocs/admin/pre.inc.php index 4332a602492..f86e9959867 100644 --- a/htdocs/admin/pre.inc.php +++ b/htdocs/admin/pre.inc.php @@ -70,8 +70,6 @@ function llxHeader($head = "", $urlp = "") { $menu->add_submenu("constall.php", "Tout voir"); - $menu->add("mysql.php", "Mysql"); - //$menu->add_submenu("sqltables.php", "Tables"); if ($conf->boutique->enabled) @@ -84,13 +82,7 @@ function llxHeader($head = "", $urlp = "") { } } - $menu->add("phpinfo.php", "phpinfo"); - - $menu->add_submenu("phpinfo.php?what=conf", "Conf"); - - $menu->add_submenu("phpinfo.php?what=env", "Env"); - - $menu->add_submenu("phpinfo.php?what=modules", "Modules"); + $menu->add("system/", "system"); left_menu($menu->liste); } diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php new file mode 100644 index 00000000000..509776aec7c --- /dev/null +++ b/htdocs/admin/system/index.php @@ -0,0 +1,48 @@ + + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + */ +require("./pre.inc.php"); + +llxHeader(); + +print_titre("Configuration Dolibarr (version ".DOL_VERSION.")"); + +print ''; +print ''; +print ''; +print "\n"; + +print ''; +print ''; +print ''; +print ''; + + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print '
NomValeurAction
Version' . DOL_VERSION . ' 
css' . $conf->css . ' 
theme' . $conf->theme . ' 
document root' . DOL_DOCUMENT_ROOT . ' 
Database
type' . $conf->db->type . ' 
host' . $conf->db->host . ' 
user' . $conf->db->user . '  
pass' . $conf->db->pass . '  
Database name' . $conf->db->name . ' 
'; + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/admin/phpinfo.php b/htdocs/admin/system/phpinfo.php similarity index 100% rename from htdocs/admin/phpinfo.php rename to htdocs/admin/system/phpinfo.php diff --git a/htdocs/admin/mysql.php b/htdocs/admin/system/pre.inc.php similarity index 57% rename from htdocs/admin/mysql.php rename to htdocs/admin/system/pre.inc.php index 3d14734de85..68eb74f3d8b 100644 --- a/htdocs/admin/mysql.php +++ b/htdocs/admin/system/pre.inc.php @@ -18,39 +18,40 @@ * $Id$ * $Source$ */ -require("./pre.inc.php"); +require("../../main.inc.php3"); -llxHeader(); +function llxHeader($head = "", $urlp = "") { -print_titre("Configuration Mysql"); + /* + * + * + */ + top_menu($head); -print ''; + $menu = new Menu(); -$sql = "SHOW VARIABLES"; + $menu->add("index.php", "System"); + $menu->add_submenu("../modules.php", "Modules"); -$result = $db->query($sql); -if ($result) -{ - $num = $db->num_rows(); - - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; + $menu->add("mysql.php", "Mysql"); - print ''; - print ''; + $menu->add("pear.php", "Pear"); - $i++; + $menu->add("phpinfo.php", "phpinfo"); + + $menu->add_submenu("phpinfo.php?what=conf", "Conf"); + + $menu->add_submenu("phpinfo.php?what=env", "Env"); + + $menu->add_submenu("phpinfo.php?what=modules", "Modules"); + + if ($user->admin) + { + $menu->add(DOL_URL_ROOT."/admin/", "Configuration"); } + + + left_menu($menu->liste); } -print '
'.$objp->Variable_name.''.$objp->Value.'
'; - - - - -llxFooter(); ?>