예제 #1
0
$MyQuery .= "AND QuSession = " . StrSafe_DB($_REQUEST["Session"]) . " ";
$MyQuery .= "ORDER BY QuTargetNo, CoCode, Name, CoName, FirstName ";
//*DEBUG*/echo $MyQuery;exit();
$Rs = safe_r_sql($MyQuery);
if ($Rs) {
    $ShowStatusLegend = false;
    $CurSession = -1;
    $OldTarget = '';
    while ($MyRow = safe_fetch($Rs)) {
        if ($CurSession != $MyRow->Session || !$pdf->SamePage(4) || $MyRow->TargetLetter == 'A' && !$pdf->SamePage(16)) {
            $TmpSegue = !$pdf->SamePage(4);
            if ($MyRow->TargetLetter == 'A' && !$pdf->SamePage(16)) {
                $TmpSegue = true;
                $pdf->AddPage();
            } elseif ($CurSession != -1) {
                $pdf->SetXY(10, $pdf->GetY() + 5);
            }
            $CurSession = $MyRow->Session;
            $pdf->SetFont($pdf->FontStd, 'B', 10);
            $pdf->Cell(190, 6, get_text('Session') . " " . $CurSession . " - " . get_text('Distance', 'HTT') . " " . $_REQUEST["Distance"], 1, 1, 'C', 1);
            if ($TmpSegue) {
                $pdf->SetXY(170, $pdf->GetY() - 6);
                $pdf->SetFont($pdf->FontStd, 'I', 6);
                $pdf->Cell(30, 6, get_text('Continue'), 0, 1, 'R', 0);
            }
            $pdf->SetFont($pdf->FontStd, 'B', 7);
            $pdf->Cell(11, 4, get_text('Target'), 1, 0, 'C', 1);
            $pdf->Cell(10, 4, get_text('Code', 'Tournament'), 1, 0, 'C', 1);
            $pdf->Cell(44, 4, get_text('Athlete'), 1, 0, 'L', 1);
            $pdf->Cell(16, 4, get_text('Country'), 1, 0, 'L', 1);
            if (!HideCols) {
예제 #2
0
if ($Rs) {
    $ShowStatusLegend = false;
    $OldTeam = '#@#@#';
    $isFirstTime = true;
    $TotalPrice = 0;
    while ($MyRow = safe_fetch($Rs)) {
        if ($OldTeam != $MyRow->NationCode) {
            if (!$isFirstTime) {
                $pdf->SetFont($pdf->FontStd, '', 8);
                $pdf->Cell(165, 15, get_text('Cash', 'Tournament') . ":", 0, 0, 'R', 0);
                $pdf->SetFont($pdf->FontStd, 'B', 12);
                $pdf->Cell(25, 15, NumFormat($TotalPrice, 2) . " " . $pdf->writeCurrency(), 0, 1, 'R', 0);
                $pdf->AddPage();
            }
            $isFirstTime = false;
            $pdf->SetXY(10, $pdf->GetY() + 5);
            $pdf->SetFont($pdf->FontStd, '', 8);
            $pdf->Cell($pdf->GetStringWidth(get_text('Country')) + 5, 10, get_text('Country'), 0, 0, 'L', 0);
            $pdf->SetFont($pdf->FontStd, 'B', 12);
            $pdf->Cell(15, 10, $MyRow->NationCode, 0, 0, 'C', 0);
            $pdf->Cell(50, 10, $MyRow->Nation, 0, 1, 'L', 0);
            $pdf->SetFont($pdf->FontStd, '', 8);
            $pdf->Cell(19, 10, get_text('Partecipants'), 0, 1, 'L', 0);
            $pdf->SetFont($pdf->FontStd, 'B', 7);
            $pdf->Cell(10, 4, '', 0, 0, 'C', 0);
            $pdf->Cell(10, 4, get_text('SessionShort', 'Tournament'), 1, 0, 'C', 1);
            $pdf->Cell(15, 4, get_text('Target'), 1, 0, 'C', 1);
            $pdf->Cell(10, 4, get_text('Code', 'Tournament'), 1, 0, 'C', 1);
            $pdf->Cell(45, 4, get_text('Athlete'), 1, 0, 'L', 1);
            $pdf->Cell(15, 4, get_text('AgeCl'), 1, 0, 'C', 1);
            $pdf->Cell(10, 4, get_text('SubCl', 'Tournament'), 1, 0, 'C', 1);
예제 #3
0
        $WhereY = $WhereStartY;
        //Intestazione Atleta
        $pdf->SetY($pdf->GetPageHeight() * 0.2 - 23);
        $pdf->SetFont($pdf->FontStd, '', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.1, 6, get_text('Athlete') . ': ', 'TL', 0, 'L', 0);
        $pdf->SetFont($pdf->FontStd, 'B', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.8 - 20, 6, $MyRow->Athlete, 'T', 1, 'L', 0);
        $pdf->SetFont($pdf->FontStd, '', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.1, 6, get_text('Country') . ': ', 'L', 0, 'L', 0);
        $pdf->SetFont($pdf->FontStd, 'B', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.8 - 20, 6, $MyRow->CoName . (strlen($MyRow->CoCode) > 0 ? ' (' . $MyRow->CoCode . ')' : ''), 0, 1, 'L', 0);
        $pdf->SetFont($pdf->FontStd, '', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.1, 6, get_text('DivisionClass') . ': ', 'LB', 0, 'L', 0);
        $pdf->SetFont($pdf->FontStd, 'B', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.8 - 20, 6, get_text($MyRow->EvEventName, '', '', true), 'B', 1, 'L', 0);
        $pdf->SetXY($pdf->GetPageWidth() * 0.9 - 10, $pdf->GetY() - 18);
        $pdf->SetFont($pdf->FontStd, 'B', 10);
        $pdf->Cell($pdf->GetPageWidth() * 0.1, 6, get_text('Rank'), 'TLR', 1, 'C', 1);
        $pdf->SetXY($pdf->GetPageWidth() * 0.9 - 10, $pdf->GetY());
        $pdf->SetFont($pdf->FontStd, 'B', 25);
        $pdf->Cell($pdf->GetPageWidth() * 0.1, 12, $MyRow->GrPosition, 'BLR', 1, 'C', 1);
        $WhichScoreEnd = 7;
        if ($MyRow->EvFinalFirstPhase == 64 || $MyRow->EvFinalFirstPhase == 48) {
            $WhichScoreEnd = 6;
        }
        for ($WhichScore = $Start2FirstPhase[$MyRow->EvFinalFirstPhase]; $WhichScore < $WhichScoreEnd; $WhichScore++) {
            DrawScore($pdf, $MyRow, $WhichScore, $WhereX[$WhichScore - $Start2FirstPhase[$MyRow->EvFinalFirstPhase]], $WhereY[$WhichScore - $Start2FirstPhase[$MyRow->EvFinalFirstPhase]], $WhichScore == $WhichScoreEnd - 1);
        }
    }
    safe_free_result($Rs);
}
예제 #4
0
$pdf->SetFont($pdf->FontStd, '', 10);
$pdf->Cell(40, 7, get_text('TourCommitee', 'Tournament') . ": ", 'L', 0, 'L', 0);
$pdf->SetFont($pdf->FontStd, 'B', 10);
$pdf->Cell(150, 7, $RowTournament->ToCommitee . " - " . $RowTournament->ToComDescr, 'R', 1, 'L', 0);
//Luogo e data di Svolgimento
$pdf->SetFont($pdf->FontStd, '', 10);
$pdf->Cell(40, 7, get_text('TourWhen', 'Tournament') . ": ", 'L', 0, 'L', 0);
$pdf->SetFont($pdf->FontStd, 'B', 10);
$pdf->Cell(50, 7, TournamentDate2String($RowTournament->DtFrom, $RowTournament->DtTo), 0, 0, 'L', 0);
$pdf->SetFont($pdf->FontStd, '', 10);
$pdf->Cell(30, 7, get_text('TourWhere', 'Tournament') . ": ", 0, 0, 'R', 0);
$pdf->SetFont($pdf->FontStd, 'B', 10);
$pdf->Cell(70, 7, $RowTournament->ToWhere, 'R', 1, 'L', 0);
$pdf->SetFont($pdf->FontStd, 'B', 1);
$pdf->Cell(190, 0.5, '', 1, 1, 'L', 1);
$pdf->SetXY($pdf->GetX(), $pdf->GetY() + 5);
//Parte di Report vera e propria
/*$MySql = "SELECT FrqId, FrqStatus, FrqQuestion, FrqTip, FrqType, FrqOptions, TtCategory "
	. "FROM FinalReportQ "
	. "INNER JOIN Tournament ON ToId=" . StrSafe_DB($_SESSION['TourId']) . " "
	. "INNER JOIN Tournament*Type ON TtId=ToType ";
if($AllQuestions)
	$MySql .= "WHERE FrqStatus > 0 ";
else
	$MySql .= "WHERE (FrqStatus & TtCategory) > 0 ";
$MySql .= "ORDER BY FrqId";*/
$MySql = "SELECT FrqId, FrqStatus, FrqQuestion, FrqTip, FrqType, FrqOptions, ToCategory AS TtCategory " . "FROM FinalReportQ " . "INNER JOIN Tournament ON ToId=" . StrSafe_DB($_SESSION['TourId']) . " ";
if ($AllQuestions) {
    $MySql .= "WHERE FrqStatus > 0 ";
} else {
    $MySql .= "WHERE (FrqStatus & ToCategory) > 0 ";
예제 #5
0
safe_free_result($Rs);
$SqlEmpty = $Sql;
$Sql .= "ClId " . "FROM Classes " . "LEFT JOIN Entries ON TRIM(ClId) = TRIM(EnClass) AND ClTournament=EnTournament " . "LEFT JOIN Qualifications ON EnId = QuId " . "WHERE EnTournament = " . StrSafe_DB($_SESSION['TourId']) . " " . "GROUP BY ClId " . "ORDER BY ClViewOrder";
$SqlEmpty .= "'--' AS ClId " . "FROM Entries " . "LEFT JOIN Qualifications ON EnId = QuId " . "WHERE EnTournament = " . StrSafe_DB($_SESSION['TourId']) . " AND EnClass='' " . "GROUP BY EnClass ";
$Rs = safe_r_sql($Sql);
$RsEmpty = safe_r_sql($SqlEmpty);
if ($Rs && count($DivArray) > 0) {
    $ShowStatusLegend = false;
    $FirstTime = true;
    $DivSize = ($pdf->getPageWidth() - 35) / count($DivArray);
    $SesSize = $DivSize / (count($SesArray) + 1);
    while ($MyRow = safe_fetch($Rs)) {
        if ($FirstTime || !$pdf->SamePage(16)) {
            $TmpSegue = !$pdf->SamePage(16);
            $pdf->SetFont($pdf->FontStd, 'B', 10);
            $pdf->SetXY(25, $pdf->GetY() + 5);
            $pdf->Cell($pdf->getPageWidth() - 35, 6, get_text('StatClasses', 'Tournament'), 1, 1, 'C', 1);
            if ($TmpSegue) {
                $pdf->SetXY($pdf->getPageWidth() - 40, $pdf->GetY() - 6);
                $pdf->SetFont($pdf->FontStd, 'I', 6);
                $pdf->Cell(30, 6, get_text('Continue'), 0, 1, 'R', 0);
            }
            $pdf->SetX(25);
            $pdf->SetFont($pdf->FontStd, 'B', 10);
            foreach ($DivArray as $Value) {
                $pdf->Cell($DivSize, 6, $Value, 1, 0, 'C', 1);
            }
            $pdf->Cell(0.1, 6, '', 0, 1, 'C', 0);
            $pdf->SetX(25);
            $pdf->SetFont($pdf->FontStd, 'B', 8);
            for ($i = 0; $i < count($DivArray); $i++) {
예제 #6
0
if (isset($_REQUEST["Session"]) && is_numeric($_REQUEST["Session"])) {
    $MyQuery .= "AND QuSession = " . StrSafe_DB($_REQUEST["Session"]) . " ";
}
$MyQuery .= "ORDER BY Name, FirstName, TargetNo ";
$Rs = safe_r_sql($MyQuery);
if ($Rs) {
    $ShowStatusLegend = false;
    $FirstTime = true;
    while ($MyRow = safe_fetch($Rs)) {
        if ($FirstTime || !$pdf->SamePage(4)) {
            $TmpSegue = !$pdf->SamePage(4);
            $StartLetter = substr($MyRow->Name, 0, 1);
            $pdf->SetFont($pdf->FontStd, 'B', 10);
            $pdf->Cell(190, 6, get_text('PartecipantListError', 'Tournament'), 1, 1, 'C', 1);
            if ($TmpSegue) {
                $pdf->SetXY(170, $pdf->GetY() - 6);
                $pdf->SetFont($pdf->FontStd, 'I', 6);
                $pdf->Cell(30, 6, get_text('Continue'), 0, 1, 'R', 0);
            }
            $pdf->SetFont($pdf->FontStd, 'B', 7);
            $pdf->Cell(10, 4, get_text('Code', 'Tournament'), 1, 0, 'C', 1);
            $pdf->Cell(41, 4, get_text('Athlete'), 1, 0, 'L', 1);
            $pdf->Cell(54, 4, get_text('Country'), 1, 0, 'L', 1);
            $pdf->Cell(7, 4, get_text('SessionShort', 'Tournament'), 1, 0, 'C', 1);
            $pdf->Cell(11, 4, get_text('Target'), 1, 0, 'C', 1);
            $pdf->Cell(11, 4, get_text('AgeCl'), 1, 0, 'C', 1);
            $pdf->Cell(8, 4, get_text('SubCl', 'Tournament'), 1, 0, 'C', 1);
            $pdf->Cell(12, 4, get_text('Division'), 1, 0, 'C', 1);
            $pdf->Cell(12, 4, get_text('Cl'), 1, 0, 'C', 1);
            //Disegna i Pallini
            $pdf->DrawParticipantHeader();
예제 #7
0
 $OldDiv = '#@#@#';
 $ColNo = 0;
 $RowY = 0;
 $RowX = 0;
 $MaxHeight = 0;
 //	$pdf->SetAutoPageBreak(false);
 while ($MyRow = safe_fetch($Rs)) {
     if ($OldDiv != $MyRow->DivCode && !$pdf->SamePage($MaxHeight + 20)) {
         $OldTeam = '#@#@#';
     }
     //Cambio di Squadra
     if ($OldTeam != $MyRow->NationCode) {
         if (!$FirstTime) {
             $pdf->AddPage();
         }
         $pdf->SetXY(10, $pdf->GetY() + 5);
         $pdf->SetFont($pdf->FontStd, 'B', 20);
         $pdf->Cell(190, 8, $MyRow->Nation . ' (' . $MyRow->NationCode . ')', 0, 0, 'L', 1);
         $FirstTime = false;
         $RowNo = 0;
         $ColNo = 0;
         $MaxHeight = 0;
         $OldTeam = $MyRow->NationCode;
         $OldDiv = '#@#@#';
     }
     //Cambio di divisione
     if ($OldDiv != $MyRow->DivCode) {
         $RowX = 15;
         $pdf->SetXY($RowX, $pdf->GetY() + 10);
         $pdf->SetFont($pdf->FontStd, 'B', 10);
         $pdf->Cell(185, 7, $MyRow->DivDescription, 0, 1, 'L', 0);