From 5acc09d792cce96dc265627a3abaadce90bc84c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 Oct 2007 19:43:41 +0000 Subject: [PATCH] Conditionne sur option affichage des courriers --- htdocs/docsoc.php | 69 +++++++++++++++++++++++---------------------- mysql/data/data.sql | 4 +++ 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/htdocs/docsoc.php b/htdocs/docsoc.php index 3ce8fff3422..b1474d2cca4 100644 --- a/htdocs/docsoc.php +++ b/htdocs/docsoc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -184,45 +184,48 @@ if ($socid > 0) // Courriers // Les courriers sont des documents speciaux generes par des scripts // Voir Rodo - $filearray=array(); - $errorlevel=error_reporting(); - error_reporting(0); - $handle=opendir($courrier_dir); - error_reporting($errorlevel); - if ($handle) + if ($conf->global->SOCIETE_NOLIST_COURRIER) { - $i=0; - while (($file = readdir($handle))!==false) + $filearray=array(); + $errorlevel=error_reporting(); + error_reporting(0); + $handle=opendir($courrier_dir); + error_reporting($errorlevel); + if ($handle) + { + $i=0; + while (($file = readdir($handle))!==false) + { + if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') + { + $filearray[$i]=$file; + $i++; + } + } + closedir($handle); + } + + print ''; + print ''; + + $var=true; + foreach($filearray as $key => $file) { if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') { - $filearray[$i]=$file; - $i++; + $var=!$var; + print "\n"; + + print ''; + print ''; + print "\n"; } } - closedir($handle); - } - - print '
'.$langs->trans("Courriers").''.$langs->trans("Size").''.$langs->trans("Date").'
"; + $loc = "courrier/".get_exdir($socid); + echo ''.$file.''; + print "'.filesize($courrier_dir."/".$file). ' '.$langs->trans("bytes").''.dolibarr_print_date(filemtime($courrier_dir."/".$file),"dayhour").'
'; - print ''; - - $var=true; - foreach($filearray as $key => $file) - { - if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') - { - $var=!$var; - print "\n"; - - print ''; - print ''; - print "\n"; - } + print "
'.$langs->trans("Courriers").''.$langs->trans("Size").''.$langs->trans("Date").'
"; - $loc = "courrier/".get_exdir($socid); - echo ''.$file.''; - print "'.filesize($courrier_dir."/".$file). ' '.$langs->trans("bytes").''.dolibarr_print_date(filemtime($courrier_dir."/".$file),"dayhour").'
"; } - print ""; } else { diff --git a/mysql/data/data.sql b/mysql/data/data.sql index b12dbdb8b91..ea3279a9f0d 100644 --- a/mysql/data/data.sql +++ b/mysql/data/data.sql @@ -59,6 +59,7 @@ insert into llx_action_def (rowid,code,titre,description,objet_type) values (3,' insert into llx_const (name, value, type, note, visible) values ('MAIN_NOT_INSTALLED','1','chaine','Setup is running',1); insert into llx_const (name, value, type, note, visible) values ('MAIN_MONNAIE','EUR','chaine','Monnaie',0); + insert into llx_const (name, value, type, note, visible) values ('MAIN_MAIL_SMTP_SERVER','','chaine','Host or ip address for SMTP server',1); insert into llx_const (name, value, type, note, visible) values ('MAIN_MAIL_SMTP_PORT','','chaine','Port for SMTP server',1); insert into llx_const (name, value, type, note, visible) values ('MAIN_MAIL_EMAIL_FROM','dolibarr-robot@domain.com','chaine','EMail emetteur pour les emails automatiques Dolibarr',1); @@ -71,6 +72,9 @@ insert into llx_const(name,value,type,visible,note) values('MAIN_FASTSEARCH_COMP insert into llx_const(name,value,type,visible,note) values('MAIN_FASTSEARCH_CONTACT','1','yesno',0,'Show form for quick contact search'); insert into llx_const(name,value,type,visible,note) values('MAIN_FASTSEARCH_PRODUCT','1','yesno',0,'Show form for quick product search'); +insert into llx_const(name,value,type,visible,note) values('SOCIETE_NOLIST_COURRIER','1','yesno',0,'Liste les fichiers du repertoire courrier'); + + -- -- IHM --