Les script doivent pouvoir se lancer depuis n'importe quel rep
This commit is contained in:
parent
736e9c2b8b
commit
ea42bcc543
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2007 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,13 +18,32 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*
|
|
||||||
* Statistiques sur le statut paye des factures
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
require ("../../htdocs/master.inc.php");
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\file scripts/cron/facture-paye-stats.php
|
||||||
|
\ingroup invoice
|
||||||
|
\brief Statistiques sur le statut paye des factures
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Test si mode CLI
|
||||||
|
$sapi_type = php_sapi_name();
|
||||||
|
$script_file=__FILE__;
|
||||||
|
if (eregi('([^\\\/]+)$',$script_file,$reg)) $script_file=$reg[1];
|
||||||
|
|
||||||
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
|
echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer $script_file en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recupere env dolibarr
|
||||||
|
$version='$Revision$';
|
||||||
|
$path=eregi_replace($script_file,'',$_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
|
require_once($path."../../htdocs/master.inc.php");
|
||||||
|
|
||||||
|
|
||||||
|
$error=0;
|
||||||
$verbose = 0;
|
$verbose = 0;
|
||||||
|
|
||||||
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2007 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,13 +18,38 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*
|
|
||||||
* Calcul le CA généré par chaque fournisseur
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
require ("../../htdocs/master.inc.php");
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\file scripts/cron/fournisseur-calcul-ca_genere.php
|
||||||
|
\ingroup fournisseur
|
||||||
|
\brief Calcul le CA généré par chaque fournisseur et genere graph
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Test si mode CLI
|
||||||
|
$sapi_type = php_sapi_name();
|
||||||
|
$script_file=__FILE__;
|
||||||
|
if (eregi('([^\\\/]+)$',$script_file,$reg)) $script_file=$reg[1];
|
||||||
|
|
||||||
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
|
echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer $script_file en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (! isset($argv[1]) || ! $argv[1]) {
|
||||||
|
print "Usage: $script_file now\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Recupere env dolibarr
|
||||||
|
$version='$Revision$';
|
||||||
|
$path=eregi_replace($script_file,'',$_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
|
require_once($path."../../htdocs/master.inc.php");
|
||||||
|
|
||||||
|
$error=0;
|
||||||
$verbose = 0;
|
$verbose = 0;
|
||||||
|
|
||||||
$now = time();
|
$now = time();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2007 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,14 +18,33 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*
|
|
||||||
* Crée les graphiques pour les fournisseurs
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
require ("../../htdocs/master.inc.php");
|
|
||||||
|
/**
|
||||||
|
\file scripts/cron/fournisseur-graph.php
|
||||||
|
\ingroup fournisseur
|
||||||
|
\brief Script de génération graph fournisseur
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Test si mode CLI
|
||||||
|
$sapi_type = php_sapi_name();
|
||||||
|
$script_file=__FILE__;
|
||||||
|
if (eregi('([^\\\/]+)$',$script_file,$reg)) $script_file=$reg[1];
|
||||||
|
|
||||||
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
|
echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer $script_file en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recupere env dolibarr
|
||||||
|
$version='$Revision$';
|
||||||
|
$path=eregi_replace($script_file,'',$_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
|
require_once($path."../../htdocs/master.inc.php");
|
||||||
require_once (DOL_DOCUMENT_ROOT."/dolgraph.class.php");
|
require_once (DOL_DOCUMENT_ROOT."/dolgraph.class.php");
|
||||||
|
|
||||||
|
|
||||||
|
$error=0;
|
||||||
$verbose = 0;
|
$verbose = 0;
|
||||||
|
|
||||||
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
||||||
@ -48,7 +68,7 @@ for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
|||||||
$dir = DOL_DATA_ROOT."/graph/fournisseur";
|
$dir = DOL_DATA_ROOT."/graph/fournisseur";
|
||||||
if (!is_dir($dir) )
|
if (!is_dir($dir) )
|
||||||
{
|
{
|
||||||
if (! @mkdir($dir,0755))
|
if (! create_exdir($dir,0755))
|
||||||
{
|
{
|
||||||
die ("Can't create $dir\n");
|
die ("Can't create $dir\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2007 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,14 +18,33 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*
|
|
||||||
* Crée les graphiques pour les fournisseurs
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
require ("../../htdocs/master.inc.php");
|
|
||||||
|
/**
|
||||||
|
\file scripts/cron/product-graph.php
|
||||||
|
\ingroup product
|
||||||
|
\brief Crée les graphiques pour les produits
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Test si mode CLI
|
||||||
|
$sapi_type = php_sapi_name();
|
||||||
|
$script_file=__FILE__;
|
||||||
|
if (eregi('([^\\\/]+)$',$script_file,$reg)) $script_file=$reg[1];
|
||||||
|
|
||||||
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
|
echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer $script_file en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recupere env dolibarr
|
||||||
|
$version='$Revision$';
|
||||||
|
$path=eregi_replace($script_file,'',$_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
|
require_once($path."../../htdocs/master.inc.php");
|
||||||
require_once (DOL_DOCUMENT_ROOT."/dolgraph.class.php");
|
require_once (DOL_DOCUMENT_ROOT."/dolgraph.class.php");
|
||||||
|
|
||||||
|
|
||||||
|
$error=0;
|
||||||
$verbose = 0;
|
$verbose = 0;
|
||||||
|
|
||||||
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
||||||
@ -52,7 +72,7 @@ $year = strftime('%Y',$now);
|
|||||||
$dir = DOL_DATA_ROOT."/graph/product";
|
$dir = DOL_DATA_ROOT."/graph/product";
|
||||||
if (!is_dir($dir) )
|
if (!is_dir($dir) )
|
||||||
{
|
{
|
||||||
if (! @mkdir($dir,0755))
|
if (! create_exdir($dir,0755))
|
||||||
{
|
{
|
||||||
die ("Can't create $dir\n");
|
die ("Can't create $dir\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2007 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,13 +18,32 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*
|
|
||||||
* Créé le graph de valorisation du stock
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
require ("../../htdocs/master.inc.php");
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\file scripts/cron/stock-graph.php
|
||||||
|
\ingroup stock
|
||||||
|
\brief Créé le graph de valorisation du stock
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Test si mode CLI
|
||||||
|
$sapi_type = php_sapi_name();
|
||||||
|
$script_file=__FILE__;
|
||||||
|
if (eregi('([^\\\/]+)$',$script_file,$reg)) $script_file=$reg[1];
|
||||||
|
|
||||||
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
|
echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer $script_file en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recupere env dolibarr
|
||||||
|
$version='$Revision$';
|
||||||
|
$path=eregi_replace($script_file,'',$_SERVER["PHP_SELF"]);
|
||||||
|
|
||||||
|
require_once($path."../../htdocs/master.inc.php");
|
||||||
|
|
||||||
|
|
||||||
|
$error=0;
|
||||||
$verbose = 0;
|
$verbose = 0;
|
||||||
|
|
||||||
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
for ($i = 1 ; $i < sizeof($argv) ; $i++)
|
||||||
@ -71,7 +91,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $sql;
|
dolibarr_print_error($db,$sql);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
@ -130,7 +150,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $sql;
|
dolibarr_print_error($db,$sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = $max_day + 1 ; $i < ($day + 1) ; $i++)
|
for ($i = $max_day + 1 ; $i < ($day + 1) ; $i++)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user