mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Toutes les images gnres ou non (stats, photo utilisateurs) sont affiches travers le wrapper viewimage.php qui fonctionne sur le mme principe que le wrapper document.php pour les documents. Il permet de vrifier les droits.
This commit is contained in:
parent
0fb7b7d104
commit
b2cdc1bc76
|
|
@ -33,7 +33,7 @@ require("./propalestats.class.php");
|
|||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre('Statistiques propositions commerciales', $mesg);
|
||||
print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg);
|
||||
|
||||
$stats = new PropaleStats($db);
|
||||
$year = strftime("%Y", time());
|
||||
|
|
@ -42,7 +42,7 @@ $data = $stats->getNbByMonthWithPrevYear($year);
|
|||
if (! is_dir($conf->propal->dir_images)) { mkdir($conf->propal->dir_images); }
|
||||
|
||||
$filename = $conf->propal->dir_images."/nbpropale2year-$year.png";
|
||||
$fileurl = $conf->propal->url_images."/nbpropale2year-$year.png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=nbpropale2year-'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
|
|
@ -60,9 +60,8 @@ if ($db->query($sql))
|
|||
$num = $db->num_rows();
|
||||
|
||||
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 '<tr><td align="center">'.$langs->trans("Year").'</td><td width="10%" align="center">'.$langs->trans("NbOfProposals").'</td><td align="center">'.$langs->trans("AmountTotal").'</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="'.$fileurl.'" alt="Nombre de proposition par mois">'; }
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -39,27 +39,30 @@ $mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> ';
|
|||
$mesg.= $langs->trans("Year")." $year";
|
||||
$mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
|
||||
|
||||
$WIDTH=500;
|
||||
$HEIGHT=250;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print_fiche_titre('Statistiques des propositions commerciales', $mesg);
|
||||
print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg);
|
||||
|
||||
$stats = new PropaleStats($db);
|
||||
$data = $stats->getNbByMonth($year);
|
||||
|
||||
if (! is_dir($conf->propal->dir_images)) { mkdir($conf->propal->dir_images); }
|
||||
|
||||
$filename = $conf->propal->dir_images."/propale$year.png";
|
||||
$fileurl = $conf->propal->url_images."/propale$year.png";
|
||||
$filename = $conf->propal->dir_images."/propale".$year.".png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propale'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetMaxValue($px->GetMaxValue());
|
||||
$px->SetWidth(500);
|
||||
$px->SetHeight(280);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->draw($filename, $data, $year);
|
||||
}
|
||||
|
||||
|
|
@ -72,16 +75,16 @@ for ($i = 1 ; $i < 13 ; $i++)
|
|||
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_amount = $conf->propal->dir_images."/propaleamount$year.png";
|
||||
$fileurl_amount = $conf->propal->url_images."/propaleamount$year.png";
|
||||
$filename_amount = $conf->propal->dir_images."/propaleamount".$year.".png";
|
||||
$fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propaleamount'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetYLabel($langs->trans("AmountTotal"));
|
||||
$px->SetMaxValue($px->GetAmountMaxValue());
|
||||
$px->SetWidth(500);
|
||||
$px->SetHeight(250);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->draw($filename_amount, $data, $year);
|
||||
}
|
||||
$res = $stats->getAverageByMonth($year);
|
||||
|
|
@ -92,22 +95,21 @@ for ($i = 1 ; $i < 13 ; $i++)
|
|||
{
|
||||
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_avg = $conf->propal->dir_images."/propalaverage$year.png";
|
||||
$fileurl_avg = $conf->propal->url_images."/propalaverage$year.png";
|
||||
$filename_avg = $conf->propal->dir_images."/propaleaverage".$year.".png";
|
||||
$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propaleaverage'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetYLabel($langs->trans("AmountAverage"));
|
||||
$px->SetMaxValue($px->GetAmountMaxValue());
|
||||
$px->SetWidth(500);
|
||||
$px->SetHeight(250);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->draw($filename_avg, $data, $year);
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print '<tr><td align="center">Nombre par mois</td>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td align="center">'.$langs->trans("NumberOfProposalsByMonth").'</td>';
|
||||
print '<td align="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else { print '<img src="'.$fileurl.'">'; }
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ llxHeader();
|
|||
*
|
||||
*/
|
||||
|
||||
print_fiche_titre('Statistiques commandes', $mesg);
|
||||
print_fiche_titre($langs->trans("OrdersStatistics"), $mesg);
|
||||
|
||||
$stats = new CommandeStats($db, $socidp);
|
||||
|
||||
|
|
@ -56,8 +56,8 @@ $data = $stats->getNbCommandeByMonthWithPrevYear($year);
|
|||
|
||||
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";
|
||||
$filename = $conf->commande->dir_images."/nbcommande2year-".$year.".png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=nbcommande2year-'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
|
|
@ -71,10 +71,9 @@ if (! $mesg) {
|
|||
$rows = $stats->getNbByYear();
|
||||
$num = sizeof($rows);
|
||||
|
||||
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 '<table class="border" width="100%">';
|
||||
print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="10%" align="center">'.$langs->trans("NbOfOrders").'</td><td align="center">'.$langs->trans("AmountTotal").'</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="'.$fileurl.'" alt="Nombre de commande par mois">'; }
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -49,27 +49,30 @@ $mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> ';
|
|||
$mesg.= $langs->trans("Year")." $year";
|
||||
$mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>';
|
||||
|
||||
$WIDTH=500;
|
||||
$HEIGHT=250;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
print_fiche_titre('Statistiques commandes', $mesg);
|
||||
print_fiche_titre($langs->trans("OrdersStatistics"), $mesg);
|
||||
|
||||
$stats = new CommandeStats($db, $socidp);
|
||||
$data = $stats->getNbCommandeByMonth($year);
|
||||
|
||||
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";
|
||||
$filename = $conf->commande->dir_images."/commande".$year.".png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=commande'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetMaxValue($px->GetMaxValue());
|
||||
$px->SetWidth(500);
|
||||
$px->SetHeight(280);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->SetYLabel("Nombre de commande");
|
||||
$px->draw($filename, $data, $year);
|
||||
}
|
||||
|
|
@ -83,15 +86,15 @@ for ($i = 1 ; $i < 13 ; $i++)
|
|||
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_amount = $conf->commande->dir_images."/commandeamount$year.png";
|
||||
$fileurl_amount = $conf->commande->url_images."/commandeamount$year.png";
|
||||
$filename_amount = $conf->commande->dir_images."/commandeamount".$year.".png";
|
||||
$fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=commandeamount'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetMaxValue($px->GetAmountMaxValue());
|
||||
$px->SetWidth(500);
|
||||
$px->SetHeight(250);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->SetYLabel($langs->trans("AmountTotal"));
|
||||
$px->draw($filename_amount, $data, $year);
|
||||
}
|
||||
|
|
@ -104,31 +107,31 @@ for ($i = 1 ; $i < 13 ; $i++)
|
|||
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_avg = $conf->commande->dir_images."/commandeaverage$year.png";
|
||||
$fileurl_avg = $conf->commande->url_images."/commandeaverage$year.png";
|
||||
$filename_avg = $conf->commande->dir_images."/commandeaverage".$year.".png";
|
||||
$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=commandeaverage'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetMaxValue($px->GetAmountMaxValue());
|
||||
$px->SetWidth(500);
|
||||
$px->SetHeight(250);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->SetYLabel($langs->trans("AmountAverage"));
|
||||
$px->draw($filename_avg, $data, $year);
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print '<tr><td align="center">Nombre de commande par mois</td>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td align="center">'.$langs->trans("NumberOfOrdersByMonth").'</td>';
|
||||
print '<td align="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else { print '<img src="'.$fileurl.'">'; }
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center">Sommes des commandes</td>';
|
||||
print '<tr><td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else { print '<img src="'.$fileurl_amount.'">'; }
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center">Montant moyen des commande</td>';
|
||||
print '<tr><td align="center">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '<td align="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else { print '<img src="'.$fileurl_avg.'">'; }
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$WIDTH=500;
|
||||
$HEIGHT=250;
|
||||
|
||||
|
||||
/*
|
||||
* Sécurité accés client
|
||||
*/
|
||||
|
|
@ -49,16 +53,16 @@ $data = $stats->getNbByMonthWithPrevYear($year);
|
|||
|
||||
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";
|
||||
$filename = $conf->facture->dir_images."/nbfacture2year-".$year.".png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=nbfacture2year-'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
if (! $mesg) {
|
||||
$px->SetMaxValue($px->GetMaxValue());
|
||||
$px->SetLegend(array($year - 1, $year));
|
||||
$px->SetWidth(450);
|
||||
$px->SetHeight(280);
|
||||
$px->SetWidth($WIDTH);
|
||||
$px->SetHeight($HEIGHT);
|
||||
$px->draw($filename, $data, $year);
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +79,6 @@ if ($db->query($sql))
|
|||
print '<table class="border" width="100%">';
|
||||
print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="10%" align="center">'.$langs->trans("NumberOfBills").'</td><td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="center" valign="top" rowspan="'.($num + 1).'">';
|
||||
print $langs->trans("NumberOfBillsByMonth").'<br>';
|
||||
if ($mesg) { print $mesg; }
|
||||
else { print '<img src="'.$fileurl.'" alt="Nombre de factures par mois">'; }
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$GRAPHHEIGHT=240;
|
||||
$GRAPHHEIGHT=250;
|
||||
$GRAPHWIDTH=500;
|
||||
|
||||
/*
|
||||
|
|
@ -57,8 +57,8 @@ $data = $stats->getNbByMonth($year);
|
|||
|
||||
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";
|
||||
$filename = $conf->facture->dir_images."/facture".$year.".png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=facture'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
|
|
@ -78,8 +78,8 @@ for ($i = 1 ; $i < 13 ; $i++)
|
|||
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_amount = $conf->facture->dir_images."/factureamount$year.png";
|
||||
$fileurl_amount = $conf->facture->url_images."/factureamount$year.png";
|
||||
$filename_amount = $conf->facture->dir_images."/factureamount".$year.".png";
|
||||
$fileurl_amount = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=factureamount'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
|
|
@ -99,8 +99,8 @@ for ($i = 1 ; $i < 13 ; $i++)
|
|||
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_avg = $conf->facture->dir_images."/factureaverage$year.png";
|
||||
$fileurl_avg = $conf->facture->url_images."/factureaverage$year.png";
|
||||
$filename_avg = $conf->facture->dir_images."/factureaverage".$year.".png";
|
||||
$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=factureaverage'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$mesg = $px->isGraphKo();
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ $data = $stats->getNbExpeditionByMonth($_GET["year"]);
|
|||
|
||||
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";
|
||||
$filename = $conf->expedition->dir_images."/expedition".$year.".png";
|
||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=expeditionstats&file=expedition'.$year.'.png';
|
||||
|
||||
$px = new BarGraph($data);
|
||||
$px->SetMaxValue($px->GetMaxValue());
|
||||
|
|
@ -52,7 +52,7 @@ $px->SetWidth(600);
|
|||
$px->SetHeight(280);
|
||||
$px->draw($filename, $data, $_GET["year"]);
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td align="center">Nombre d\'expédition par mois</td>';
|
||||
print '<td align="center">';
|
||||
print '<img src="'.$fileurl.'">';
|
||||
|
|
|
|||
|
|
@ -15,4 +15,7 @@ RefuseOrder=Refuse order
|
|||
ApproveOrder=Accept order
|
||||
AddOrder=Add order
|
||||
LastOrders=Last %s orders
|
||||
AllOrders=All orders
|
||||
AllOrders=All orders
|
||||
NbOfOrders=Number of orders
|
||||
OrdersStatistics=Orders' statistics
|
||||
NumberOfOrdersByMonth=Number of orders by month
|
||||
|
|
@ -11,3 +11,6 @@ ConfirmDeleteProp=Are you sure you want to delete this commercial proposal ?
|
|||
LastPropals=Last %s proposals
|
||||
AllPropals=All proposals
|
||||
SearchAProposal=Search a proposal
|
||||
ProposalsStatistics=Commercial proposals' statistics
|
||||
NumberOfProposalsByMonth=Number by month
|
||||
NbOfProposals=Number of commercial proposals
|
||||
|
|
|
|||
|
|
@ -15,4 +15,7 @@ RefuseOrder=Refuser la commande
|
|||
ApproveOrder=Accepter la commande
|
||||
AddOrder=Créer commande
|
||||
LastOrders=Les %s dernieres commandes
|
||||
AllOrders=Toutes les commandes
|
||||
AllOrders=Toutes les commandes
|
||||
NbOfOrders=Nombre de commandes
|
||||
OrdersStatistics=Statistiques des commandes
|
||||
NumberOfOrdersByMonth=Nombre de commandes par mois
|
||||
|
|
@ -11,3 +11,6 @@ ConfirmDeleteProp=Etes-vous s
|
|||
LastPropals=Les %s dernieres propales
|
||||
AllPropals=Toutes les propales
|
||||
SearchAProposal=Rechercher une propale
|
||||
ProposalsStatistics=Statistiques des propositions commerciales
|
||||
NumberOfProposalsByMonth=Nombre par mois
|
||||
NbOfProposals=Nombre de propositions commerciales
|
||||
|
|
|
|||
|
|
@ -195,25 +195,22 @@ if (defined("MAIN_MODULE_EXTERNALRSS"))
|
|||
if (defined("MAIN_MODULE_COMMANDE"))
|
||||
{
|
||||
$conf->commande->enabled=MAIN_MODULE_COMMANDE;
|
||||
$conf->commande->dir_images=DOL_DOCUMENT_ROOT."/images/commande";
|
||||
$conf->commande->url_images=DOL_URL_ROOT."/images/commande";
|
||||
}
|
||||
$conf->commande->dir_output=DOL_DATA_ROOT."/commande";
|
||||
$conf->commande->dir_images=DOL_DATA_ROOT."/commande/images";
|
||||
if (defined("MAIN_MODULE_EXPEDITION"))
|
||||
{
|
||||
$conf->expedition->enabled=MAIN_MODULE_EXPEDITION;
|
||||
$conf->expedition->dir_images=DOL_DOCUMENT_ROOT."/images/expedition";
|
||||
$conf->expedition->url_images=DOL_URL_ROOT."/images/expedition";
|
||||
}
|
||||
$conf->expedition->dir_output=DOL_DATA_ROOT."/expedition";
|
||||
$conf->expedition->dir_images=DOL_DATA_ROOT."/expedition/images";
|
||||
if (defined("MAIN_MODULE_SOCIETE"))
|
||||
{
|
||||
$conf->societe->enabled=MAIN_MODULE_SOCIETE;
|
||||
$conf->societe->dir_images=DOL_DOCUMENT_ROOT."/images/societe";
|
||||
$conf->societe->url_images=DOL_URL_ROOT."/images/societe";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/societe.class.php");
|
||||
}
|
||||
$conf->societe->dir_output=DOL_DATA_ROOT."/societe";
|
||||
$conf->societe->dir_images=DOL_DATA_ROOT."/societe/images";
|
||||
if (defined(SOCIETE_OUTPUTDIR) && SOCIETE_OUTPUTDIR) { $conf->societe->dir_output=SOCIETE_OUTPUTDIR; } # Pour passer outre le rep par défaut
|
||||
if (defined("MAIN_MODULE_COMMERCIAL"))
|
||||
{
|
||||
|
|
@ -223,10 +220,9 @@ $conf->commercial->dir_output=DOL_DATA_ROOT."/rapport";
|
|||
if (defined("MAIN_MODULE_COMPTABILITE"))
|
||||
{
|
||||
$conf->compta->enabled=MAIN_MODULE_COMPTABILITE;
|
||||
$conf->compta->dir_images=DOL_DOCUMENT_ROOT."/images/rapport";
|
||||
$conf->compta->url_images=DOL_URL_ROOT."/images/rapport";
|
||||
}
|
||||
$conf->compta->dir_output=DOL_DATA_ROOT."/compta";
|
||||
$conf->compta->dir_images=DOL_DATA_ROOT."/compta/images";
|
||||
if (defined("MAIN_MODULE_BANQUE"))
|
||||
{
|
||||
$conf->banque->enabled=MAIN_MODULE_BANQUE;
|
||||
|
|
@ -246,11 +242,10 @@ if (defined("MAIN_MODULE_FOURNISSEUR"))
|
|||
if (defined("MAIN_MODULE_FICHEINTER"))
|
||||
{
|
||||
$conf->fichinter->enabled=MAIN_MODULE_FICHEINTER;
|
||||
$conf->fichinter->dir_images=DOL_DOCUMENT_ROOT."/images/ficheinter";
|
||||
$conf->fichinter->url_images=DOL_URL_ROOT."/images/ficheinter";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/modules_fichinter.php");
|
||||
}
|
||||
$conf->fichinter->dir_output=DOL_DATA_ROOT."/ficheinter";
|
||||
$conf->fichinter->dir_images=DOL_DATA_ROOT."/ficheinter/images";
|
||||
if (defined(FICHEINTER_OUTPUTDIR) && FICHEINTER_OUTPUTDIR) { $conf->fichinter->dir_output=FICHEINTER_OUTPUTDIR; } # Pour passer outre le rep par défaut
|
||||
if (defined("MAIN_MODULE_ADHERENT"))
|
||||
{
|
||||
|
|
@ -260,19 +255,17 @@ $conf->adherent->dir_output=DOL_DATA_ROOT."/adherent";
|
|||
if (defined("MAIN_MODULE_PRODUIT"))
|
||||
{
|
||||
$conf->produit->enabled=MAIN_MODULE_PRODUIT;
|
||||
$conf->produit->dir_images=DOL_DOCUMENT_ROOT."/images/produit";
|
||||
$conf->produit->url_images=DOL_URL_ROOT."/images/produit";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/product.class.php");
|
||||
}
|
||||
$conf->produit->dir_output=DOL_DATA_ROOT."/produit";
|
||||
$conf->produit->dir_images=DOL_DATA_ROOT."/produit/images";
|
||||
if (defined("MAIN_MODULE_SERVICE"))
|
||||
{
|
||||
$conf->service->enabled=MAIN_MODULE_SERVICE;
|
||||
$conf->service->dir_images=DOL_DOCUMENT_ROOT."/images/produit";
|
||||
$conf->service->url_images=DOL_URL_ROOT."/images/produit";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/product.class.php");
|
||||
}
|
||||
$conf->service->dir_output=DOL_DATA_ROOT."/produit";
|
||||
$conf->service->dir_images=DOL_DATA_ROOT."/produit/images";
|
||||
if (defined("MAIN_MODULE_STOCK"))
|
||||
{
|
||||
$conf->stock->enabled=MAIN_MODULE_STOCK;
|
||||
|
|
@ -308,17 +301,15 @@ if (defined("MAIN_MODULE_CLICKTODIAL"))
|
|||
if (defined("MAIN_MODULE_TELEPHONIE"))
|
||||
{
|
||||
$conf->telephonie->enabled=MAIN_MODULE_TELEPHONIE;
|
||||
$conf->telephonie->dir_images=DOL_DOCUMENT_ROOT."/images/telephonie";
|
||||
$conf->telephonie->url_images=DOL_URL_ROOT."/images/telephonie";
|
||||
}
|
||||
$conf->telephonie->dir_output=DOL_DATA_ROOT."/telephonie";
|
||||
$conf->telephonie->dir_images=DOL_DATA_ROOT."/telephonie/images";
|
||||
if (defined("MAIN_MODULE_PRELEVEMENT"))
|
||||
{
|
||||
$conf->prelevement->enabled=MAIN_MODULE_PRELEVEMENT;
|
||||
$conf->prelevement->dir_images=DOL_DOCUMENT_ROOT."/images/prelevement";
|
||||
$conf->prelevement->url_images=DOL_URL_ROOT."/images/prelevement";
|
||||
}
|
||||
$conf->prelevement->dir_output=DOL_DATA_ROOT."/prelevement";
|
||||
$conf->prelevement->dir_images=DOL_DATA_ROOT."/prelevement/images";
|
||||
if (defined("MAIN_MODULE_WEBCALENDAR"))
|
||||
{
|
||||
$conf->webcal->enabled=MAIN_MODULE_WEBCALENDAR;
|
||||
|
|
@ -332,17 +323,14 @@ if (defined("MAIN_MODULE_WEBCALENDAR"))
|
|||
if (defined("MAIN_MODULE_FACTURE"))
|
||||
{
|
||||
$conf->facture->enabled=MAIN_MODULE_FACTURE;
|
||||
$conf->facture->dir_images=DOL_DOCUMENT_ROOT."/images/facture";
|
||||
$conf->facture->url_images=DOL_URL_ROOT."/images/facture";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||
}
|
||||
$conf->facture->dir_output=DOL_DATA_ROOT."/facture";
|
||||
$conf->facture->dir_images=DOL_DATA_ROOT."/facture/images";
|
||||
if (defined(FAC_OUTPUTDIR) && FAC_OUTPUTDIR) { $conf->facture->dir_output=FAC_OUTPUTDIR; } # Pour passer outre le rep par défaut
|
||||
if (defined("MAIN_MODULE_PROPALE"))
|
||||
{
|
||||
$conf->propal->enabled=MAIN_MODULE_PROPALE;
|
||||
$conf->propal->dir_images=DOL_DOCUMENT_ROOT."/images/propale";
|
||||
$conf->propal->url_images=DOL_URL_ROOT."/images/propale";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||
if (!defined("PROPALE_NEW_FORM_NB_PRODUCT"))
|
||||
{
|
||||
|
|
@ -350,6 +338,7 @@ if (defined("MAIN_MODULE_PROPALE"))
|
|||
}
|
||||
}
|
||||
$conf->propal->dir_output=DOL_DATA_ROOT."/propale";
|
||||
$conf->propal->dir_images=DOL_DATA_ROOT."/propale/images";
|
||||
if (defined(PROPALE_OUTPUTDIR) && PROPALE_OUTPUTDIR) { $conf->propal->dir_output=PROPALE_OUTPUTDIR; } # Pour passer outre le rep par défaut
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/product/stats/fiche.php
|
||||
\ingroup product
|
||||
\brief Page des stats produits
|
||||
|
|
@ -174,12 +174,14 @@ if ($_GET["id"])
|
|||
print '<br><table class="border" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="50%" colspan="2" align="center">Nombre de ventes<br>sur les 12 derniers mois</td>';
|
||||
print '<td align="center" width="50%" colspan="2">Nombre de pièces vendues</td></tr>';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
|
||||
print '<img src="'.$conf->produit->url_images."/".$product->id.'/vente12mois.png" alt="Ventes sur les 12 derniers mois">';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
$file=$product->id.'/vente12mois.png';
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=productstats&file='.urlencode($file).'" alt="Ventes sur les 12 derniers mois">';
|
||||
|
||||
print '</td><td align="center" colspan="2">';
|
||||
print '<img src="'.$conf->produit->url_images."/".$product->id.'/vendu12mois.png" alt="Ventes sur les 12 derniers mois">';
|
||||
$file=$product->id.'/vendu12mois.png';
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=productstats&file='.urlencode($file).'" alt="Nombre de pièces vendues sur les 12 derniers mois">';
|
||||
|
||||
print '</td></tr><tr>';
|
||||
if (file_exists($filenbvente) && filemtime($filenbvente))
|
||||
|
|
@ -204,13 +206,13 @@ if ($_GET["id"])
|
|||
|
||||
print '<tr class="liste_titre"><td width="50%" colspan="2" align="center">Nombre de propositions commerciales<br>sur les 12 derniers mois</td>';
|
||||
print '<td align="center" width="50%" colspan="2">-</td></tr>';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
|
||||
print '<img src="'.$conf->produit->url_images."/".$product->id.'/'.$img_propal_name.'" alt="Propales sur les 12 derniers mois">';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
$file=$product->id.'/'.$img_propal_name;
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=productstats&file='.urlencode($file).'" alt="Nombre de propales sur les 12 derniers mois">';
|
||||
|
||||
print '</td><td align="center" colspan="2">TODO AUTRE GRAPHIQUE';
|
||||
|
||||
|
||||
|
||||
print '</td></tr><tr>';
|
||||
if (file_exists($filenbpropal) && filemtime($filenbpropal))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/** \file htdocs/viewimage.php
|
||||
\brief Wrapper permettant l'affichage de fichiers images Dolibarr
|
||||
\remarks L'appel est viewimage.php?file=pathrelatifdufichier&modulepart=repfichierconcerne
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require_once("main.inc.php");
|
||||
|
||||
|
|
@ -64,6 +69,61 @@ if ($modulepart)
|
|||
}
|
||||
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats propales
|
||||
if ($modulepart == 'propalstats')
|
||||
{
|
||||
$user->getrights('propale');
|
||||
if ($user->rights->propale->lire)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->propal->dir_images.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats commandes
|
||||
if ($modulepart == 'orderstats')
|
||||
{
|
||||
$user->getrights('commande');
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->commande->dir_images.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats commandes
|
||||
if ($modulepart == 'billstats')
|
||||
{
|
||||
$user->getrights('facture');
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->facture->dir_images.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats expeditions
|
||||
if ($modulepart == 'expeditionstats')
|
||||
{
|
||||
$user->getrights('expedition');
|
||||
if ($user->rights->expedition->lire)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->expedition->dir_images.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats produits
|
||||
if ($modulepart == 'productstats')
|
||||
{
|
||||
$user->getrights('produit');
|
||||
if ($user->rights->produit->lire)
|
||||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->produit->dir_images.'/'.$original_file;
|
||||
}
|
||||
}
|
||||
|
||||
// Limite accès si droits non corrects
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user