Qual: Toutes les gnrations d'images se font dans un rpertoire nomm $conf->module->dir_images. Cela rend uniforme le code qui des fois utilisait des chemins en dir, des fois document avec s et des fois sans.

Toutes les images sont dornavant dans htdocs/images.
This commit is contained in:
Laurent Destailleur 2004-12-04 19:07:24 +00:00
parent 5e8b546e1a
commit 77ed5884da
9 changed files with 188 additions and 104 deletions

View File

@ -20,21 +20,29 @@
* $Source$
*
*/
/**
\file htdocs/comm/propal/stats/index.php
\ingroup propale
\brief Page des stats propositions commerciales
\version $Revision$
*/
require("./pre.inc.php");
require("./propalestats.class.php");
llxHeader();
/*
*
*
*/
print_fiche_titre('Statistiques propositions commerciales', $mesg);
$stats = new PropaleStats($db);
$year = strftime("%Y", time());
$data = $stats->getNbByMonthWithPrevYear($year);
$filev = "/document/images/nbpropale2year-$year.png";
if (! is_dir($conf->propale->dir_images)) { mkdir($conf->propale->dir_images); }
$filename = $conf->propale->dir_images."/nbpropale2year-$year.png";
$fileurl = $conf->propale->url_images."/nbpropale2year-$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -43,8 +51,7 @@ if (! $mesg) {
$px->SetLegend(array($year - 1, $year));
$px->SetWidth(450);
$px->SetHeight(280);
$px->draw(DOL_DOCUMENT_ROOT.$filev, $data, $year);
$px->draw($filename, $data, $year);
}
$sql = "SELECT count(*), date_format(datep,'%Y') as dm, sum(price) FROM ".MAIN_DB_PREFIX."propal WHERE fk_statut > 0 GROUP BY dm DESC ";
@ -52,12 +59,12 @@ if ($db->query($sql))
{
$num = $db->num_rows();
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">Année</td><td width="10%">Nb de proposition</td><td align="center">Somme des propositions</td>';
print '<td align="center" valign="top" rowspan="'.($num + 1).'">';
print 'Nombre de proposition par mois<br>';
if ($mesg) { print "$mesg"; }
else { print '<img src="'.DOL_URL_ROOT.$filev.'" alt="Graphique nombre de commande">'; }
else { print '<img src="'.$fileurl.'" alt="Nombre de proposition par mois">'; }
print '</td></tr>';
$i = 0;
while ($i < $num)

View File

@ -21,6 +21,13 @@
*
*/
/**
\file htdocs/comm/propal/stats/month.php
\ingroup propale
\brief Page des stats propositions commerciales par mois
\version $Revision$
*/
require("./pre.inc.php");
require("./propalestats.class.php");
@ -29,7 +36,7 @@ llxHeader();
$year = isset($_GET["year"])?$_GET["year"]:date("Y",time());
$mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> ';
$mesg.= "Année $year";
$mesg.= $langs->trans("Year")." $year";
$mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
/*
@ -39,12 +46,13 @@ $mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
print_fiche_titre('Statistiques des propositions commerciales', $mesg);
$dir = DOL_DOCUMENT_ROOT;
$stats = new PropaleStats($db);
$data = $stats->getNbByMonth($year);
$filev = "/document/images/propale$year.png";
if (! is_dir($conf->propale->dir_images)) { mkdir($conf->propale->dir_images); }
$filename = $conf->propale->dir_images."/propale$year.png";
$fileurl = $conf->propale->url_images."/propale$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -52,8 +60,7 @@ if (! $mesg) {
$px->SetMaxValue($px->GetMaxValue());
$px->SetWidth(500);
$px->SetHeight(280);
$px->draw($dir.$filev, $data, $year);
$px->draw($filename, $data, $year);
}
$res = $stats->getAmountByMonth($year);
@ -65,17 +72,17 @@ for ($i = 1 ; $i < 13 ; $i++)
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
}
$file_amount = "/document/images/propalamount$year.png";
$filename_amount = $conf->propale->dir_images."/propaleamount$year.png";
$fileurl_amount = $conf->propale->url_images."/propaleamount$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
if (! $mesg) {
$px->SetYLabel("Montant");
$px->SetYLabel($langs->trans("AmountTotal"));
$px->SetMaxValue($px->GetAmountMaxValue());
$px->SetWidth(500);
$px->SetHeight(250);
$px->draw($dir.$file_amount, $data, $year);
$px->draw($filename_amount, $data, $year);
}
$res = $stats->getAverageByMonth($year);
@ -85,33 +92,35 @@ for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
}
$file_avg = "/document/images/propalaverage$year.png";
$filename_avg = $conf->propale->dir_images."/propalaverage$year.png";
$fileurl_avg = $conf->propale->url_images."/propalaverage$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
if (! $mesg) {
$px->SetYLabel("Montant moyen");
$px->SetYLabel($langs->trans("AmountAverage"));
$px->SetMaxValue($px->GetAmountMaxValue());
$px->SetWidth(500);
$px->SetHeight(250);
$px->draw($dir.$file_avg, $data, $year);
$px->draw($filename_avg, $data, $year);
}
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">Nombre par mois</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$filev.'">'; }
else { print '<img src="'.$fileurl.'">'; }
print '</td></tr>';
print '<tr><td align="center">Sommes</td>';
print '<tr><td align="center">'.$langs->trans("AmountTotal").'</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$file_amount.'">'; }
else { print '<img src="'.$fileurl_amount.'">'; }
print '</td></tr>';
print '<tr><td align="center">Montant moyen</td>';
print '<tr><td align="center">'.$langs->trans("AmountAverage").'</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$file_avg.'">'; }
else { print '<img src="'.$fileurl_avg.'">'; }
print '</td></tr></table>';
$db->close();

View File

@ -20,6 +20,15 @@
* $Source$
*
*/
/**
\file htdocs/commande/stats/index.php
\ingroup commande
\brief Page des stats commandes
\version $Revision$
*/
require("./pre.inc.php");
require("../commande.class.php");
require("./commandestats.class.php");
@ -44,7 +53,11 @@ $stats = new CommandeStats($db, $socidp);
$year = strftime("%Y", time());
$data = $stats->getNbCommandeByMonthWithPrevYear($year);
$filev = "/document/images/nbcommande2year.png";
if (! is_dir($conf->commande->dir_images)) { mkdir($conf->commande->dir_images); }
$filename = $conf->commande->dir_images."/nbcommande2year-$year.png";
$fileurl = $conf->commande->url_images."/nbcommande2year-$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -53,17 +66,17 @@ if (! $mesg) {
$px->SetWidth(450);
$px->SetHeight(280);
$px->SetYLabel("Nombre de commande");
$px->draw(DOL_DOCUMENT_ROOT.$filev, $data, $year);
$px->draw($filename, $data, $year);
}
$rows = $stats->getNbByYear();
$num = sizeof($rows);
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<tr><td align="center">Année</td><td width="10%">Nb de commande</td><td align="center">Somme des commandes</td>';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="10%">Nb de commande</td><td align="center">Somme des commandes</td>';
print '<td align="center" valign="top" rowspan="'.($num + 1).'">';
print 'Nombre de commande par mois<br>';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$filev.'" alt="Graphique nombre de commande">'; }
else { print '<img src="'.$fileurl.'" alt="Nombre de commande par mois">'; }
print '</td></tr>';
$i = 0;
while (list($key, $value) = each ($rows))

