From fe05c9d6273fe456bdc63da71ac81967aea6e454 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 1 Jun 2006 16:59:49 +0000 Subject: [PATCH] Fix: mise en page --- htdocs/compta/commande/fiche.php | 36 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index a146469b96d..ed50ad388dd 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -512,32 +512,22 @@ if ($_GET["id"] > 0) } - print "
"; + print '
'; - /* - * Documents générés - * - */ - $file = $conf->facture->dir_output . "/" . $commande->ref . "/" . $commande->ref . ".pdf"; - $relativepath = $commande->ref."/".$commande->ref.".pdf"; + /* + * Documents générés + * + */ + $comref = sanitize_string($commande->ref); + $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf'; + $relativepath = $comref.'/'.$comref.'.pdf'; + $filedir = $conf->commande->dir_output . '/' . $comref; + $urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id; + $genallowed=$user->rights->commande->creer; + $delallowed=$user->rights->commande->supprimer; - $var=true; - - if (file_exists($file)) - { - print_titre($langs->trans("Documents")); - print ''; - - print ""; - print ''; - print ''; - print ''; - print ''; - - print "
".$langs->trans("Order")." PDF'.$commande->ref.'.pdf'.filesize($file). ' bytes'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'
\n"; - - } + $html->show_documents('commande',$comref,$filedir,$urlsource,$genallowed,$delallowed,$commande->modelpdf); /* * Liste des factures