Correction répertoires images
This commit is contained in:
parent
75c76dea4f
commit
be8f80c2e0
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -21,11 +21,11 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/*!
|
||||||
\file htdocs/product/stats/fiche.php
|
\file htdocs/product/stats/fiche.php
|
||||||
\ingroup product
|
\ingroup product
|
||||||
\brief Page des stats produits
|
\brief Page des stats produits
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -37,7 +37,6 @@ $langs->load("bills");
|
|||||||
$types[0] = $langs->trans("Product");
|
$types[0] = $langs->trans("Product");
|
||||||
$types[1] = $langs->trans("Service");
|
$types[1] = $langs->trans("Service");
|
||||||
|
|
||||||
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -49,11 +48,10 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader('','Statistiques produits');
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -67,14 +65,17 @@ if ($_GET["id"])
|
|||||||
if ( $result )
|
if ( $result )
|
||||||
{
|
{
|
||||||
// Efface rep obsolete
|
// Efface rep obsolete
|
||||||
if(is_dir(DOL_DOCUMENT_ROOT."/document/produits"))
|
if(is_dir(DOL_DOCUMENT_ROOT."/document/produits"))
|
||||||
rmdir(DOL_DOCUMENT_ROOT."/document/produits");
|
rmdir(DOL_DOCUMENT_ROOT."/document/produits");
|
||||||
|
|
||||||
// Création répertoire pour images générées
|
// Création répertoire pour images générées
|
||||||
|
// TODO A CORRIGER
|
||||||
|
$conf->produit->dir_images = DOL_DATA_ROOT.'/graph/produits';
|
||||||
|
|
||||||
$dir = $conf->produit->dir_images."/".$product->id;
|
$dir = $conf->produit->dir_images."/".$product->id;
|
||||||
|
|
||||||
if (! file_exists($dir))
|
if (! file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|
||||||
umask(0);
|
umask(0);
|
||||||
if(!file_exists($conf->produit->dir_images)) {
|
if(!file_exists($conf->produit->dir_images)) {
|
||||||
mkdir($conf->produit->dir_images);
|
mkdir($conf->produit->dir_images);
|
||||||
@ -120,14 +121,14 @@ if ($_GET["id"])
|
|||||||
$head[$h][1] = $langs->trans("Price");
|
$head[$h][1] = $langs->trans("Price");
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if($product->type == 0)
|
if($product->type == 0)
|
||||||
{
|
{
|
||||||
if ($conf->stock->enabled)
|
if ($conf->stock->enabled)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
|
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
|
||||||
$head[$h][1] = $langs->trans('Stock');
|
$head[$h][1] = $langs->trans('Stock');
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->fournisseur->enabled) {
|
if ($conf->fournisseur->enabled) {
|
||||||
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
|
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user