diff --git a/htdocs/admin/system/const.php b/htdocs/admin/const.php similarity index 81% rename from htdocs/admin/system/const.php rename to htdocs/admin/const.php index 298de50440d..d2a21308e95 100644 --- a/htdocs/admin/system/const.php +++ b/htdocs/admin/const.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -22,9 +23,10 @@ require("./pre.inc.php"); llxHeader(); -print_titre("Constantes de configuration Dolibarr"); +print_titre("Configuration autre (Dolibarr version ".DOL_VERSION.")"); //print_r(get_defined_constants()); +print "
\n"; print ''; print ''; @@ -43,9 +45,9 @@ if ($user->admin) { if (isset($HTTP_POST_VARS["consttype"]) && $HTTP_POST_VARS["consttype"] != ''){ - $sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."', type='".$typeconst[$HTTP_POST_VARS["consttype"]]."'"; + $sql = "REPLACE INTO llx_const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."', type='".$typeconst[$HTTP_POST_VARS["consttype"]]."'"; }else{ - $sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."'"; + $sql = "REPLACE INTO llx_const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."'"; } @@ -58,7 +60,7 @@ if ($user->admin) if ($action == 'delete') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE rowid='$rowid'"; + $sql = "DELETE FROM llx_const WHERE rowid='$rowid'"; $result = $db->query($sql); if (!$result) @@ -69,9 +71,9 @@ if ($user->admin) } if ($all==1){ - $sql = "SELECT rowid, name, value, type, note FROM ".MAIN_DB_PREFIX."const ORDER BY name ASC"; + $sql = "SELECT rowid, name, value, type, note FROM llx_const ORDER BY name ASC"; }else{ - $sql = "SELECT rowid, name, value, type, note FROM ".MAIN_DB_PREFIX."const WHERE visible = 1 ORDER BY name ASC"; + $sql = "SELECT rowid, name, value, type, note FROM llx_const WHERE visible = 1 ORDER BY name ASC"; } $result = $db->query($sql); if ($result) @@ -117,8 +119,8 @@ if ($result) print ''; print '\n"; print ''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php new file mode 100644 index 00000000000..b28e78be452 --- /dev/null +++ b/htdocs/admin/ihm.php @@ -0,0 +1,96 @@ + + * Copyright (C) 2004 Laurent Destailleur + * + * 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"); + +if ($HTTP_POST_VARS["action"] == 'update') +{ + dolibarr_set_const($db, "MAIN_THEME",$HTTP_POST_VARS["main_theme"]); + dolibarr_set_const($db, "SIZE_LISTE_LIMIT",$HTTP_POST_VARS["size_liste_limit"]); + + Header("Location: $PHP_SELF"); +} + + +llxHeader(); + +print_titre("Configuration IHM (Dolibarr version ".DOL_VERSION.")"); + +print "
\n"; + +if ($_GET["action"] == 'edit') +{ + print '
'; + print ''; + + print '
'; - print '
'; - print 'Delete'; + print '   '; + print ''.img_delete().''; print "
'; + print ''; + + print ''; + print ''; + + print ''; + + print ''; + print '
NomValeur
Thème
Longueur maximum des listes'; + print '
'; + print '
'; +} +else +{ + + print ''; + print ''; + print ''; + print ''; + print '
NomValeur
Thème' . MAIN_THEME . '
Longueur maximum des listes' . SIZE_LISTE_LIMIT . '

'; + + print '
'; + + print 'Editer'; + + print '
'; + + +} + + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?>