diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 52d85473faf..8f675dd216a 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -20,7 +20,7 @@ * $Source$ */ -/*! \file htdocs/comm/propal/document.php +/** \file htdocs/comm/propal/document.php \ingroup propale \brief Page de gestion des documents attachées à une proposition commerciale \version $Revision$ @@ -38,6 +38,7 @@ if (!$user->rights->propale->lire) llxHeader(); + function do_upload ($upload_dir) { global $local_file, $error_msg; @@ -61,13 +62,16 @@ function do_upload ($upload_dir) } -if ($id > 0) + + +if ($_GET["id"] > 0) { $propal = new Propal($db); - if ( $propal->fetch($id) ) + + if ($propal->fetch($_GET["id"])) { - $upload_dir = PROPALE_OUTPUTDIR . "/" . $propal->ref ; + $upload_dir = $conf->propal->dir_output . "/" . $propal->ref ; if ( $error_msg ) { @@ -85,20 +89,18 @@ if ($id > 0) do_upload ($upload_dir); } - /* - * - */ - print "\n"; + + print '
'; print ""; print "
Documents associés à la proposition : ".$propal->ref_url."
"; - echo '
'; + print ''; print ''; print '
'; - print ''; - print '
'; - print '
'; + print ''; + print '
'; + print '
'; clearstatcache(); @@ -106,14 +108,14 @@ if ($id > 0) if ($handle) { - print ''; + print '
'; while (($file = readdir($handle))!==false) { if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') { print '\n"; print ''; @@ -126,7 +128,7 @@ if ($id > 0) } else { - echo 'Supprimer'; + echo ''.$langs->trans("Delete").''; } print "\n"; }
'; - echo ''.$file.''; + echo ''.$file.''; print "'.filesize($upload_dir."/".$file). ' bytes