Exemplo n.º 1
0
        $pdf->PrintBarcode = true;
    }
    if (isset($_REQUEST["ScoreDraw"]) && $_REQUEST["ScoreDraw"] == "Data") {
        $pdf->NoDrawing();
    }
    if (isset($_REQUEST["ScoreDraw"]) && $_REQUEST["ScoreDraw"] == "CompleteTotals") {
        $pdf->PrintTotalColumns();
    }
    $Ath4Target = 4;
    $session = intval($_REQUEST['x_Session']);
}
if ($session > 0) {
    $ses = GetSessions(null, false, array($session . '_Q'));
    $Ath4Target = $ses[0]->SesAth4Target;
}
$defScoreX = $pdf->getSideMargin();
$defScoreX2 = ($pdf->GetPageWidth() + $pdf->getSideMargin()) / 2;
$defScoreY = $pdf->getSideMargin();
$defScoreY2 = ($pdf->GetPageHeight() + $pdf->getSideMargin()) / 2;
$defScoreW = ($pdf->GetPageWidth() - $pdf->getSideMargin() * 3) / 2;
$defScoreH = ($pdf->GetPageHeight() - $pdf->getSideMargin() * 3) / 2;
if ($Ath4Target == 2) {
    $defScoreX = $pdf->getSideMargin() * 3;
    $defScoreH = $pdf->GetPageWidth() - $pdf->getSideMargin() * 2;
    $defScoreW = ($pdf->GetPageHeight() - $defScoreX * 3) / 2;
} elseif ($Ath4Target == 3) {
    $defScoreH = $pdf->GetPageWidth() - $pdf->getSideMargin() * 2;
    $defScoreW = ($pdf->GetPageHeight() - $pdf->getSideMargin() * 4) / 3;
}
if (!empty($_REQUEST['QRCode'])) {
    $QRCodeX = 0;
Exemplo n.º 2
0
<?php

require_once dirname(dirname(__FILE__)) . '/config.php';
require_once 'Common/pdf/ScorePDF.inc.php';
require_once 'Common/Fun_FormatText.inc.php';
$pdf = new ScorePDF(true);
$NumEnd = 12;
$NumDistances = 1;
$defScoreX = $pdf->getSideMargin();
$defScoreX2 = ($pdf->GetPageWidth() + $pdf->getSideMargin()) / 2;
$defScoreY = $pdf->getSideMargin();
$defScoreY2 = ($pdf->GetPageHeight() + $pdf->getSideMargin()) / 2;
$defScoreW = ($pdf->GetPageWidth() - $pdf->getSideMargin() * 3) / 2;
$defScoreH = ($pdf->GetPageHeight() - $pdf->getSideMargin() * 3) / 2;
$MisArray = array(1 => array($defScoreX, $defScoreY), 2 => array($defScoreX2, $defScoreY), 3 => array($defScoreX, $defScoreY2), 4 => array($defScoreX2, $defScoreY2), 5 => array($defScoreX, $defScoreY), 6 => array($defScoreX2, $defScoreY), 7 => array($defScoreX, $defScoreY2), 8 => array($defScoreX2, $defScoreY2));
//$MyQuery = "SELECT TtNumEnds,TtNumDist FROM Tournament INNER JOIN Tournament*Type AS tt ON ToType=TtId WHERE ToId=" . StrSafe_DB($_SESSION['TourId']);
$MyQuery = "SELECT ToNumEnds AS TtNumEnds,ToNumDist AS TtNumDist FROM Tournament WHERE ToId=" . StrSafe_DB($_SESSION['TourId']);
$Rs = safe_r_sql($MyQuery);
if (safe_num_rows($Rs) == 1) {
    $r = safe_fetch($Rs);
    $NumEnd = $r->TtNumEnds;
    $NumDistances = $r->TtNumDist;
}
$FillWithArrows = false;
if (isset($_REQUEST["ScoreFilled"]) && $_REQUEST["ScoreFilled"] == 1) {
    $FillWithArrows = true;
}
$pdf->FillWithArrows = $FillWithArrows;
if (!(isset($_REQUEST["ScoreHeader"]) && $_REQUEST["ScoreHeader"] == 1)) {
    $pdf->HideHeader();
}
Exemplo n.º 3
0
    $pdf->HideFlags();
}
if (isset($_REQUEST["ScoreDraw"]) && $_REQUEST["ScoreDraw"] == "Data") {
    $pdf->NoDrawing();
}
// lets start with 12 collecting tickets of 3 arrows
// Landscape mode (2 or 3 athletes)
// 10  07  04  01
// 11  08  05  02
// 12  09  06  03
// Portrait mode (4 athletes)
// 12  11  10
// 09  08  07
// 06  05  04
// 03  02  01
$Margin = $pdf->getSideMargin();
$XScorePos = array();
$YScorePos = array();
if ($Portrait) {
    // portrait mode!
    $NumW = 3;
    $NumH = ceil($NumEnd * 3 / (IANSEO_ARROWS * $NumW));
    if ($NumW > $NumH) {
        $NumW = $NumH;
        $NumH = 3;
    }
} else {
    // Landscape mode!
    $NumH = 3;
    $NumW = ceil($NumEnd * 3 / (IANSEO_ARROWS * $NumH));
}