Example #1
0
$tab = $_SESSION['tab'];
if ($nb_display == 5) {
    $orientation = 'P';
} elseif ($nb_display == 7) {
    $orientation = 'L';
} else {
    $orientation = 'L';
}
include "../../phpToPDF/phpToPDF.php";
$PDF = new phpToPDF();
$PDF->AddPage($orientation);
$PDF->Image("../images/logo_stluc.jpg", 10, 10, 65, 28);
$PDF->SetFont('Arial', 'B', 10);
$text_a = "Date : " . date("d-m-Y") . "\n";
if ($orientation == 'P') {
    $PDF->setXY(160, 10);
} elseif ($orientation == 'L') {
    $PDF->setXY(260, 10);
} else {
    $PDF->setXY(260, 10);
}
$PDF->MultiCell(50, 5, $text_a, 0, 1, 'C');
//Sélection de la police
$PDF->SetFont('Arial', 'B', 18);
if ($orientation == 'P') {
    $PDF->setXY(10, 40);
    $PDF->Cell(50);
} elseif ($orientation == 'L') {
    $PDF->setXY(10, 40);
    $PDF->Cell(80);
} else {
    $data = unserialize($sqldata);
    $sqldata2 = mysql_result($Resultat, $Compteur, "data2");
    $data2 = unserialize($sqldata2);
    $nb_item = count($data);
    $nb_sub_tab = count($data2);
}
include "../../phpToPDF/phpToPDF.php";
$orientation = 'L';
$PDF = new phpToPDF();
$PDF->AddPage($orientation);
//Generation du tableau
for ($m_init = 0; $m_init <= 3; $m_init++) {
    $PDF->Image("../images/logo_stluc.jpg", 10, 10, 38, 15);
    $PDF->SetFont('Arial', 'B', 10);
    $text_a = "Date : " . date("d-m-Y") . "\n";
    $PDF->setXY(260, 8);
    $PDF->MultiCell(50, 5, $text_a, 0, 1, 'C');
    //Sélection de la police
    $PDF->SetFont('Arial', 'B', 18);
    $PDF->setXY(15, 15);
    $PDF->Cell(55);
    //Texte centré dans une cellule 20*10 mm encadrée et retour à la ligne
    $PDF->Cell(150, 10, utf8_decode($calend . ": " . $item_name), 1, 1, 'C');
    $PDF->SetFont('Arial', 'B', 10);
    $newY = 29;
    $newX = 10;
    $PDF->setXY($newX, $newY);
    include 'calend_year_overview_pdf_tab.php';
    $PDF->drawTableau($PDF, $proprietesTableau, $proprieteHeader, $contenuHeader, $proprieteContenu, $contenuTableau);
    //fin du tableau
    if ($m_init < 3) {