* 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$ */ /** \file htdocs/admin/ihm.php \brief Page de configuration du de l'interface homme machine \version $Revision$ */ require("./pre.inc.php"); $langs->load("companies"); $langs->load("products"); $langs->load("admin"); if (!$user->admin) accessforbidden(); // Liste des zone de recherche permanantes supportées $searchform=array("main_searchform_societe","main_searchform_contact","main_searchform_produitservice"); $searchformconst=array(MAIN_SEARCHFORM_SOCIETE,MAIN_SEARCHFORM_CONTACT,MAIN_SEARCHFORM_PRODUITSERVICE); $searchformtitle=array($langs->trans("Companies"),$langs->trans("Contacts"),$langs->trans("ProductsAndServices")); if ($_POST["action"] == 'update') { dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"]); dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"]); dolibarr_set_const($db, "MAIN_MENU_BARRELEFT", $_POST["main_menu_barreleft"]); dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"]); dolibarr_set_const($db, "SIZE_LISTE_LIMIT", $_POST["size_liste_limit"]); dolibarr_set_const($db, "MAIN_MOTD", trim($_POST["main_motd"])); dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT",$_POST["main_searchform_contact"]); dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE",$_POST["main_searchform_societe"]); dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE",$_POST["main_searchform_produitservice"]); Header("Location: ihm.php"); } llxHeader(); if (!defined("MAIN_MOTD") && strlen(trim(MAIN_MOTD))) { define("MAIN_MOTD",""); } print_titre($langs->trans("GUISetup")); print "
\n"; if ($_GET["action"] == 'edit') { print '
'; clearstatcache(); print ''; print ''; // Langue par defaut print ''; // Menu top print ''; print ''; // Menu left print ''; print ''; // Theme print ''; print ''; // Taille max des listes print ''; // Message of the day print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DefaultLanguage").''; $html=new Form($db); $html->select_lang(MAIN_LANG_DEFAULT,'main_lang_default'); print '
'.$langs->trans("MenuTopManager").''; print '
'.$langs->trans("MenuLeftManager").''; print '
'.$langs->trans("Skin").''; print ''; print '
'.$langs->trans("MaxSizeList").'
'.$langs->trans("MessageOfDay").'

'; // Liste des zone de recherche permanantes supportées print ''; print ''; $var=True; foreach ($searchform as $key => $value) { $var=!$var; print ''; } print '
'.$langs->trans("PermanentLeftSearchForm").''.$langs->trans("Activated").'
'.$searchformtitle[$key].''; $html->selectyesnonum($searchform[$key],$searchformconst[$key]); print '

'; print '
'; print ''; print '
'; print '
'; } else { print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DefaultLanguage").'' . MAIN_LANG_DEFAULT . '
'.$langs->trans("MenuTopManager").''; $filelib=eregi_replace('\.php$','',MAIN_MENU_BARRETOP); print $filelib; print '
'.$langs->trans("MenuLeftManager").''; $filelib=eregi_replace('\.php$','',MAIN_MENU_BARRELEFT); print $filelib; print '
'.$langs->trans("Skin").'' . MAIN_THEME . '
'.$langs->trans("MaxSizeList").'' . SIZE_LISTE_LIMIT . '
'.$langs->trans("MessageOfDay").'' . stripslashes(nl2br(MAIN_MOTD)) . '

'; // Liste des zone de recherche permanantes supportées print ''; print ''; $var=True; foreach ($searchform as $key => $value) { $var=!$var; print ''; } print '
'.$langs->trans("PermanentLeftSearchForm").''.$langs->trans("Activated").'
'.$searchformtitle[$key].'' . ($searchformconst[$key]?$langs->trans("yes"):$langs->trans("no")) . '

'; print '
'; print ''.$langs->trans("Edit").''; print '
'; } llxFooter("Dernière modification $Date$ révision $Revision$"); ?>