diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 98b7e7e23b7..26a95c84b0e 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -25,16 +25,18 @@ if (!$user->admin) accessforbidden(); -if ($HTTP_POST_VARS["action"] == 'update') +if ($_POST["action"] == 'update') { - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$HTTP_POST_VARS["nom"]); - dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$HTTP_POST_VARS["tva"]); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"]); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"]); + dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]); - Header("Location: $PHP_SELF"); + Header("Location: index.php"); } llxHeader(); +$form = new Form($db); print_titre("Configuration générale (Dolibarr version ".DOL_VERSION.")"); @@ -42,7 +44,7 @@ print "
\n"; if ($_GET["action"] == 'edit') { - print '
'; + print ''; print ''; print ''; @@ -51,6 +53,11 @@ if ($_GET["action"] == 'edit') print ''; + print ''; + + print ''; @@ -64,12 +71,17 @@ else print '
Nom de la société/association'; print '
Pays de la société'; + print $form->select_pays(MAIN_INFO_SOCIETE_PAYS); + print '
Numéro de tva intracommunautaire'; print '
'; print ''; print ''; + + print ''; + print ''; print '
Informations sur la société/associationValeur
Nom de la société/association' . MAIN_INFO_SOCIETE_NOM . '
Pays de la société'; + print $form->pays_name(MAIN_INFO_SOCIETE_PAYS); + print '
Numéro de tva intracommunautaire' . MAIN_INFO_TVAINTRA . '

'; print '
'; - print 'Editer'; + print 'Editer'; print '
';