2004-10-19 18:58:50 +00:00
|
|
|
<?php
|
2005-09-13 09:28:43 +00:00
|
|
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2011-05-21 14:24:09 +00:00
|
|
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
2010-02-18 14:39:51 +00:00
|
|
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
2004-02-13 22:42:47 +00:00
|
|
|
*
|
|
|
|
|
* 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
|
2011-07-31 22:21:57 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2004-02-13 22:42:47 +00:00
|
|
|
*/
|
2004-08-29 12:01:58 +00:00
|
|
|
|
2005-01-01 19:48:22 +00:00
|
|
|
/**
|
2008-11-26 19:37:25 +00:00
|
|
|
* \file htdocs/admin/ihm.php
|
2009-09-29 17:14:52 +00:00
|
|
|
* \brief Page to setup GUI display options
|
2008-11-26 19:37:25 +00:00
|
|
|
*/
|
2004-08-29 12:01:58 +00:00
|
|
|
|
2010-03-01 09:20:41 +00:00
|
|
|
require("../main.inc.php");
|
2011-10-24 10:59:44 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/usergroups.lib.php");
|
2011-10-24 09:25:54 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
|
2011-10-24 08:45:06 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
|
2011-05-20 15:59:18 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php");
|
2010-05-03 08:22:35 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formadmin.class.php");
|
2004-02-13 22:42:47 +00:00
|
|
|
|
2004-09-04 10:11:17 +00:00
|
|
|
$langs->load("admin");
|
2010-02-18 14:39:51 +00:00
|
|
|
$langs->load("languages");
|
2008-01-07 02:03:22 +00:00
|
|
|
$langs->load("other");
|
2004-08-13 22:10:58 +00:00
|
|
|
|
2008-12-08 15:07:11 +00:00
|
|
|
$langs->load("companies");
|
|
|
|
|
$langs->load("products");
|
|
|
|
|
$langs->load("members");
|
|
|
|
|
|
2004-02-15 00:05:21 +00:00
|
|
|
if (!$user->admin)
|
2005-09-12 13:22:24 +00:00
|
|
|
accessforbidden();
|
2004-02-15 00:05:21 +00:00
|
|
|
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2005-08-11 18:51:38 +00:00
|
|
|
if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
|
|
|
|
|
2008-12-08 15:07:11 +00:00
|
|
|
// List of supported permanent search area
|
|
|
|
|
$searchform=array( "MAIN_SEARCHFORM_SOCIETE","MAIN_SEARCHFORM_CONTACT",
|
|
|
|
|
"MAIN_SEARCHFORM_PRODUITSERVICE","MAIN_SEARCHFORM_ADHERENT");
|
|
|
|
|
$searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,
|
|
|
|
|
$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE,$conf->global->MAIN_SEARCHFORM_ADHERENT);
|
|
|
|
|
$searchformtitle=array($langs->trans("Companies"),$langs->trans("Contacts"),
|
|
|
|
|
$langs->trans("ProductsAndServices"),$langs->trans("Members"));
|
2009-03-13 00:57:36 +00:00
|
|
|
$searchformmodule=array('Module1Name','Module1Name',
|
|
|
|
|
'Module50Name','Module310Name');
|
2004-08-13 22:10:58 +00:00
|
|
|
|
|
|
|
|
|
2005-08-11 18:51:38 +00:00
|
|
|
if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
2004-02-13 22:42:47 +00:00
|
|
|
{
|
2009-04-27 20:37:50 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
2011-08-10 23:48:09 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity);
|
2009-09-29 17:14:52 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
2010-01-13 11:22:26 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
2010-06-23 19:17:38 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
2009-11-02 18:53:26 +00:00
|
|
|
|
2009-04-27 20:37:50 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
|
|
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT",$_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity);
|
|
|
|
|
|
2009-05-13 19:52:36 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
2009-08-09 19:25:17 +00:00
|
|
|
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity);
|
|
|
|
|
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
|
|
|
|
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity);
|
|
|
|
|
|
2006-03-21 23:47:01 +00:00
|
|
|
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2007-04-10 19:21:22 +00:00
|
|
|
Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
2006-03-21 23:47:01 +00:00
|
|
|
exit;
|
2004-02-13 22:42:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-10-25 17:27:15 +00:00
|
|
|
/*
|
|
|
|
|
* View
|
|
|
|
|
*/
|
|
|
|
|
|
2009-11-02 18:53:26 +00:00
|
|
|
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
2010-05-26 11:42:29 +00:00
|
|
|
llxHeader('',$langs->trans("Setup"),$wikihelp);
|
2004-02-13 22:42:47 +00:00
|
|
|
|
2008-01-06 15:39:47 +00:00
|
|
|
$html=new Form($db);
|
2011-05-20 15:59:18 +00:00
|
|
|
$formother=new FormOther($db);
|
2008-10-25 17:27:15 +00:00
|
|
|
$formadmin=new FormAdmin($db);
|
2008-01-06 15:39:47 +00:00
|
|
|
|
2006-08-12 15:32:57 +00:00
|
|
|
print_fiche_titre($langs->trans("GUISetup"),'','setup');
|
2004-02-13 22:42:47 +00:00
|
|
|
|
2006-08-12 17:53:18 +00:00
|
|
|
print $langs->trans("DisplayDesc")."<br>\n";
|
|
|
|
|
print "<br>\n";
|
|
|
|
|
|
2004-02-13 22:42:47 +00:00
|
|
|
|
2009-09-29 17:14:52 +00:00
|
|
|
if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
2004-02-13 22:42:47 +00:00
|
|
|
{
|
2007-04-10 19:21:22 +00:00
|
|
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
2009-05-17 08:01:54 +00:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2005-09-26 01:09:14 +00:00
|
|
|
print '<input type="hidden" name="action" value="update">';
|
|
|
|
|
|
|
|
|
|
clearstatcache();
|
2005-04-25 22:55:49 +00:00
|
|
|
$var=true;
|
|
|
|
|
|
2010-09-15 08:36:13 +00:00
|
|
|
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
2009-11-02 18:53:26 +00:00
|
|
|
print '<table summary="edit" class="noborder" width="100%">';
|
2008-01-06 14:15:28 +00:00
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2005-04-25 22:55:49 +00:00
|
|
|
|
2010-07-15 21:15:51 +00:00
|
|
|
// Default language
|
2005-04-25 22:55:49 +00:00
|
|
|
$var=!$var;
|
2005-09-26 01:09:14 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
2010-09-14 20:42:17 +00:00
|
|
|
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,'main_lang_default',1);
|
2008-01-06 14:15:28 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2005-09-26 01:09:14 +00:00
|
|
|
|
2008-09-05 00:05:45 +00:00
|
|
|
// Multilangual GUI
|
2006-03-21 23:47:01 +00:00
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
2007-05-02 09:49:57 +00:00
|
|
|
print $html->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
|
2008-01-06 14:15:28 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2005-09-26 01:09:14 +00:00
|
|
|
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</table><br>'."\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Themes
|
|
|
|
|
show_theme('',1);
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Liste des zone de recherche permanantes supportees
|
|
|
|
|
print '<table summary="search" class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
|
|
|
|
|
$var=True;
|
|
|
|
|
foreach ($searchform as $key => $value)
|
|
|
|
|
{
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">';
|
|
|
|
|
print $html->selectyesno($searchform[$key],$searchformconst[$key],1);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
print '</table>';
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
// Other
|
|
|
|
|
print '<table summary="edit" class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
2010-01-13 11:22:26 +00:00
|
|
|
// Show logo
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableShowLogo").'</td><td>';
|
|
|
|
|
print $html->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1);
|
|
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Taille max des listes
|
2008-09-05 00:05:45 +00:00
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2008-01-07 02:03:22 +00:00
|
|
|
// Desactivation javascript et ajax
|
2005-09-26 01:09:14 +00:00
|
|
|
$var=!$var;
|
2006-09-16 13:19:13 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
2007-05-02 09:49:57 +00:00
|
|
|
print $html->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
|
2008-01-06 14:15:28 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2009-09-29 17:14:52 +00:00
|
|
|
// Activate preview tab on element card
|
2011-03-04 12:27:40 +00:00
|
|
|
if (class_exists("Imagick"))
|
2008-04-17 11:34:08 +00:00
|
|
|
{
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
|
|
|
|
print $html->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
|
|
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
}
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2009-09-29 17:14:52 +00:00
|
|
|
// First day for weeks
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
2011-05-20 15:59:18 +00:00
|
|
|
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'),'MAIN_START_WEEK',0);
|
2010-06-23 19:17:38 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Firstname/Name
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
2010-12-30 23:42:33 +00:00
|
|
|
$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"),1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
|
2010-06-23 19:17:38 +00:00
|
|
|
print $html->selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0));
|
2009-09-29 17:14:52 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2009-11-02 18:53:26 +00:00
|
|
|
|
2009-11-04 06:33:08 +00:00
|
|
|
// Hide helpcenter link on login page
|
2005-09-26 01:09:14 +00:00
|
|
|
$var=!$var;
|
2009-06-03 19:50:17 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
|
|
|
|
print $html->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
2009-11-04 06:33:08 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
2010-01-13 11:22:26 +00:00
|
|
|
|
2009-11-04 06:33:08 +00:00
|
|
|
// Hide wiki link on login page
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td>';
|
|
|
|
|
print $html->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
2009-06-03 19:50:17 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Message on login page
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
2010-09-02 18:51:47 +00:00
|
|
|
// Editeur wysiwyg
|
2011-10-24 07:29:17 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
2011-02-02 16:56:55 +00:00
|
|
|
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
2010-09-02 18:51:47 +00:00
|
|
|
$doleditor->Create();
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</td></tr>'."\n";
|
2007-04-30 08:12:38 +00:00
|
|
|
|
2009-06-03 19:50:17 +00:00
|
|
|
// Message of the day on home page
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
2011-10-24 07:29:17 +00:00
|
|
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
2011-02-02 16:56:55 +00:00
|
|
|
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
2010-09-02 18:51:47 +00:00
|
|
|
$doleditor->Create();
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</td></tr>'."\n";
|
2009-05-13 19:52:36 +00:00
|
|
|
|
2009-08-09 19:25:17 +00:00
|
|
|
/*
|
|
|
|
|
// Show bugtrack link
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
|
|
|
|
print $html->selectyesno('main_show_bugtrack_link',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
|
|
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
*/
|
|
|
|
|
|
2011-08-10 23:48:09 +00:00
|
|
|
print '</table>'."\n";
|
2005-09-26 01:09:14 +00:00
|
|
|
|
2010-09-15 08:36:13 +00:00
|
|
|
|
2005-09-26 01:09:14 +00:00
|
|
|
print '<br><center>';
|
|
|
|
|
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
|
|
|
|
print '</center>';
|
|
|
|
|
|
|
|
|
|
print '</form>';
|
|
|
|
|
print '<br>';
|
|
|
|
|
}
|
2009-09-29 17:14:52 +00:00
|
|
|
else // Show
|
2005-09-26 01:09:14 +00:00
|
|
|
{
|
|
|
|
|
$var=true;
|
|
|
|
|
|
2010-09-15 08:36:13 +00:00
|
|
|
// Language
|
|
|
|
|
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
2005-09-26 01:09:14 +00:00
|
|
|
print '<table class="noborder" width="100%">';
|
2008-01-06 15:39:47 +00:00
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
2005-09-26 01:09:14 +00:00
|
|
|
|
|
|
|
|
$var=!$var;
|
2010-02-27 10:11:00 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
|
|
|
|
$s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
|
|
|
|
|
print ($s?$s.' ':'');
|
|
|
|
|
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
|
|
|
|
print '</td>';
|
2010-07-15 21:15:51 +00:00
|
|
|
print '<td width="20">';
|
2010-08-02 19:10:04 +00:00
|
|
|
if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation",$conf->global->MAIN_LANG_DEFAULT),1);
|
2010-07-15 21:15:51 +00:00
|
|
|
print '</td>';
|
2008-01-06 15:39:47 +00:00
|
|
|
print "</tr>";
|
2005-09-26 01:09:14 +00:00
|
|
|
|
2005-04-25 22:55:49 +00:00
|
|
|
$var=!$var;
|
2008-01-06 15:39:47 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>' . yn($conf->global->MAIN_MULTILANGS) . '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print "</tr>";
|
2006-03-21 23:47:01 +00:00
|
|
|
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</table><br>'."\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Themes
|
|
|
|
|
show_theme('',0);
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Liste des zone de recherches permanentes supportees
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td><td> </td></tr>';
|
|
|
|
|
$var=true;
|
|
|
|
|
foreach ($searchform as $key => $value)
|
|
|
|
|
{
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td>'.yn($searchformconst[$key]).'</td>';
|
|
|
|
|
print '<td align="left">'.$langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key]));
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
print '</table>';
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Other
|
|
|
|
|
$var=true;
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
|
|
|
|
|
2006-03-21 23:47:01 +00:00
|
|
|
$var=!$var;
|
2010-09-15 08:36:13 +00:00
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
2010-01-13 11:22:26 +00:00
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print "</tr>";
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
2008-01-06 15:39:47 +00:00
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print "</tr>";
|
2004-07-26 12:31:16 +00:00
|
|
|
|
2008-01-07 02:03:22 +00:00
|
|
|
// Disable javascript/ajax
|
2005-09-24 22:11:04 +00:00
|
|
|
$var=!$var;
|
2009-01-31 02:55:32 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
2008-01-06 15:39:47 +00:00
|
|
|
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td>";
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print "</tr>";
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2009-09-29 17:14:52 +00:00
|
|
|
// Activate preview tab on element card
|
2011-03-04 12:27:40 +00:00
|
|
|
if (class_exists("Imagick"))
|
2008-04-17 11:34:08 +00:00
|
|
|
{
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
|
|
|
|
print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0)."</td>";
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print "</tr>";
|
|
|
|
|
}
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2009-09-29 17:14:52 +00:00
|
|
|
// First day for weeks
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
2009-11-04 06:55:51 +00:00
|
|
|
print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'));
|
2009-09-29 17:14:52 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
2010-06-23 19:17:38 +00:00
|
|
|
// Firstname / Name position
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
2010-12-30 23:42:33 +00:00
|
|
|
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print $langs->trans("Firstname").' '.$langs->trans("Lastname"); }
|
|
|
|
|
else { print $langs->trans("Lastname").' '.$langs->trans("Firstname"); }
|
2010-06-23 19:17:38 +00:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
2009-06-03 19:50:17 +00:00
|
|
|
// Link to help center
|
2005-08-11 18:51:38 +00:00
|
|
|
$var=!$var;
|
2010-09-15 08:36:13 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td colspan="2">';
|
2009-08-07 00:49:43 +00:00
|
|
|
print yn($conf->global->MAIN_HELPCENTER_DISABLELINK,1);
|
2006-09-17 19:19:34 +00:00
|
|
|
print '</td></tr>';
|
2010-01-13 11:22:26 +00:00
|
|
|
|
2009-11-04 06:33:08 +00:00
|
|
|
// Link to wiki help
|
|
|
|
|
$var=!$var;
|
2010-09-15 08:36:13 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td colspan="2">';
|
2009-11-04 06:33:08 +00:00
|
|
|
print yn($conf->global->MAIN_HELP_DISABLELINK,1);
|
|
|
|
|
print '</td></tr>';
|
2009-01-31 02:55:32 +00:00
|
|
|
|
2009-06-03 19:50:17 +00:00
|
|
|
// Message login
|
2007-04-30 08:12:38 +00:00
|
|
|
$var=!$var;
|
2010-09-15 08:36:13 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
2011-06-14 23:30:12 +00:00
|
|
|
print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</td></tr>'."\n";
|
2009-05-13 19:52:36 +00:00
|
|
|
|
2009-06-03 19:50:17 +00:00
|
|
|
// Message of the day
|
2009-05-13 19:52:36 +00:00
|
|
|
$var=!$var;
|
2010-09-15 08:36:13 +00:00
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
2011-06-14 23:30:12 +00:00
|
|
|
print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</td></tr>'."\n";
|
2009-05-13 19:52:36 +00:00
|
|
|
|
2009-08-09 19:25:17 +00:00
|
|
|
/*
|
|
|
|
|
// Show bugtrack link
|
|
|
|
|
$var=!$var;
|
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
|
|
|
|
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
|
|
|
|
|
print '<td width="20"> </td>';
|
|
|
|
|
print "</tr>";
|
|
|
|
|
*/
|
|
|
|
|
|
2010-09-15 08:36:13 +00:00
|
|
|
print '</table>'."\n";
|
2005-04-25 22:55:49 +00:00
|
|
|
|
|
|
|
|
print '<div class="tabsAction">';
|
2008-01-10 23:59:58 +00:00
|
|
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
2005-04-25 22:55:49 +00:00
|
|
|
print '</div>';
|
2007-08-08 13:51:07 +00:00
|
|
|
print '<br>';
|
2004-02-13 22:42:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-08-12 17:53:18 +00:00
|
|
|
$db->close();
|
|
|
|
|
|
2011-08-27 14:24:16 +00:00
|
|
|
llxFooter();
|
2004-02-13 22:42:47 +00:00
|
|
|
?>
|