コード例 #1
0
} else {
    foreach (range($NumW - 1, 0) as $c) {
        foreach (range(0, $NumH - 1) as $r) {
            $XScorePos[] = $Margin + ($ScoreW + $Margin) * $c;
            $YScorePos[] = $Margin + ($ScoreH + $Margin) * $r;
        }
    }
}
if (isset($_REQUEST["ScoreDraw"]) && $_REQUEST['ScoreDraw'] == "Draw") {
    $pdf->AddPage();
    $Data = array();
    foreach (range(1, $Ath4Target) as $k) {
        $Data[] = '';
    }
    foreach ($XScorePos as $k => $Xpos) {
        $pdf->DrawCollector($Xpos, $YScorePos[$k], $ScoreW, $ScoreH, $k + 1, IANSEO_ARROWS, $Data);
    }
    $oldline = $pdf->GetLineStyle();
    $pdf->SetLineStyle(array('width' => 0.25, 'dash' => '2,5'));
    foreach (range(1, $NumW - 1) as $X) {
        $pdf->Line($x = $Margin * 0.5 + $X * ($ScoreW + $Margin), 0, $x, $pdf->getPageHeight());
    }
    foreach (range(1, $NumH - 1) as $Y) {
        $pdf->Line(0, $y = $Margin * 0.5 + $Y * ($ScoreH + $Margin), $pdf->getPageWidth(), $y);
    }
    $pdf->SetLineStyle($oldline);
} else {
    $MyQuery = 'SELECT SUBSTRING(at.AtTargetNo,2) as tNo, CoCode, CoName, Ath, Noc, Cat, Td1, Td2, Td3, Td4, Td5, Td6, Td7, Td8, ' . 'QuD1Arrowstring, QuD2Arrowstring, QuD3Arrowstring, QuD4Arrowstring, QuD5Arrowstring, QuD6Arrowstring, QuD7Arrowstring, QuD8Arrowstring, ' . 'QuD1Score, QuD2Score, QuD3Score, QuD4Score, QuD5Score, QuD6Score, QuD7Score, QuD8Score, ' . 'printD1gx, printD2gx, printD3gx, printD4gx, printD5gx, printD6gx, printD7gx, printD8gx ' . ' FROM AvailableTarget as at ';
    if (isset($_REQUEST["noEmpty"]) && $_REQUEST["noEmpty"] == 1) {
        $MyQuery .= "INNER JOIN\n\t\t\t\t(SELECT DISTINCT EnTournament, SUBSTRING(QuTargetNo,1,4) as TgtNo\n\t\t\t\tFROM Qualifications\n\t\t\t\tINNER JOIN Entries On QuId=EnId\n\t\t\t\tWHERE EnTournament = " . StrSafe_DB($_SESSION['TourId']) . " AND EnAthlete=1 AND QuTargetNo>='" . $_REQUEST['x_Session'] . str_pad($_REQUEST['x_From'], TargetNoPadding, "0", STR_PAD_LEFT) . "A' AND QuTargetNo<='" . $_REQUEST['x_Session'] . str_pad($_REQUEST['x_To'], TargetNoPadding, "0", STR_PAD_LEFT) . "Z'\n\t\t\t\t) as Tgt ON at.AtTournament=Tgt.EnTournament AND SUBSTRING(at.AtTargetNo,1,4)=Tgt.TgtNo\t";
    }