Esempio n. 1
0
} 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 {
    $PDF->setXY(10, 40);
    $PDF->Cell(80);
}
//Texte centré dans une cellule 20*10 mm encadrée et retour à la ligne
$PDF->Cell(100, 10, utf8_decode($calend), 1, 1, 'C');
$PDF->SetFont('Arial', 'B', 10);
$newY = 60;
$PDF->setXY(10, $newY);
//Generation du tableau
include 'calend_pdf_tab.php';
//fin du tableau
$PDF->drawTableau($PDF, $proprietesTableau, $proprieteHeader, $contenuHeader, $proprieteContenu, $contenuTableau);
$monday_display_date = date("Y-m-d", $monday_date);
$doc_name = $calend . " " . $monday_display_date . ".pdf";
$PDF->Output($doc_name, I);
//$PDF->Output();
Esempio n. 2
0
 $proprietesTableau = array('TB_ALIGN' => 'L', 'L_MARGIN' => 15, 'BRD_COLOR' => array(0, 92, 177), 'BRD_SIZE' => '0.3');
 // Définition des propriétés du header du tableau.
 $proprieteHeader = array('T_COLOR' => array(150, 10, 10), 'T_SIZE' => 10, 'T_FONT' => 'Arial', 'T_ALIGN' => 'C', 'V_ALIGN' => 'T', 'T_TYPE' => 'B', 'LN_SIZE' => 20, 'BG_COLOR_COL0' => array(170, 240, 230), 'BG_COLOR' => array(170, 240, 230), 'BRD_COLOR' => array(0, 92, 177), 'BRD_SIZE' => 0.2, 'BRD_TYPE' => '1', 'BRD_TYPE_NEW_PAGE' => '');
 // Contenu du header du tableau.
 $contenuHeader = array(30, 30, 40, 50, "Jeu", "Quantité", "Prix/U", "Console");
 // Définition des propriétés du reste du contenu du tableau.
 $proprieteContenu = array('T_COLOR' => array(0, 0, 0), 'T_SIZE' => 10, 'T_FONT' => 'Arial', 'T_ALIGN_COL0' => 'L', 'T_ALIGN' => 'R', 'V_ALIGN' => 'M', 'T_TYPE' => '', 'LN_SIZE' => 10, 'BG_COLOR_COL0' => array(245, 245, 150), 'BG_COLOR' => array(255, 255, 255), 'BRD_COLOR' => array(0, 92, 177), 'BRD_SIZE' => 0.1, 'BRD_TYPE' => '1', 'BRD_TYPE_NEW_PAGE' => '');
 // Contenu du tableau.
 $tmp = array();
 for ($i = 0; $i < count($_SESSION['panier']['nomProduit']); $i++) {
     array_push($tmp, $_SESSION['panier']['nomProduit'][$i]);
     array_push($tmp, $_SESSION['panier']['qteProduit'][$i]);
     array_push($tmp, $_SESSION['panier']['prixProduit'][$i]);
     array_push($tmp, $_SESSION['panier']['console'][$i]);
 }
 $pdf->drawTableau($pdf, $proprietesTableau, $proprieteHeader, $contenuHeader, $proprieteContenu, $tmp);
 $pdf->Cell(0, 10, " Montant ToTal " . $_GET['tot'] . " DH\n", 1, "C", 0);
 $pdf->Output("Rapport/Jeu-Achetés.pdf");
 $file = "logs/" . $_SESSION['pseudo'] . ".log";
 $date = date("d/m/Y H:i:s");
 $date = "<" . $date . "> ";
 $p = fopen($file, "a+");
 fputs($p, $date);
 $nb = 0;
 for ($i = 0; $i < count($_SESSION['panier']['nomProduit']); $i++) {
     $nb += $_SESSION['panier']['qteProduit'][$i];
 }
 $msg = $_SESSION['pseudo'] . "  Vient d'Acheter " . $nb . " Jeux Video ! ";
 fputs($p, $msg);
 $ip = "( " . $_SERVER['REMOTE_ADDR'] . ") \n";
 fputs($p, $ip);