//print $Update . '<br><br>'; // if() if ($RsUp) { $Msg .= get_text('CmdOk') . '<br>'; } else { $Msg .= '<br>'; } } // rank distanza CalcQualRank($Dist, '%'); // rank totale CalcQualRank(0, '%'); // rank abs sulla distanza CalcRank($Dist); // rank abs totale CalcRank(0); // squadre MakeTeams(NULL, NULL); MakeTeamsAbs(NULL, null, null); $Msg .= get_text('CmdImport', 'HTT') . ": " . get_text('CmdOk'); } if (!empty($_SESSION['OvrHost'])) { OvrExport($xSession, $Dist, $LastArr); } } else { $Sql = "SELECT HhtData.* " . "FROM HhtData " . ($team == 0 ? "INNER JOIN Finals ON HdEvent=FinEvent AND HdMatchNo=FinMatchNo AND HdTournament=FinTournament AND HdTeamEvent=0 " : "INNER JOIN TeamFinals ON HdEvent=TfEvent AND HdMatchNo=TfMatchNo AND HdTournament=TfTournament AND HdTeamEvent=1 ") . "WHERE HdFinScheduling=" . StrSafe_DB($when) . " AND HdTeamEvent=" . StrSafe_DB($team) . " AND HdArrowStart=" . StrSafe_DB($FirstArr) . " AND HdTournament=" . StrSafe_DB($_SESSION['TourId']) . " AND HdHhtId=" . StrSafe_DB($_REQUEST['x_Hht']) . " " . "ORDER BY HdTargetNo ASC "; $Rs = safe_r_sql($Sql); if (safe_num_rows($Rs) > 0 && !IsBlocked($team == 0 ? BIT_BLOCK_IND : BIT_BLOCK_TEAM)) { while ($myRow = safe_fetch($Rs)) { UpdateArrowString($myRow->HdMatchNo, $myRow->HdEvent, $myRow->HdTeamEvent, $myRow->HdArrowString, $myRow->HdArrowStart, $myRow->HdArrowEnd); $Msg .= get_text('Importing', 'HTT', substr($myRow->HdTargetNo, 0)) . '...' . get_text('CmdOk') . '<br>';
<?php /* - CalcRank.php - Calcola la rank (anche l'abs). Se riceve Dist=1,2,.... calcola la rank sulla distanza Dist; se non lo riceve, calcola la rank sul totale */ require_once dirname(dirname(__FILE__)) . '/config.php'; require_once 'Fun_Qualification.local.inc.php'; require_once 'Common/Fun_Sessions.inc.php'; require_once 'Common/Fun_FormatText.inc.php'; require_once 'Common/Lib/Obj_RankFactory.php'; if (!CheckTourSession()) { print get_text('CrackError'); exit; } $Errore = 0; if (!IsBlocked(BIT_BLOCK_QUAL)) { $Dist = isset($_REQUEST['Dist']) ? $_REQUEST['Dist'] : 0; $Errore = CalcRank($Dist); } else { $Errore = 1; } // produco l'xml di ritorno header('Content-Type: text/xml'); print '<response>' . "\n"; print '<error>' . $Errore . '</error>' . "\n"; print '<msg>' . ($Errore == 1 ? get_text('CalcRankError', 'Tournament') : get_text('CalcRankOk', 'Tournament')) . '</msg>'; print '</response>' . "\n";