Ejemplo n.º 1
0
    function Header()
    {
	    global $prefix_base;
			$X_etab = '10'; $Y_etab = '10';
		        $caractere_utilse = 'DejaVu';
			$affiche_logo_etab='1';
			$entente_mel='0'; // afficher l'adresse mel dans l'entête
			$entente_tel='0'; // afficher le numéro de téléphone dans l'entête
			$entente_fax='0'; // afficher le numéro de fax dans l'entête
			$L_max_logo=75; $H_max_logo=75; //dimension du logo

    //Affiche le filigrame

	//bloc identification etablissement
	$logo = '../../images/'.getSettingValue('logo_etab');
	$format_du_logo = str_replace('.','',strstr(getSettingValue('logo_etab'), '.'));
	if($affiche_logo_etab==='1' and file_exists($logo) and getSettingValue('logo_etab') != '' and ($format_du_logo==='jpg' or $format_du_logo==='png'))
	{
		$valeur=redimensionne_logo($logo, $L_max_logo, $H_max_logo);
		//$X_logo et $Y_logo; placement du bloc identite de l'établissement
		$X_logo=5; $Y_logo=5; $L_logo=$valeur[0]; $H_logo=$valeur[1];
		$X_etab=$X_logo+$L_logo; $Y_etab=$Y_logo;
		//logo
		$this->Image($logo, $X_logo, $Y_logo, $L_logo, $H_logo);
	}

	//adresse
 	 $this->SetXY($X_etab,$Y_etab);
 	 $this->SetFont('DejaVu','',14);
	  $gepiSchoolName = getSettingValue('gepiSchoolName');
	 $this->Cell(90,7, ($gepiSchoolName),0,2,'');
	 $this->SetFont('DejaVu','',10);
	  $gepiSchoolAdress1 = getSettingValue('gepiSchoolAdress1');
	 $this->Cell(90,5, ($gepiSchoolAdress1),0,2,'');
	  $gepiSchoolAdress2 = getSettingValue('gepiSchoolAdress2');
	 $this->Cell(90,5, ($gepiSchoolAdress2),0,2,'');
	  $gepiSchoolZipCode = getSettingValue('gepiSchoolZipCode');
	  $gepiSchoolCity = getSettingValue('gepiSchoolCity');
	 $this->Cell(90,5, ($gepiSchoolZipCode." ".$gepiSchoolCity),0,2,'');
	  $gepiSchoolTel = getSettingValue('gepiSchoolTel');
	  $gepiSchoolFax = getSettingValue('gepiSchoolFax');
	if($entente_tel==='1' and $entente_fax==='1') { $entete_communic = 'Tél: '.$gepiSchoolTel.' / Fax: '.$gepiSchoolFax; }
	if($entente_tel==='1' and empty($entete_communic)) { $entete_communic = 'Tél: '.$gepiSchoolTel; }
	if($entente_fax==='1' and empty($entete_communic)) { $entete_communic = 'Fax: '.$gepiSchoolFax; }
	if( isset($entete_communic) and $entete_communic != '' ) {
	 $this->Cell(90,5, $entete_communic,0,2,'');
	}
	if($entente_mel==='1') {
	  $gepiSchoolEmail = getSettingValue('gepiSchoolEmail');
	 $this->Cell(90,5, $gepiSchoolEmail,0,2,'');
	}
    }
Ejemplo n.º 2
0
// champs facultatifs
$pdf->SetAuthor('');
$pdf->SetCreator('créé avec Fpdf');
$pdf->SetTitle('Titre');
$pdf->SetSubject('Sujet');

// on charge les 83 gfx...
$pdf->SetMargins(10,10);
for ($i=0; $i<$nb; $i++) {
$pdf->AddPage();
	// information logo
	$L_max_logo='75'; // Longeur maxi du logo
	$H_max_logo='75'; // hauteur maxi du logo
	$logo = '../../images/'.getSettingValue('logo_etab');
	$valeur=redimensionne_logo($logo, $L_max_logo, $H_max_logo);
	$X_logo='23';
	$Y_logo='10';
	$L_logo=$valeur[0];
	$H_logo=$valeur[1];
        //logo
	$pdf->Image($logo, $X_logo, $Y_logo, $L_logo, $H_logo);

//$pdf->Image('../../images/logo.jpg',23,10,21,27,'JPEG');
$pdf->SetY(38);
$pdf->SetFont('DejaVu','B',10);
$int_etab = $niveau_etab.$nom_etab;
$pdf->Cell(50, 4, ($int_etab), 0, 1, 'C', '');
$pdf->SetFont('DejaVu','',10);
$pdf->Cell(50, 4, ($adresse1_etab), 0, 1, 'C', '');
if($adresse2_etab!="")