Exemple #1
0
$listMembers = new request();
$listMembers->openMembers($tmpquery);
$comptListMembers = count($listMembers->mem_id);
for ($i = 0; $i < $comptListMembers; $i++) {
    $name = $listMembers->mem_name[$i];
    $title = $listMembers->mem_title[$i];
    $email = $listMembers->mem_email_work[$i];
    $phone = $listMembers->mem_phone_work[$i];
    $mobile = $listMembers->mem_mobile[$i];
    $fax = $listMembers->mem_fax[$i];
    //$ = $listMembers->[$i];
    // stuff the array with data
    $data[] = array('name' => $name, 'title' => $title, 'email' => $email, 'phone' => $phone, 'mobile' => $mobile, 'fax' => $fax);
}
// print the page number
$pdf->ezStartPageNumbers(526, 34, 6, 'right', '', 1);
// put a line top and bottom on all the pages and company info on the bottom
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->line(20, 40, 578, 40);
$pdf->line(20, 822, 578, 822);
$pdf->addText(50, 34, 6, $cn . " - " . $url);
$pdf->AddText(510, 34, 6, "Page ");
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all, 'all');
// make the table
$pdf->ezTable($data, array('name' => 'Name', 'title' => 'Title', 'email' => 'Email', 'phone' => 'Phone', 'mobile' => 'Mobile', 'fax' => 'Fax'), '', array('fontSize' => 10, 'maxWidth' => 550));
// output the PDF
$pdf->ezStream();