if ($Events) { $MyQuery .= "AND EvCode in (" . implode(',', $Events) . ") "; } $MyQuery .= ' ORDER BY EvCode, FinMatchNo '; } //DEBUG_svela($MyQuery, true); $Rs = safe_r_sql($MyQuery); // Se il Recordset รจ valido e contiene almeno una riga if (safe_num_rows($Rs) > 0) { $defArrowTotW = ($pdf->GetPageWidth() - 3 * $pdf->getSideMargin()) / 2 * (6 / 15); //12; $defTotalW = ($pdf->GetPageWidth() - 3 * $pdf->getSideMargin()) / 2 * (3 / 15); //16; $defGoldW = ($pdf->GetPageWidth() - 3 * $pdf->getSideMargin()) / 2 * (1 / 15); //7; $ScoreHeight = $pdf->GetPageHeight() * 0.23; $WhereStartX = array($pdf->getSideMargin(), $pdf->GetPageWidth() / 2 + $pdf->getSideMargin() / 2, $pdf->getSideMargin(), $pdf->GetPageWidth() / 2 + $pdf->getSideMargin() / 2, $pdf->getSideMargin(), $pdf->GetPageWidth() / 2 + $pdf->getSideMargin() / 2); $WhereStartY = array($pdf->GetPageHeight() * 0.2, $pdf->GetPageHeight() * 0.2, $pdf->GetPageHeight() * 0.44, $pdf->GetPageHeight() * 0.44, $pdf->GetPageHeight() * 0.68, $pdf->GetPageHeight() * 0.68); $WhereX = NULL; $WhereY = NULL; $RowNo = 0; while ($MyRow = safe_fetch($Rs)) { // if($MyRow->EvFinalFirstPhase==48 || $MyRow->EvFinalFirstPhase==24) // $Fasi[0]=get_text('24_Phase'); if ($MyRow->EvFinalFirstPhase == 48) { $Fasi[0] = get_text('48_Phase'); $Fasi[1] = get_text('24_Phase'); } elseif ($MyRow->EvFinalFirstPhase == 24) { $Fasi[1] = get_text('24_Phase'); } if ($RowNo++ != 0) {
<?php require_once dirname(dirname(dirname(__FILE__))) . '/config.php'; require_once 'Common/pdf/ResultPDF.inc.php'; require_once 'Common/Fun_FormatText.inc.php'; require_once 'Common/Fun_Phases.inc.php'; $pdf = new ResultPDF(get_text('TeamFinal'), true); $pdf->setlinewidth(0.1); $GoldW = ($pdf->GetPageWidth() - 3 * $pdf->getSideMargin()) / 2 * (1 / 18); $ArrowTotW = ($pdf->GetPageWidth() - 3 * $pdf->getSideMargin()) / 2 * (9 / 18); $TotalW = ($pdf->GetPageWidth() - 3 * $pdf->getSideMargin()) / 2 * (3 / 18); $GridHeight = ($pdf->GetPageHeight() - 90) / 2; $StdCols = 1; $NumRow = 4; $CellH = 7; /*$Select = "SELECT (TtElabTeam=0) as StdTournament, (TtElabTeam=2) as ThreeDTournament " . "FROM Tournament INNER JOIN Tournament*Type ON ToType=TtId " . "WHERE ToId=" . StrSafe_DB($_SESSION['TourId']) . " ";*/ $Select = "SELECT (ToElabTeam=0) as StdTournament, (ToElabTeam=2) as ThreeDTournament " . "FROM Tournament " . "WHERE ToId=" . StrSafe_DB($_SESSION['TourId']) . " "; $RsTour = safe_r_sql($Select); if (safe_num_rows($RsTour) == 1) { $r = safe_fetch($RsTour); $StdCols = $r->StdTournament; $NumRow = $r->ThreeDTournament; safe_free_result($RsTour); } $NumRow = $NumRow == 1 ? 8 : 4; $Fasi = array(get_text('8_Phase'), get_text('4_Phase'), get_text('2_Phase'), get_text('0_Phase')); $TgtNoFasi = array('s8', 's4', 's2', 'sGo'); $Start2FirstPhase = array(8 => 0, 4 => 1, 2 => 2, 1 => 3, 0 => 3);