Пример #1
0
<?php

require './lib/php/fpdf/fpdf.php';
require '../admin/lib/php/db_pg.php';
require '../admin/lib/php/classes/cat.class.php';
require '../admin/lib/php/classes/catManager.class.php';
$buffer = ob_get_clean();
$db = Connexion::getInstance($dsn, $user, $pass);
$mg = new catManager($db);
$data = $mg->getCat();
$pdf = new FPDF('L', 'cm', 'A4');
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Arial', 'B', 15);
$pdf->cell(3, 10, $pdf->Image('../admin/images/print2.png', 0, 0), 0, 0, 'L');
$pdf->Ln();
$pdf->cell(3.5, 1, 'Catalogue de DVD en folie', 0, 0, 'L');
$pdf->SetFont('Arial', 'B', 9);
$pdf->Ln();
$pdf->cell(10, 0.7, 'Titre', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Prix', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Genre', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Realisateur', 1, 0, 'C');
$pdf->cell(3, 0.7, 'Support', 1, 0, 'C');
$pdf->Ln();
for ($i = 0; $i < count($data); $i++) {
    $titre = $data[$i]->titre;
    $prix = $data[$i]->prix;
    $genre = $data[$i]->genre;
Пример #2
0
<section id="resultat" ><?php 
if (isset($texte)) {
    print $texte;
}
?>
</section>
<form id="formachat" action="<?php 
print $_SERVER['PHP_SELF'];
?>
" method="get">
    
    <table class="jouet">
     <tr>
         <?php 
$cm = new catManager($db);
$cat = $cm->getCat($_GET);
?>
                
            </tr>
<legend>Nos joués de stocks :</legend> 
<tr><td>Titre</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Prix</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Nombre de joueurs</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Genre</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Societé</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type</td><td>Commander</td></tr>
<?php 
for ($i = 0; $i < count($cat); $i++) {
    $titre = $cat[$i]->nom;
    $prix = $cat[$i]->prix;
    $nj = $cat[$i]->nj;
    $genre = $cat[$i]->genre;
    $soc = $cat[$i]->soc;
    $type = $cat[$i]->type_jouet;
    $idj = $cat[$i]->idjouet;