$ImgLowSize = NULL; if (!empty($pdf->ToPaths['ToLeft'])) { $ImgSxSize = getimagesize($pdf->ToPaths['ToLeft']); } if (!empty($pdf->ToPaths['ToRight'])) { $ImgDxSize = getimagesize($pdf->ToPaths['ToRight']); } if (!empty($pdf->ToPaths['ToBottom'])) { $ImgLowSize = getimagesize($pdf->ToPaths['ToBottom']); } if (is_file($file = $CFG->DOCUMENT_PATH . 'TV/Photos/TV-' . $_SESSION["TourCodeSafe"] . '-IdCardFooter.jpg')) { $pdf->ToPaths['ToBottom'] = $file; $ImgLowSize = getimagesize($pdf->ToPaths['ToBottom']); } $AccH = $pdf->getPageHeight() / 3 - 10; $AccW = $pdf->getPageWidth() / 2 - 10; while ($MyRow = safe_fetch($Rs)) { $pdf->SetDefaultColor(); $PosX = $cntPass % 2 == 0 ? 5 : $pdf->getPageWidth() / 2 + 5; $PosY = $cntPass % 6 < 2 ? 5 : ($cntPass % 6 < 4 ? $pdf->getPageHeight() / 3 + 5 : $pdf->getPageHeight() * 2 / 3 + 5); $AccColor = array(255, 255, 255); if (!is_null($MyRow->AcColor)) { $AccColor = array(base_convert(substr($MyRow->AcColor, 0, 2), 16, 10), base_convert(substr($MyRow->AcColor, 2, 2), 16, 10), base_convert(substr($MyRow->AcColor, 4, 2), 16, 10)); } //Every 4 Accreditation I change page if ($cntPass % 6 == 0) { $pdf->AddPage(); } //PRIMA Area dell'accredito: Logo SX e Nome/Country + sfondo colore - Altezza 6/20 (ne restano 14/20)) $pdf->SetXY($PosX, $PosY); $pdf->SetFont('', 'B', 12);
require_once 'CommonCard.php'; $Rs = safe_r_sql($MyQuery); if (!safe_num_rows($Rs)) { include 'Common/Templates/head-popup.php'; echo '<table height="' . ($_SESSION['WINHEIGHT'] - 50) . '" width="100%"><tr><td>'; echo '<div align="center">' . get_text('BadgeNoData', 'Tournament') . ''; echo '<br/><br/><input type="button" onclick="window.close();" value="' . get_text('Close') . '">'; echo '</td></tr></table>'; include 'Common/Templates/tail-popup.php'; die; } $pdf = new LabelPDF(); $pdf->SetAutoPageBreak(false); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $AccW = ($pdf->getPageWidth() - 13) / 2 - 10; $AccH = ($pdf->getPageHeight() - 50) / 3 - 10; $XOffset = array(0, $AccW + 10); $YOffset = array(0, 0, $AccH + 10, $AccH + 10, $AccH * 2 + 20, $AccH * 2 + 20); $CardsPerWidth = 2; $CardsPerPage = 6; $FlagHeight = 12; $cntPass = 0; $ImgSxSize = NULL; $ImgDxSize = NULL; $ImgLowSize = NULL; $ImgLWidth = 0; $ImgLWidth = 0; $ImgRHeight = 0; $ImgRWidth = 0; if ($pdf->ToPaths['ToLeft']) {