View File

@ -20,6 +20,14 @@
* $Source$
*
*/
/**
\file htdocs/commande/stats/month.php
\ingroup commande
\brief Page des stats commandes par mois
\version $Revision$
*/
require("./pre.inc.php");
require("../commande.class.php");
require("./commandestats.class.php");
@ -38,7 +46,7 @@ llxHeader();
$year = isset($_GET["year"])?$_GET["year"]:date("Y",time());
$mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> ';
$mesg.= "Année $year";
$mesg.= $langs->trans("Year")." $year";
$mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
/*
@ -48,12 +56,13 @@ $mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
print_fiche_titre('Statistiques commandes', $mesg);
$dir = DOL_DOCUMENT_ROOT;
$stats = new CommandeStats($db, $socidp);
$data = $stats->getNbCommandeByMonth($year);
$filev = "/document/images/commande$year.png";
if (! is_dir($conf->commande->dir_images)) { mkdir($conf->commande->dir_images); }
$filename = $conf->commande->dir_images."/commande$year.png";
$fileurl = $conf->commande->url_images."/commande$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -62,7 +71,7 @@ if (! $mesg) {
$px->SetWidth(500);
$px->SetHeight(280);
$px->SetYLabel("Nombre de commande");
$px->draw($dir.$filev, $data, $year);
$px->draw($filename, $data, $year);
}
$res = $stats->getCommandeAmountByMonth($year);
@ -74,7 +83,8 @@ for ($i = 1 ; $i < 13 ; $i++)
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
}
$file_amount = "/document/images/commandeamount.png";
$filename_amount = $conf->commande->dir_images."/commandeamount$year.png";
$fileurl_amount = $conf->commande->url_images."/commandeamount$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -82,8 +92,8 @@ if (! $mesg) {
$px->SetMaxValue($px->GetAmountMaxValue());
$px->SetWidth(500);
$px->SetHeight(250);
$px->SetYLabel("Montant des commande");
$px->draw($dir.$file_amount, $data, $year);
$px->SetYLabel($langs->trans("AmountTotal"));
$px->draw($filename_amount, $data, $year);
}
$res = $stats->getCommandeAverageByMonth($year);
@ -93,32 +103,35 @@ for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
}
$file_avg = "/document/images/commandeaverage.png";
$filename_avg = $conf->commande->dir_images."/commandeaverage$year.png";
$fileurl_avg = $conf->commande->url_images."/commandeaverage$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
if (! $mesg) {
$px->SetMaxValue($px->GetAmountMaxValue());
$px->SetWidth(500);
$px->SetHeight(250);
$px->SetYLabel("Montant moyen des commande");
$px->draw($dir.$file_avg, $data, $year);
$px->SetYLabel($langs->trans("AmountAverage"));
$px->draw($filename_avg, $data, $year);
}
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">Nombre de commande par mois</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$filev.'">'; }
else { print '<img src="'.$fileurl.'">'; }
print '</td></tr>';
print '<tr><td align="center">Sommes des commandes</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$file_amount.'">'; }
else { print '<img src="'.$fileurl_amount.'">'; }
print '</td></tr>';
print '<tr><td align="center">Montant moyen des commande</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$file_avg.'">'; }
else { print '<img src="'.$fileurl_avg.'">'; }
print '</td></tr></table>';
$db->close();

View File

@ -20,7 +20,16 @@
* $Source$
*
*/
/**
\file htdocs/compta/facture/stats/index.php
\ingroup facture
\brief Page des stats factures
\version $Revision$
*/
require("./pre.inc.php");
/*
* Sécurité accés client
*/
@ -31,17 +40,17 @@ if ($user->societe_id > 0)
}
llxHeader();
/*
*
*
*/
print_fiche_titre('Statistiques factures', $mesg);
$stats = new FactureStats($db, $socidp);
$year = strftime("%Y", time());
$data = $stats->getNbByMonthWithPrevYear($year);
$filev = "/document/images/nbfacture2year-$year.png";
if (! is_dir($conf->facture->dir_images)) { mkdir($conf->facture->dir_images); }
$filename = $conf->facture->dir_images."/nbfacture2year-$year.png";
$fileurl = $conf->facture->url_images."/nbfacture2year-$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -50,7 +59,7 @@ if (! $mesg) {
$px->SetLegend(array($year - 1, $year));
$px->SetWidth(450);
$px->SetHeight(280);
$px->draw(DOL_DOCUMENT_ROOT.$filev, $data, $year);
$px->draw($filename, $data, $year);
}
$sql = "SELECT count(*), date_format(datef,'%Y') as dm, sum(total) FROM ".MAIN_DB_PREFIX."facture WHERE fk_statut > 0 ";
@ -63,12 +72,12 @@ if ($db->query($sql))
{
$num = $db->num_rows();
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<tr><td align="center">Année</td><td width="10%">Nb de facture</td><td align="center">Somme des factures</td>';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="10%">Nb de facture</td><td align="center">Somme des factures</td>';
print '<td align="center" valign="top" rowspan="'.($num + 1).'">';
print 'Nombre de facture par mois<br>';
print 'Nombre de factures par mois<br>';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$filev.'" alt="Graphique nombre de commande">'; }
else { print '<img src="'.$fileurl.'" alt="Nombre de factures par mois">'; }
print '</td></tr>';
$i = 0;
while ($i < $num)
@ -86,7 +95,7 @@ if ($db->query($sql))
}
else
{
print "Erreur : $sql";
dolibarr_print_error($db);
}

