diff --git a/htdocs/docsoc.php b/htdocs/docsoc.php index 6ce100a6ef1..dc6aa1f912e 100644 --- a/htdocs/docsoc.php +++ b/htdocs/docsoc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2004 Rodolphe Quiedeville * * 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 @@ -35,15 +35,13 @@ if (! is_dir($upload_dir)) } } -if ( $sendit ) +if ( $sendit && defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1) { if (is_dir($upload_dir)) { - if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'])) { - $mesg = "Le fichier est valide, et a été téléchargé - avec succès.\n"; + $mesg = "Le fichier est valide, et a été téléchargé avec succès.\n"; //print_r($_FILES); } else @@ -122,29 +120,30 @@ if ($socid > 0) $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; $head[$h][1] = 'Notifications'; - dolibarr_fiche_head($head, $a); - + dolibarr_fiche_head($head, $a); /* * */ - print "\n"; - - print ""; - print ""; - print ""; - print "
Documents associés à l'entreprise : $societe->nom
id\">Commercialid\">Compta
"; + print_titre("Documents associés à l'entreprise : $societe->nom"); /* * * */ - - echo '
'; - print ''; - print ''; - print '
'; - print ''; - print '
'; - print '
'; + if (defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1) + { + echo '
'; + print ''; + print ''; + print '
'; + print ''; + print '
'; + print '
'; + } + else + { + print "La gestion des fichiers associés est désactivé sur ce serveur"; + } + print ''; print $mesg; @@ -154,9 +153,7 @@ if ($socid > 0) if ($handle) { - print ''; - while (($file = readdir($handle))!==false) { if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')