Fix: Correction affichage pays sur fiches adhérents
This commit is contained in:
parent
2a3650febc
commit
0655fa1a50
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
|
* Copyright (C) 2006 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
|
||||||
@ -18,7 +19,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Inspire de PDF_Label
|
/* Inspire de PDF_Label
|
||||||
@ -370,6 +370,8 @@ class PDF_card extends FPDF {
|
|||||||
*/
|
*/
|
||||||
function _Croix($x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=5)
|
function _Croix($x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=5)
|
||||||
{
|
{
|
||||||
|
//$this->Color('#888888');
|
||||||
|
|
||||||
$this->SetLineWidth($epaisseur);
|
$this->SetLineWidth($epaisseur);
|
||||||
$lg=$taille/2;
|
$lg=$taille/2;
|
||||||
// croix haut gauche
|
// croix haut gauche
|
||||||
@ -385,6 +387,7 @@ class PDF_card extends FPDF {
|
|||||||
$this->Line($x2,$y2-$lg,$x2,$y2+$lg);
|
$this->Line($x2,$y2-$lg,$x2,$y2+$lg);
|
||||||
$this->Line($x2-$lg,$y2,$x2+$lg,$y2);
|
$this->Line($x2-$lg,$y2,$x2+$lg,$y2);
|
||||||
|
|
||||||
|
//$this->Color('#000000');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
|
* Copyright (C) 2006 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
|
||||||
@ -18,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/adherents/cartes/carte.php
|
/**
|
||||||
|
\file htdocs/adherents/cartes/carte.php
|
||||||
\ingroup adherent
|
\ingroup adherent
|
||||||
\brief Page de creation d'une carte PDF
|
\brief Page de creation d'une carte PDF
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
@ -70,15 +71,19 @@ if (!isset($annee)){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// requete en prenant que les adherents a jour de cotisation
|
// requete en prenant que les adherents a jour de cotisation
|
||||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin, adresse,cp,ville,pays, t.libelle as type, d.naiss, d.email, d.photo";
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin,";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,";
|
||||||
$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1 AND datefin > now()";
|
$sql.= " t.libelle as type,";
|
||||||
|
$sql.= " p.libelle as pays";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON d.pays = p.rowid";
|
||||||
|
$sql.= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1 AND datefin >= now()";
|
||||||
$sql.= " ORDER BY d.rowid ASC";
|
$sql.= " ORDER BY d.rowid ASC";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
@ -100,6 +105,7 @@ if ($result)
|
|||||||
$objp->rowid,
|
$objp->rowid,
|
||||||
$annee
|
$annee
|
||||||
);
|
);
|
||||||
|
|
||||||
// imprime le texte specifique sur la carte
|
// imprime le texte specifique sur la carte
|
||||||
//$pdf->Add_PDF_card(sprintf("%s\n%s\n%s\n%s\n%s, %s\n%s", $objp->type." n° ".$objp->rowid,ucfirst(strtolower($objp->prenom))." ".strtoupper($objp->nom),"<".$objp->email.">", ucwords(strtolower($objp->adresse)), $objp->cp, strtoupper($objp->ville), ucfirst(strtolower($objp->pays))),$annee,"Association FreeLUG http://www.freelug.org/");
|
//$pdf->Add_PDF_card(sprintf("%s\n%s\n%s\n%s\n%s, %s\n%s", $objp->type." n° ".$objp->rowid,ucfirst(strtolower($objp->prenom))." ".strtoupper($objp->nom),"<".$objp->email.">", ucwords(strtolower($objp->adresse)), $objp->cp, strtoupper($objp->ville), ucfirst(strtolower($objp->pays))),$annee,"Association FreeLUG http://www.freelug.org/");
|
||||||
$pdf->Add_PDF_card(preg_replace ($patterns, $replace, ADHERENT_CARD_TEXT),preg_replace ($patterns, $replace, ADHERENT_CARD_HEADER_TEXT),preg_replace ($patterns, $replace, ADHERENT_CARD_FOOTER_TEXT));
|
$pdf->Add_PDF_card(preg_replace ($patterns, $replace, ADHERENT_CARD_TEXT),preg_replace ($patterns, $replace, ADHERENT_CARD_HEADER_TEXT),preg_replace ($patterns, $replace, ADHERENT_CARD_FOOTER_TEXT));
|
||||||
@ -108,9 +114,12 @@ if ($result)
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
$pdf->Output();
|
$pdf->Output();
|
||||||
}else{
|
|
||||||
llxHeader();
|
|
||||||
print "Erreur de la base de données";
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
|
||||||
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
|
* Copyright (C) 2006 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
|
||||||
@ -18,10 +19,10 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/adherents/cartes/etiquette.php
|
/**
|
||||||
|
\file htdocs/adherents/cartes/etiquette.php
|
||||||
\ingroup adherent
|
\ingroup adherent
|
||||||
\brief Page de creation d'etiquettes
|
\brief Page de creation d'etiquettes
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
@ -58,9 +59,13 @@ if (!isset($annee)){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// requete en prenant que les adherents a jour de cotisation
|
// requete en prenant que les adherents a jour de cotisation
|
||||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin, adresse,cp,ville,pays, t.libelle as type, d.naiss, d.email, d.photo";
|
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin,";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,";
|
||||||
$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1 AND datefin > now()";
|
$sql.= " t.libelle as type,";
|
||||||
|
$sql.= " p.libelle as pays";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON d.pays = p.rowid";
|
||||||
|
$sql.= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1 AND datefin >= now()";
|
||||||
$sql.= " ORDER BY d.rowid ASC";
|
$sql.= " ORDER BY d.rowid ASC";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -78,9 +83,12 @@ if ($result)
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
$pdf->Output();
|
$pdf->Output();
|
||||||
}else{
|
|
||||||
llxHeader();
|
|
||||||
print "Erreur de la base de données : ".$db->error();
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
|
||||||
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user