View File

@ -21,6 +21,13 @@
*
*/
/**
\file htdocs/compta/facture/stats/month.php
\ingroup facture
\brief Page des stats factures par mois
\version $Revision$
*/
require("./pre.inc.php");
/*
@ -37,23 +44,18 @@ llxHeader();
$year = isset($_GET["year"])?$_GET["year"]:date("Y",time());
$mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> ';
$mesg.= "Année $year";
$mesg.= $langs->trans("Year")." $year";
$mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
/*
*
*
*/
print_fiche_titre('Statistiques des factures '.$year, $mesg);
$dir = DOL_DOCUMENT_ROOT;
$stats = new FactureStats($db, $socidp);
$data = $stats->getNbByMonth($year);
$filev = "/document/images/facture$year.png";
if (! is_dir($conf->facture->dir_images)) { mkdir($conf->facture->dir_images); }
$filename = $conf->facture->dir_images."/facture$year.png";
$fileurl = $conf->facture->url_images."/facture$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
@ -61,7 +63,7 @@ if (! $mesg) {
$px->SetMaxValue($px->GetMaxValue());
$px->SetWidth(500);
$px->SetHeight(280);
$px->draw($dir.$filev, $data, $year);
$px->draw($filename, $data, $year);
}
$res = $stats->getAmountByMonth($year);
@ -73,16 +75,17 @@ for ($i = 1 ; $i < 13 ; $i++)
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
}
$file_amount = "/document/images/factureamount$year.png";
$filename_amount = $conf->facture->dir_images."/factureamount$year.png";
$fileurl_amount = $conf->facture->url_images."/factureamount$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
if (! $mesg) {
$px->SetYLabel("Montant");
$px->SetYLabel($langs->trans("AmountTotal"));
$px->SetMaxValue($px->GetAmountMaxValue());
$px->SetWidth(500);
$px->SetHeight(250);
$px->draw($dir.$file_amount, $data, $year);
$px->draw($filename_amount, $data, $year);
}
$res = $stats->getAverageByMonth($year);
@ -92,32 +95,35 @@ for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
}
$file_avg = "/document/images/factureaverage$year.png";
$filename_avg = $conf->facture->dir_images."/factureaverage$year.png";
$fileurl_avg = $conf->facture->url_images."/factureaverage$year.png";
$px = new BarGraph($data);
$mesg = $px->isGraphKo();
if (! $mesg) {
$px->SetYLabel("Montant moyen");
$px->SetYLabel($langs->trans("AmountAverage"));
$px->SetMaxValue($px->GetAmountMaxValue());
$px->SetWidth(500);
$px->SetHeight(250);
$px->draw($dir.$file_avg, $data, $year);
$px->draw($filename_avg, $data, $year);
}
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">Nombre par mois</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$filev.'">'; }
else { print '<img src="'.$fileurl.'">'; }
print '</td></tr>';
print '<tr><td align="center">Sommes</td>';
print '<tr><td align="center">'.$langs->trans("AmountTotal").'</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$file_amount.'">'; }
else { print '<img src="'.$fileurl_amount.'">'; }
print '</td></tr>';
print '<tr><td align="center">Montant moyen</td>';
print '<tr><td align="center">'.$langs->trans("AmountAverage").'</td>';
print '<td align="center">';
if ($mesg) { print $mesg; }
else { print '<img src="'.DOL_URL_ROOT.$file_avg.'">'; }
else { print '<img src="'.$fileurl_avg.'">'; }
print '</td></tr></table>';
$db->close();

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -19,19 +20,23 @@
* $Source$
*
*/
/**
\file htdocs/expedition/stats/index.php
\ingroup expedition
\brief Page des stats expeditions
\version $Revision$
*/
require("./pre.inc.php");
require("../expedition.class.php");
llxHeader();
/*
*
*
*/
print_fiche_titre('Statistiques expéditions', $mesg);
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<tr><td align="center">Année</td><td width="40%" align="center">Nb d\'expédition</td></tr>';
print '<table class="border" width="100%">';
print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="40%" align="center">Nb d\'expédition</td></tr>';
$sql = "SELECT count(*), date_format(date_expedition,'%Y') as dm FROM ".MAIN_DB_PREFIX."expedition WHERE fk_statut > 0 GROUP BY dm DESC ";
if ($db->query($sql))

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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,6 +21,13 @@
*
*/
/**
\file htdocs/expedition/stats/month.php
\ingroup commande
\brief Page des stats expeditions par mois
\version $Revision$
*/
require("./pre.inc.php");
require("../expedition.class.php");
require("./expeditionstats.class.php");
@ -28,31 +36,26 @@ llxHeader();
$mesg = '';
/*
*
*
*/
print_fiche_titre('Statistiques expeditions '.$_GET["year"], $mesg);
$stats = new ExpeditionStats($db);
$dir = DOL_DOCUMENT_ROOT;
$data = $stats->getNbExpeditionByMonth($_GET["year"]);
$filev = "/document/images/expedition-".$_GET["year"].".png";
if (! is_dir($conf->expedition->dir_images)) { mkdir($conf->expedition->dir_images); }
$filename = $conf->expedition->dir_images."/expedition$year.png";
$fileurl = $conf->expedition->url_images."/expedition$year.png";
$px = new BarGraph($data);
$px->SetMaxValue($px->GetMaxValue());
$px->SetWidth(600);
$px->SetHeight(280);
$px->draw($dir.$filev, $data, $_GET["year"]);
$px->draw($filename, $data, $_GET["year"]);
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td align="center">Nombre d\'expédition par mois</td>';
print '<td align="center">';
print '<img src="'.DOL_URL_ROOT.$filev.'">';
print '<img src="'.$fileurl.'">';
print '</td></tr>';
print '</table>';

