function ResultPDF($DocTitolo, $Portrait = true, $Headers = '', $StaffVisibility = true) { parent::__construct($DocTitolo, $Portrait, $Headers, $StaffVisibility); $this->startPageGroup(); $this->AddPage(); $this->setlinewidth(0.1); }
function __construct($TemplateID = 0) { parent::__construct('BackNumber'); $Select = "SELECT BackNumber.*, LENGTH(BnBackground) as ImgSize " . "FROM BackNumber " . "WHERE BnTournament=" . StrSafe_DB($_SESSION['TourId']) . " AND BnFinal in (0," . $TemplateID . ") order by BnFinal desc limit 1"; //print $Select;exit; $Rs = safe_r_sql($Select); if (safe_num_rows($Rs) == 1) { $this->RowBn = safe_fetch($Rs); } else { // fall back if no Backnumber creates from template! include_once 'Tournament/BackNumberEmpty.php'; $this->RowBn = emptyBackNumber(); } $this->Rotation = $this->RowBn->BnOffsetX != 0 || $this->RowBn->BnOffsetY != 0; $this->RotX = $this->RowBn->BnWidth / 2; $this->RotY = $this->RowBn->BnOffsetY / 2; // TargetNo Specs $this->TargetNoFont = ($this->RowBn->BnTargetNo & 4) == 4 ? $this->FontFix : (($this->RowBn->BnTargetNo & 2) == 2 ? 'dejavuserif' : $this->FontStd); $this->TargetNoStyle = ($this->RowBn->BnTargetNo & 8 ? 'B' : '') . ($this->RowBn->BnTargetNo & 16 ? 'I' : ''); $this->TargetNoColor = array(base_convert(substr($this->RowBn->BnTnoColor, 0, 2), 16, 10), base_convert(substr($this->RowBn->BnTnoColor, 2, 2), 16, 10), base_convert(substr($this->RowBn->BnTnoColor, 4, 2), 16, 10)); $this->TargetNoAlign = ($this->RowBn->BnTargetNo & 96) == 64 ? 'L' : (($this->RowBn->BnTargetNo & 96) == 32 ? 'R' : 'C'); // Athlete Specs $this->AthleteFont = ($this->RowBn->BnAthlete & 4) == 4 ? $this->FontFix : (($this->RowBn->BnAthlete & 2) == 2 ? 'dejavuserif' : $this->FontStd); $this->AthleteStyle = ($this->RowBn->BnAthlete & 8 ? 'B' : '') . ($this->RowBn->BnAthlete & 16 ? 'I' : ''); $this->AthleteColor = array(base_convert(substr($this->RowBn->BnAthColor, 0, 2), 16, 10), base_convert(substr($this->RowBn->BnAthColor, 2, 2), 16, 10), base_convert(substr($this->RowBn->BnAthColor, 4, 2), 16, 10)); $this->AthleteAlign = ($this->RowBn->BnAthlete & 96) == 64 ? 'L' : (($this->RowBn->BnAthlete & 96) == 32 ? 'R' : 'C'); if ($this->RowBn->BnCapitalFirstName) { $this->FirstNameAllCaps = true; } // Country Specs $this->CountryFont = ($this->RowBn->BnCountry & 4) == 4 ? $this->FontFix : (($this->RowBn->BnCountry & 2) == 2 ? 'dejavuserif' : $this->FontStd); $this->CountryStyle = ($this->RowBn->BnCountry & 8 ? 'B' : '') . ($this->RowBn->BnCountry & 16 ? 'I' : ''); $this->CountryColor = array(base_convert(substr($this->RowBn->BnCoColor, 0, 2), 16, 10), base_convert(substr($this->RowBn->BnCoColor, 2, 2), 16, 10), base_convert(substr($this->RowBn->BnCoColor, 4, 2), 16, 10)); $this->CountryAlign = ($this->RowBn->BnCountry & 96) == 64 ? 'L' : (($this->RowBn->BnCountry & 96) == 32 ? 'R' : 'C'); // background temp creation if ($this->RowBn->ImgSize) { $this->BackGroundFile = tempnam('/tmp', 'bgf'); $img = imagecreatefromstring($this->RowBn->BnBackground); if (!imagepng($img, $this->BackGroundFile)) { die('could not create image'); } } $Orientation = $this->RowBn->BnWidth > $this->RowBn->BnHeight ? 'L' : 'P'; $this->setPageOrientation($Orientation); $this->setPageFormat(array($this->RowBn->BnWidth, $this->RowBn->BnHeight), $Orientation); $this->SetFont($this->FontStd, '', 10); $this->AliasNbPages(); $this->setPrintHeader(false); $this->setPrintFooter(false); $this->SetMargins(10, 10, 10); $this->SetAutoPageBreak(false, 10); $this->SetAuthor('http://www.ianseo.net'); $this->SetCreator('Software Design by Ianseo'); $this->SetTitle('IANSEO - Integrated Result System (release ' . ProgramVersion . ')'); $this->SetSubject('BackNo'); }
function LabelPDF($Width = 0, $Height = 0) { parent::__construct(''); if ($Width and $Height) { $this->setPageFormat(array($Width, $Height), $Width > $Height ? 'L' : 'P'); } $this->setPrintHeader(false); $this->setPrintFooter(false); $this->SetMargins(0, 0, 0); $this->SetAutoPageBreak(false, 0); $this->SetColors(); $this->AddFont('barcode'); }
function ScorePDF($Portrait = true) { parent::__construct('Scorecard', $Portrait); $this->setPrintHeader(false); $this->setPrintFooter(false); $this->SetMargins(10, 10, 10); $this->SetAutoPageBreak(false, 10); $this->PrintLogo = true; $this->PrintHeader = true; $this->PrintDrawing = true; $this->PrintFlags = true; $this->PrintTotalCols = false; $this->PrintBarcode = false; $this->SetSubject('Scorecard'); $this->SetColors(); }
function OrisPDF($DocNumber, $DocTitle, $headers = '') { parent::__construct($DocTitle, true, $headers); $this->AliasNbPages('{}'); $this->Title = $DocTitle; $this->Number = $DocNumber; $this->Event = ''; $this->EvPhase = ''; if (isset($_REQUEST["ReportCreated"]) && preg_match("/^[0-9]{12}\$/i", $_REQUEST["ReportCreated"])) { $this->utsReportCreated = mktime(substr($_REQUEST["ReportCreated"], 8, 2), substr($_REQUEST["ReportCreated"], 10, 2), 0, substr($_REQUEST["ReportCreated"], 4, 2), substr($_REQUEST["ReportCreated"], 6, 2), substr($_REQUEST["ReportCreated"], 0, 4)); } else { $this->utsReportCreated = strtotime("now"); } $this->SetSubject($DocNumber . ' - ' . $DocTitle); $this->SetDefaultColor(); $this->SetMargins(OrisPDF::leftMargin, OrisPDF::topMargin, OrisPDF::leftMargin); $this->SetAutoPageBreak(true, OrisPDF::bottomMargin); }