From b9efa1824cae48f14a7f69829d0fa1cbcb625133 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani <acianfa@free.fr> Date: Wed, 8 Feb 2006 15:00:49 +0000 Subject: [PATCH] ajout constantes pour export php --- htdocs/admin/commande.php | 62 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 86460d4d70e..73086b1287c 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -68,7 +68,10 @@ if ($_GET["action"] == 'setmod') $commande_addon_var = $_GET["value"]; } } - +if ($_GET["action"] == 'setpdf') +{ + if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF",$_GET["value"])) $commande_addon_var_pdf = $_GET["value"]; +} $dir = "../includes/modules/commande/"; @@ -131,6 +134,63 @@ if ($handle) print '</table>'; +/* + * PDF + */ +print '<br>'; +print_titre("Mod�les de commande pdf"); + +print '<table class="noborder" width="100%">'; +print '<tr class="liste_titre">'; +print '<td>'.$langs->trans("Name").'</td>'; +print '<td>'.$langs->trans("Description").'</td>'; +print '<td align="center" width="60">'.$langs->trans("Activated").'</td>'; +print '<td align="center" width="60">'.$langs->trans("Default").'</td>'; +print "</tr>\n"; + +clearstatcache(); + +$handle=opendir($dir); + +$var=True; +while (($file = readdir($handle))!==false) +{ + if (eregi('\.modules\.php$',$file) && substr($file,0,4) == 'pdf_') + { + $var = !$var; + $name = substr($file, 4, strlen($file) -16); + $classname = substr($file, 0, strlen($file) -12); + + print '<tr '.$bc[$var].'><td width="100">'; + echo "$name"; + print "</td><td>\n"; + require_once($dir.$file); + $obj = new $classname($db); + + print $obj->description; + + print '</td><td align="center">'; + + if ($commande_addon_var_pdf == "$name") + { + print ' '; + print '</td><td align="center">'; + print img_tick(); + } + else + { + print ' '; + // print $commande_addon_var_pdf."iii"; + print '</td><td align="center">'; + print '<a href="commande.php?action=setpdf&value='.$name.'">'.$langs->trans("Default").'</a>'; + } + print "</td></tr>\n"; + + } +} +closedir($handle); + +print '</table>'; llxFooter('$Date$ - $Revision$'); ?> -- GitLab