Qual: Removed deprecated source code
This commit is contained in:
parent
a532590032
commit
7b68ed8cd5
@ -84,8 +84,6 @@ class CommActionRapport
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
$dir = $conf->agenda->dir_temp."/";
|
$dir = $conf->agenda->dir_temp."/";
|
||||||
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ class BordereauChequeBlochet extends FPDF
|
|||||||
|
|
||||||
// Recupere emmetteur
|
// Recupere emmetteur
|
||||||
$this->emetteur=$mysoc;
|
$this->emetteur=$mysoc;
|
||||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'était pas défini
|
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<EFBFBD>tait pas d<>fini
|
||||||
|
|
||||||
// Defini position des colonnes
|
// Defini position des colonnes
|
||||||
$this->line_height = 5;
|
$this->line_height = 5;
|
||||||
@ -95,8 +95,6 @@ class BordereauChequeBlochet extends FPDF
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
$dir = $_dir . "/".get_exdir($number);
|
$dir = $_dir . "/".get_exdir($number);
|
||||||
|
|
||||||
if (! is_dir($dir))
|
if (! is_dir($dir))
|
||||||
@ -156,13 +154,12 @@ class BordereauChequeBlochet extends FPDF
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi le dernier message d'erreur de création de propale
|
* \brief Renvoi le dernier message d'erreur de cr<EFBFBD>ation de propale
|
||||||
*/
|
*/
|
||||||
function pdferror()
|
function pdferror()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -114,8 +114,6 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
// Definition de l'objet $com (pour compatibilite ascendante)
|
// Definition de l'objet $com (pour compatibilite ascendante)
|
||||||
if (! is_object($com))
|
if (! is_object($com))
|
||||||
{
|
{
|
||||||
@ -144,7 +142,6 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
if (create_exdir($dir) < 0)
|
if (create_exdir($dir) < 0)
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,19 +300,16 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
|
$this->error=$langs->transnoentities("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->error=$langs->transnoentities("ErrorUnknown");
|
$this->error=$langs->transnoentities("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -119,8 +119,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->commande->dir_output)
|
if ($conf->commande->dir_output)
|
||||||
{
|
{
|
||||||
// Definition de l'objet $com (pour compatibilite ascendante)
|
// Definition de l'objet $com (pour compatibilite ascendante)
|
||||||
@ -368,24 +366,20 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
|
$this->error=$langs->trans("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->error=$langs->trans("ErrorUnknown");
|
$this->error=$langs->trans("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,18 +156,15 @@ class html_cerfafr extends ModeleDon
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorConstantNotDefined","DON_OUTPUTDIR");
|
$this->error=$langs->trans("ErrorConstantNotDefined","DON_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->error=$langs->trans("ErrorUnknown");
|
$this->error=$langs->trans("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,8 +90,6 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
//Generation de la fiche
|
//Generation de la fiche
|
||||||
$this->expe = $object;
|
$this->expe = $object;
|
||||||
|
|
||||||
@ -252,24 +250,20 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
|
|
||||||
$pdf->Output($file);
|
$pdf->Output($file);
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir);
|
$this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$outputlangs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
|
$this->error=$outputlangs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->error=$outputlangs->transnoentities("ErrorUnknown");
|
$this->error=$outputlangs->transnoentities("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -163,8 +163,6 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->expedition_bon->dir_output)
|
if ($conf->expedition_bon->dir_output)
|
||||||
{
|
{
|
||||||
// Definition de $dir et $file
|
// Definition de $dir et $file
|
||||||
@ -279,24 +277,20 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
|
$this->error=$langs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->error=$langs->transnoentities("ErrorUnknown");
|
$this->error=$langs->transnoentities("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,8 +120,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->facture->dir_output)
|
if ($conf->facture->dir_output)
|
||||||
{
|
{
|
||||||
// Definition de l'objet $fac (pour compatibilite ascendante)
|
// Definition de l'objet $fac (pour compatibilite ascendante)
|
||||||
@ -381,24 +379,20 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorConstantNotDefined","FAC_OUTPUTDIR");
|
$this->error=$langs->trans("ErrorConstantNotDefined","FAC_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->error=$langs->trans("ErrorUnknown");
|
$this->error=$langs->trans("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,8 +120,6 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->facture->dir_output)
|
if ($conf->facture->dir_output)
|
||||||
{
|
{
|
||||||
// Definition de l'objet $fac (pour compatibilite ascendante)
|
// Definition de l'objet $fac (pour compatibilite ascendante)
|
||||||
@ -155,7 +153,6 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
if (create_exdir($dir) < 0)
|
if (create_exdir($dir) < 0)
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -293,24 +290,20 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->transnoentities("ErrorConstantNotDefined","FAC_OUTPUTDIR");
|
$this->error=$langs->transnoentities("ErrorConstantNotDefined","FAC_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->error=$langs->transnoentities("ErrorUnknown");
|
$this->error=$langs->transnoentities("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -92,8 +92,6 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("interventions");
|
$outputlangs->load("interventions");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->ficheinter->dir_output)
|
if ($conf->ficheinter->dir_output)
|
||||||
{
|
{
|
||||||
// If $fichinter is id instead of object
|
// If $fichinter is id instead of object
|
||||||
@ -328,7 +326,6 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -104,8 +104,6 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->livraison_bon->dir_output)
|
if ($conf->livraison_bon->dir_output)
|
||||||
{
|
{
|
||||||
// If $object is id instead of object
|
// If $object is id instead of object
|
||||||
|
|||||||
@ -125,8 +125,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->livraison_bon->dir_output)
|
if ($conf->livraison_bon->dir_output)
|
||||||
{
|
{
|
||||||
// If $delivery is id instead of object
|
// If $delivery is id instead of object
|
||||||
|
|||||||
@ -29,12 +29,12 @@
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// PDF_Label
|
// PDF_Label
|
||||||
//
|
//
|
||||||
// Classe afin d'éditer au format PDF des étiquettes
|
// Classe afin d'<EFBFBD>diter au format PDF des <20>tiquettes
|
||||||
// au format Avery ou personnalisé
|
// au format Avery ou personnalis<EFBFBD>
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 Laurent PASSEBECQ (LPA)
|
// Copyright (C) 2003 Laurent PASSEBECQ (LPA)
|
||||||
// Basé sur les fonctions de Steve Dillon : steved@mad.scientist.com
|
// Bas<EFBFBD> sur les fonctions de Steve Dillon : steved@mad.scientist.com
|
||||||
//
|
//
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// VERSIONS :
|
// VERSIONS :
|
||||||
@ -56,7 +56,7 @@
|
|||||||
/**
|
/**
|
||||||
\file htdocs/adherents/cartes/PDF_card.class.php
|
\file htdocs/adherents/cartes/PDF_card.class.php
|
||||||
\ingroup adherent
|
\ingroup adherent
|
||||||
\brief Fichier de la classe permettant d'éditer au format PDF des étiquettes au format Avery ou personnalisé
|
\brief Fichier de la classe permettant d'<EFBFBD>diter au format PDF des <EFBFBD>tiquettes au format Avery ou personnalis<EFBFBD>
|
||||||
\author Steve Dillon
|
\author Steve Dillon
|
||||||
\author Laurent Passebecq
|
\author Laurent Passebecq
|
||||||
\author Rodolphe Quiedville
|
\author Rodolphe Quiedville
|
||||||
@ -70,22 +70,22 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\class PDF_card
|
\class PDF_card
|
||||||
\brief Classe afin d'éditer au format PDF des étiquettes au format Avery ou personnalisé
|
\brief Classe afin d'<EFBFBD>diter au format PDF des <EFBFBD>tiquettes au format Avery ou personnalis<EFBFBD>
|
||||||
*/
|
*/
|
||||||
class PDF_card extends FPDF {
|
class PDF_card extends FPDF {
|
||||||
|
|
||||||
// Propriétés privées
|
// Propri<EFBFBD>t<EFBFBD>s priv<69>es
|
||||||
var $_Avery_Name = ''; // Nom du format de l'étiquette
|
var $_Avery_Name = ''; // Nom du format de l'<EFBFBD>tiquette
|
||||||
var $_Margin_Left = 0; // Marge de gauche de l'étiquette
|
var $_Margin_Left = 0; // Marge de gauche de l'<EFBFBD>tiquette
|
||||||
var $_Margin_Top = 0; // marge en haut de la page avant la première étiquette
|
var $_Margin_Top = 0; // marge en haut de la page avant la premi<EFBFBD>re <20>tiquette
|
||||||
var $_X_Space = 0; // Espace horizontal entre 2 bandes d'étiquettes
|
var $_X_Space = 0; // Espace horizontal entre 2 bandes d'<EFBFBD>tiquettes
|
||||||
var $_Y_Space = 0; // Espace vertical entre 2 bandes d'étiquettes
|
var $_Y_Space = 0; // Espace vertical entre 2 bandes d'<EFBFBD>tiquettes
|
||||||
var $_X_Number = 0; // Nombre d'étiquettes sur la largeur de la page
|
var $_X_Number = 0; // Nombre d'<EFBFBD>tiquettes sur la largeur de la page
|
||||||
var $_Y_Number = 0; // Nombre d'étiquettes sur la hauteur de la page
|
var $_Y_Number = 0; // Nombre d'<EFBFBD>tiquettes sur la hauteur de la page
|
||||||
var $_Width = 0; // Largeur de chaque étiquette
|
var $_Width = 0; // Largeur de chaque <EFBFBD>tiquette
|
||||||
var $_Height = 0; // Hauteur de chaque étiquette
|
var $_Height = 0; // Hauteur de chaque <EFBFBD>tiquette
|
||||||
var $_Char_Size = 10; // Hauteur des caractères
|
var $_Char_Size = 10; // Hauteur des caract<EFBFBD>res
|
||||||
var $_Line_Height = 10; // Hauteur par défaut d'une ligne
|
var $_Line_Height = 10; // Hauteur par d<EFBFBD>faut d'une ligne
|
||||||
var $_Metric = 'mm'; // Type of metric.. Will help to calculate good values
|
var $_Metric = 'mm'; // Type of metric.. Will help to calculate good values
|
||||||
var $_Metric_Doc = 'mm'; // Type of metric for the doc..
|
var $_Metric_Doc = 'mm'; // Type of metric for the doc..
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ class PDF_card extends FPDF {
|
|||||||
$this->SetAutoPageBreak(false);
|
$this->SetAutoPageBreak(false);
|
||||||
|
|
||||||
$this->_Metric_Doc = $unit;
|
$this->_Metric_Doc = $unit;
|
||||||
// Permet de commencer l'impression à l'étiquette désirée dans le cas où la page a déjà servie
|
// Permet de commencer l'impression <EFBFBD> l'<27>tiquette d<>sir<69>e dans le cas o<> la page a d<>j<EFBFBD> servie
|
||||||
if ($posX > 0) $posX--; else $posX=0;
|
if ($posX > 0) $posX--; else $posX=0;
|
||||||
if ($posY > 0) $posY--; else $posY=0;
|
if ($posY > 0) $posY--; else $posY=0;
|
||||||
$this->_COUNTX = $posX;
|
$this->_COUNTX = $posX;
|
||||||
@ -236,7 +236,7 @@ class PDF_card extends FPDF {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Méthode qui permet de modifier la taille des caractères
|
//M<EFBFBD>thode qui permet de modifier la taille des caract<63>res
|
||||||
// Cela modiera aussi l'espace entre chaque ligne
|
// Cela modiera aussi l'espace entre chaque ligne
|
||||||
function Set_Char_Size($pt) {
|
function Set_Char_Size($pt) {
|
||||||
if ($pt > 3) {
|
if ($pt > 3) {
|
||||||
@ -247,7 +247,7 @@ class PDF_card extends FPDF {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// On imprime une étiqette
|
// On imprime une <EFBFBD>tiqette
|
||||||
function Add_PDF_card($texte,$header='',$footer='',$outputlangs)
|
function Add_PDF_card($texte,$header='',$footer='',$outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -261,8 +261,6 @@ class PDF_card extends FPDF {
|
|||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("members");
|
$outputlangs->load("members");
|
||||||
|
|
||||||
// $outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
// We are in a new page, then we must add a page
|
// We are in a new page, then we must add a page
|
||||||
if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) {
|
if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) {
|
||||||
$this->AddPage();
|
$this->AddPage();
|
||||||
@ -317,8 +315,6 @@ class PDF_card extends FPDF {
|
|||||||
$this->_COUNTX=0;
|
$this->_COUNTX=0;
|
||||||
$this->_COUNTY=0;
|
$this->_COUNTY=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $langs->setPhpLang(); // On restaure langue session
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -390,7 +386,7 @@ class PDF_card extends FPDF {
|
|||||||
|
|
||||||
// Give the height for a char size given.
|
// Give the height for a char size given.
|
||||||
function _Get_Height_Chars($pt) {
|
function _Get_Height_Chars($pt) {
|
||||||
// Tableau de concordance entre la hauteur des caractères et de l'espacement entre les lignes
|
// Tableau de concordance entre la hauteur des caract<EFBFBD>res et de l'espacement entre les lignes
|
||||||
$_Table_Hauteur_Chars = array(6=>2, 7=>2.5, 8=>3, 9=>4, 10=>5, 11=>6, 12=>7, 13=>8, 14=>9, 15=>10);
|
$_Table_Hauteur_Chars = array(6=>2, 7=>2.5, 8=>3, 9=>4, 10=>5, 11=>6, 12=>7, 13=>8, 14=>9, 15=>10);
|
||||||
if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
|
if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
|
||||||
return $_Table_Hauteur_Chars[$pt];
|
return $_Table_Hauteur_Chars[$pt];
|
||||||
|
|||||||
@ -121,8 +121,6 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->propale->dir_output)
|
if ($conf->propale->dir_output)
|
||||||
{
|
{
|
||||||
// Définition de l'objet $propale (pour compatibilite ascendante)
|
// Définition de l'objet $propale (pour compatibilite ascendante)
|
||||||
@ -392,25 +390,21 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
//$pdfConcat->Output($file);
|
//$pdfConcat->Output($file);
|
||||||
|
|
||||||
$outputlangs->charset_output=$sav_charset_output;
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorConstantNotDefined","PROP_OUTPUTDIR");
|
$this->error=$langs->trans("ErrorConstantNotDefined","PROP_OUTPUTDIR");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->error=$langs->trans("ErrorUnknown");
|
$this->error=$langs->trans("ErrorUnknown");
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 0; // Erreur par defaut
|
return 0; // Erreur par defaut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -105,8 +105,6 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->propale->dir_output)
|
if ($conf->propale->dir_output)
|
||||||
{
|
{
|
||||||
// D<>finition de l'objet $propal (pour compatibilite ascendante)
|
// D<>finition de l'objet $propal (pour compatibilite ascendante)
|
||||||
@ -302,7 +300,6 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,8 +81,6 @@ class pdf_paiement extends FPDF
|
|||||||
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
$this->month=$month;
|
$this->month=$month;
|
||||||
$this->year=$year;
|
$this->year=$year;
|
||||||
|
|
||||||
@ -206,7 +204,6 @@ class pdf_paiement extends FPDF
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -121,8 +121,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
|
||||||
|
|
||||||
if ($conf->fournisseur->commande->dir_output)
|
if ($conf->fournisseur->commande->dir_output)
|
||||||
{
|
{
|
||||||
// Definition de l'objet $com (pour compatibilite ascendante)
|
// Definition de l'objet $com (pour compatibilite ascendante)
|
||||||
|
|||||||
@ -178,7 +178,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en comp
|
|||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
$langs->setDefaultLang('auto');
|
$langs->setDefaultLang('auto');
|
||||||
$langs->setPhpLang();
|
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
$bc[true]=' class="bg2"';
|
$bc[true]=' class="bg2"';
|
||||||
|
|||||||
@ -526,14 +526,12 @@ if (empty($_GET["lang"])) // If language was not forced on URL
|
|||||||
if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT)
|
if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT)
|
||||||
{
|
{
|
||||||
$langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
|
$langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
|
||||||
$langs->setPhpLang();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // If language was forced on URL
|
else // If language was forced on URL
|
||||||
{
|
{
|
||||||
$langs->setDefaultLang($_GET["lang"]);
|
$langs->setDefaultLang($_GET["lang"]);
|
||||||
$langs->setPhpLang();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -306,7 +306,6 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
|||||||
if (! defined('NOREQUIRETRAN'))
|
if (! defined('NOREQUIRETRAN'))
|
||||||
{
|
{
|
||||||
$langs->setDefaultLang($conf->global->MAIN_LANG_DEFAULT);
|
$langs->setDefaultLang($conf->global->MAIN_LANG_DEFAULT);
|
||||||
$langs->setPhpLang();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -141,7 +141,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en comp
|
|||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (isset($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]);
|
if (isset($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]);
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
$langs->setPhpLang();
|
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
$bc[true]=' class="bg2"';
|
$bc[true]=' class="bg2"';
|
||||||
|
|||||||
@ -82,7 +82,7 @@ class Translate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Positionne la chaine traduite pour une cl<EFBFBD> donn<EFBFBD>e.
|
* \brief Positionne la chaine traduite pour une cle donnee.
|
||||||
* \param key Key to translate
|
* \param key Key to translate
|
||||||
* \return string Translated string
|
* \return string Translated string
|
||||||
*/
|
*/
|
||||||
@ -143,30 +143,12 @@ class Translate {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Positionne environnement PHP en fonction du langage
|
* \brief Deprecated function. Do nothing. Kept for backward compatibility.
|
||||||
\remarks Le code langue long (fr_FR, en_US, ...) doit avoir etre positionne par setDefaultLang
|
* \deprecated
|
||||||
\return int >0 si ok, <0 so ko
|
|
||||||
\deprecated
|
|
||||||
*/
|
*/
|
||||||
function setPhpLang()
|
function setPhpLang()
|
||||||
{
|
{
|
||||||
//dol_syslog("Translate::setPhpLang ".$this->defaultlang,LOG_DEBUG);
|
|
||||||
return;
|
return;
|
||||||
/*
|
|
||||||
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
|
|
||||||
//print 'code_lang_tiret='.$code_lang_tiret;
|
|
||||||
setlocale(LC_ALL, $this->defaultlang); // Some OS (Windows) need local with _
|
|
||||||
setlocale(LC_ALL, $code_lang_tiret); // Other OS need local with -
|
|
||||||
|
|
||||||
if (defined("MAIN_FORCE_SETLOCALE_LC_ALL") && MAIN_FORCE_SETLOCALE_LC_ALL)
|
|
||||||
$res_lc_all=setlocale(LC_ALL, MAIN_FORCE_SETLOCALE_LC_ALL.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_ALL);
|
|
||||||
if (defined("MAIN_FORCE_SETLOCALE_LC_NUMERIC") && MAIN_FORCE_SETLOCALE_LC_NUMERIC)
|
|
||||||
$res_lc_numeric=setlocale(LC_NUMERIC, MAIN_FORCE_SETLOCALE_LC_NUMERIC.'.UTF-8', MAIN_FORCE_SETLOCALE_LC_NUMERIC);
|
|
||||||
if (defined("MAIN_FORCE_SETLOCALE_LC_MONETARY") && MAIN_FORCE_SETLOCALE_LC_MONETARY)
|
|
||||||
$res_lc_monetary=setlocale(LC_MONETARY, MAIN_FORCE_SETLOCALE_LC_MONETARY.'UTF-8', MAIN_FORCE_SETLOCALE_LC_MONETARY);
|
|
||||||
//print 'x'.$res_lc_all;
|
|
||||||
return 1;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -182,6 +164,7 @@ class Translate {
|
|||||||
*/
|
*/
|
||||||
function Load($domain,$alt=0)
|
function Load($domain,$alt=0)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
//dol_syslog("Translate::Load domain=".$domain." alt=".$alt);
|
//dol_syslog("Translate::Load domain=".$domain." alt=".$alt);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
@ -305,6 +288,18 @@ class Translate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Format for date
|
||||||
|
/* TODO If lang file is main, we modify the format constants
|
||||||
|
$this->format_date_short="%d/%m/%Y"; # Format of day with PHP/C tags (strftime functions)
|
||||||
|
$this->format_date_short_java="dd/MM/yyyy"; # Format of day with Java tags
|
||||||
|
$this->format_hour_short="%H:%M";
|
||||||
|
$this->format_date_text_short="%d %b %Y";
|
||||||
|
$this->format_date_text="%d %B %Y";
|
||||||
|
$this->format_date_hour_short="%d/%m/%Y %H:%M";
|
||||||
|
$this->format_date_hour_text_short="%d %b %Y %H:%M";
|
||||||
|
$this->format_date_hour_text="%d %B %Y %H:%M";
|
||||||
|
*/
|
||||||
|
|
||||||
if (empty($this->tab_loaded[$domain])) $this->tab_loaded[$domain]=2; // Marque ce fichier comme non trouve
|
if (empty($this->tab_loaded[$domain])) $this->tab_loaded[$domain]=2; // Marque ce fichier comme non trouve
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user