setQuery("SELECT * FROM contacts_td WHERE contacts_td.idtd='$idtd' ORDER BY contacts_td.sitenumber"); $prodplacelist->execute(); ?> TotalRows; ?> 0) { ?> SetFont('dejavusans', 'B', '9'); $pdf->Cell(100, 6, $sitenumbertitle, 1, 0, 'L'); $pdf->SetFont('dejavusans', '', '9'); $pdf->Cell(90, 6, $prosame, 1, 0, 'L', TRUE); $pdf->Ln(); $pdf->Ln(); if ($prodplacesame == 'N') { $pdf->SetFont('dejavusans', 'B', '10'); $pdf->SetFont('dejavusans', '', '9'); $wa_startindex = 0; while (!$prodplacelist->atEnd()) { $wa_startindex = $prodplacelist->Index; $companyname = convertToPDFEncoding($prodplacelist->getColumnVal("companyname")); $companyaddress = convertToPDFEncoding($prodplacelist->getColumnVal("address")); $companycity = convertToPDFEncoding($prodplacelist->getColumnVal("city")); $companycap = convertToPDFEncoding($prodplacelist->getColumnVal("cap")); $companyaddresscomplete = $companyaddress . ',' . $companycap . ' ' . $companycity; $siten = convertToPDFEncoding($prodplacelist->getColumnVal("sitenumber")); $companycountry = convertToPDFEncoding($prodplacelist->getColumnVal("country")); $companytelephone = convertToPDFEncoding($prodplacelist->getColumnVal("telephone")); $companyemail = convertToPDFEncoding($prodplacelist->getColumnVal("email")); $contactname = convertToPDFEncoding($prodplacelist->getColumnVal("contactname")); $companyfax = convertToPDFEncoding($prodplacelist->getColumnVal("fax")); $sitenumberpdf = $sitenumbertitle . ' N. ' . $siten; $pdf->Cell(190, 6, $sitenumberpdf, 1, 0, 'C'); $pdf->Ln(); $pdf->Cell(80, 6, $companypdf, 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $companyname, 1, 0, 'L'); $pdf->Ln(); $pdf->Cell(80, 6, $addresspdf, 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $companyaddresscomplete, 1, 0, 'L'); $pdf->Ln(); $pdf->Cell(80, 6, $countrypdf, 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $companycountry, 1, 0, 'L'); $pdf->Ln(); $pdf->Cell(80, 6, $phonepdf, 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $companytelephone, 1, 0, 'L'); $pdf->Ln(); $pdf->Cell(80, 6, 'Fax', 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $companyfax, 1, 0, 'L'); $pdf->Ln(); $pdf->Cell(80, 6, $emailpdf, 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $companyemail, 1, 0, 'L'); $pdf->Ln(); $pdf->Cell(80, 6, $contactnamepdf, 1, 0, 'L', TRUE); $pdf->Cell(110, 6, $contactname, 1, 0, 'L'); $pdf->Ln(); $prodplacelist->moveNext(); } $prodplacelist->moveFirst(); //return RS to first record unset($wa_startindex); unset($wa_repeatcount); } ?>