View File

@ -170,10 +170,16 @@ if (defined("MAIN_MODULE_EXTERNALRSS"))
if (defined("MAIN_MODULE_COMMANDE"))
{
$conf->commande->enabled=MAIN_MODULE_COMMANDE;
$conf->commande->dir_ouput=DOL_DATA_ROOT."/documents/commande";
$conf->commande->dir_images=DOL_DOCUMENT_ROOT."/images/commande";
$conf->commande->url_images=DOL_URL_ROOT."/images/commande";
}
if (defined("MAIN_MODULE_EXPEDITION"))
{
$conf->expedition->enabled=MAIN_MODULE_EXPEDITION;
$conf->expedition->dir_ouput=DOL_DATA_ROOT."/documents/expedition";
$conf->expedition->dir_images=DOL_DOCUMENT_ROOT."/images/expedition";
$conf->expedition->url_images=DOL_URL_ROOT."/images/expedition";
}
if (defined("MAIN_MODULE_SOCIETE"))
{
@ -205,8 +211,8 @@ if (defined("MAIN_MODULE_FOURNISSEUR"))
}
if (defined("MAIN_MODULE_FICHEINTER"))
{
require (DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.php");
$conf->fichinter->enabled=MAIN_MODULE_FICHEINTER;
require (DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.php");
}
if (defined("MAIN_MODULE_ADHERENT"))
{
@ -215,10 +221,16 @@ if (defined("MAIN_MODULE_ADHERENT"))
if (defined("MAIN_MODULE_PRODUIT"))
{
$conf->produit->enabled=MAIN_MODULE_PRODUIT;
$conf->produit->dir_ouput=DOL_DATA_ROOT."/documents/produit";
$conf->produit->dir_images=DOL_DOCUMENT_ROOT."/images/produit";
$conf->produit->url_images=DOL_URL_ROOT."/images/produit";
}
if (defined("MAIN_MODULE_SERVICE"))
{
$conf->service->enabled=MAIN_MODULE_SERVICE;
$conf->service->dir_ouput=DOL_DATA_ROOT."/documents/produit";
$conf->service->dir_images=DOL_DOCUMENT_ROOT."/images/produit";
$conf->service->url_images=DOL_URL_ROOT."/images/produit";
}
if (defined("MAIN_MODULE_STOCK"))
{
@ -269,16 +281,23 @@ if (defined("MAIN_MODULE_FACTURE"))
{
$conf->facture->enabled=MAIN_MODULE_FACTURE;
require (DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
$conf->facture->dir_ouput=DOL_DATA_ROOT."/documents/facture";
$conf->facture->dir_images=DOL_DOCUMENT_ROOT."/images/facture";
$conf->facture->url_images=DOL_URL_ROOT."/images/facture";
}
if (defined("MAIN_MODULE_PROPALE"))
{
$conf->propal->enabled=MAIN_MODULE_PROPALE;
require (DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
$conf->propale->dir_ouput=DOL_DATA_ROOT."/documents/propale";
$conf->propale->dir_images=DOL_DOCUMENT_ROOT."/images/propale";
$conf->propale->url_images=DOL_URL_ROOT."/images/propale";
// \todo a virer car remplacé par $conf->propale->dir_ouput
if (! defined("PROPALE_OUTPUTDIR"))
{
define('PROPALE_OUTPUTDIR', DOL_DOCUMENT_ROOT . "/document/propale/");
define('PROPALE_OUTPUTDIR', DOL_DOCUMENT_ROOT . "/document/propale");
$conf->propale->dir_ouput=DOL_DOCUMENT_ROOT . "/document/propale";
}
if (! defined("PROPALE_OUTPUT_URL"))
{