diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index b33a22903c1..13f49552dc0 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -21,9 +21,9 @@ */ /** - \file htdocs/admin/company.php - \brief Page d'accueil de l'espace administration/configuration - \version $Revision$ + \file htdocs/admin/company.php + \brief Page d'accueil de l'espace administration/configuration + \version $Revision$ */ require("./pre.inc.php"); @@ -48,28 +48,28 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"]); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"]); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"]); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["gencod"]); if ($_FILES["logo"]["tmp_name"]) - { + { if (eregi('([^\\\/:]+)$',$_FILES["logo"]["name"],$reg)) - { + { $original_file=$reg[1]; - + dolibarr_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file); - if (! is_dir($conf->societe->dir_logos)) - { - create_exdir($conf->societe->dir_logos); - } + if (! is_dir($conf->societe->dir_logos)) + { + create_exdir($conf->societe->dir_logos); + } if (doliMoveFileUpload($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file)) - { + { dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file); - } - else - { + } + else + { $message .= '
'.$langs->trans("ErrorFailedToSaveFile").'
'; - } - - } - } + } + } + } dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]); @@ -90,13 +90,11 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') if ($_GET["action"] == 'removelogo') { - $logofile=$conf->societe->dir_logos.'/'.$mysoc->logo; - @unlink($logofile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO"); + $logofile=$conf->societe->dir_logos.'/'.$mysoc->logo; + @unlink($logofile); + dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO"); } - - /* * Affichage page */ @@ -106,7 +104,6 @@ llxHeader(); $form = new Form($db); $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; - print_fiche_titre($langs->trans("CompanyFundation"),'','setup'); print $langs->trans("CompanyFundationDesc")."
\n"; @@ -115,12 +112,12 @@ print "
\n"; if ((isset($_GET["action"]) && $_GET["action"] == 'edit') || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) { - /** - * Edition des paramètres - */ - if ($conf->use_javascript) + /** + * Edition des paramètres + */ + if ($conf->use_javascript) { - print ' + print '