Fix: UTF encoding in memeber card export

This commit is contained in:
Laurent Destailleur 2009-03-12 23:14:35 +00:00
parent 017a947c82
commit 136d69dbfb
2 changed files with 21 additions and 17 deletions

View File

@ -74,7 +74,7 @@ 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,"; $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.datefin,";
$sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,"; $sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,";
$sql.= " t.libelle as type,"; $sql.= " t.libelle as type,";
$sql.= " p.libelle as pays"; $sql.= " p.libelle as pays";
@ -91,16 +91,17 @@ if ($result)
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
// attribut a remplacer
// List of values to scan for a replacement
$replace = array ( $replace = array (
ucfirst(strtolower($objp->prenom)), $objp->prenom,
strtoupper($objp->nom), $objp->nom,
"http://".$_SERVER["SERVER_NAME"]."/", "http://".$_SERVER["SERVER_NAME"]."/",
$objp->societe, $objp->societe,
ucwords(strtolower($objp->adresse)), $objp->adresse,
$objp->cp, $objp->cp,
strtoupper($objp->ville), $objp->ville,
ucfirst(strtolower($objp->pays)), $objp->pays,
$objp->email, $objp->email,
$objp->naiss, $objp->naiss,
$objp->photo, $objp->photo,

View File

@ -279,7 +279,8 @@ class PDF_card extends FPDF {
$_PosX = $this->_Margin_Left+($this->_COUNTX*($this->_Width+$this->_X_Space)); $_PosX = $this->_Margin_Left+($this->_COUNTX*($this->_Width+$this->_X_Space));
$_PosY = $this->_Margin_Top+($this->_COUNTY*($this->_Height+$this->_Y_Space)); $_PosY = $this->_Margin_Top+($this->_COUNTY*($this->_Height+$this->_Y_Space));
if ($this->_Avery_Name == "CARD") { if ($this->_Avery_Name == "CARD")
{
$Tformat=$this->_Avery_Labels["CARD"]; $Tformat=$this->_Avery_Labels["CARD"];
//$this->_Pointille($_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.3,25); //$this->_Pointille($_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.3,25);
$this->_Croix($_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.3,10); $this->_Croix($_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.3,10);
@ -305,9 +306,11 @@ class PDF_card extends FPDF {
$this->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($footer),0,1,'C'); $this->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($footer),0,1,'C');
} }
}else{ }
else
{
$this->SetXY($_PosX+3, $_PosY+3); $this->SetXY($_PosX+3, $_PosY+3);
$this->MultiCell($this->_Width, $this->_Line_Height, $texte); $this->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($texte));
} }
$this->_COUNTY++; $this->_COUNTY++;