1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
$PDF = new phpToPDF();
$PDF->AddPage();
$PDF->SetFont("Arial","B",16);
$query = "select * from Check_item_".$_SESSION['jalon'];
$resultat=mysql_query($query);
$PDF->SetFont("Arial","B",14);
$PDF->SetFillColor(96,96,96);
$PDF->SetTextColor(255,255,255);
$header=array('Nom','Prénom','Indice');
$PDF->SetXY(20,$y);
for($i=0; $i<sizeof($header); $i++)
$PDF->cell(50,10,$header[$i],1,0,'L',1);
// Affichage des données
$PDF->SetFillColor(0xdd,0xdd,0xdd);
$PDF->SetTextColor(0,0,0);
$PDF->SetFont('Arial','',10);
$PDF->SetXY(20,$PDF->GetY()+10);
$fond=0;
while($row=mysql_fetch_array($resultat))
{
$query = "select item_name from Item_list where id_item = '".$row['id_item']."'";
$resu=mysql_query($query);
while($row1=mysql_fetch_array($resu))
{
$x = strlen($row1['item_name']);
$PDF->cell(50,7,$row['status'],1,0,'C',$fond);
$PDF->cell(50,7,$row['supplier'],1,0,'C',$fond);
$PDF->cell(50,7,$row1['item_name'],1,0,'L',$fond);
$PDF->SetXY(20,$PDF->GetY()+7); $fond=!$fond;
}
} |
Partager