1) { ?>id="liMatch" class="liRndS" } else { ?>id="liEntry" style="padding:4px 0px 0px 0px;" } ?>>
if ($label_player_1 == "" && $x < 2) {
$key = array_search($s['ref_match_1'], $array_ref_section);
$key++;
echo "Q" . $key;
} else {
echo $label_player_1;
}
?>
if ($x > 1) { ?>
$label_score = "";
if ($s['ref_match_1'] > 0) {
$prec_match_result = $match->getAssociatedBracketMatch($s['ref_match_1'], 'bracket');
$label_score = "0 | 0";
if ($prec_match_result['end_status'] == "N2" || $prec_match_result['end_status'] == "N1") {
$label_score = "NON DISPUTATO";
} elseif ($prec_match_result['end_status'] != "") {
if ($prec_match_result['end_status'] == "V1" || $prec_match_result['end_status'] == "R2") {
$score_1 = explode(", ", $prec_match_result['score_player_1']);
$score_2 = explode(", ", $prec_match_result['score_player_2']);
} elseif ($prec_match_result['end_status'] == "V2" || $prec_match_result['end_status'] == "R1") {
$score_1 = explode(", ", $prec_match_result['score_player_2']);
$score_2 = explode(", ", $prec_match_result['score_player_1']);
}
$k = 0;
$label_score = "";
foreach ($score_1 as $sc) {
$label_score .= $sc . "-" . $score_2[$k] . " ";
$k++;
}
if ($tour->isTeamTournament($detail['id'])) {
$pt_home = $match->countMatchWin($match_detail['team_1'], $s['id'], 'bracket');
$pt_away = $match->countMatchWin($match_detail['team_2'], $s['id'], 'bracket');
if ($pt_home == "" && $pt_away > 0) {
$pt_home = 0;
}
if ($pt_away == "" && $pt_home > 0) {
$pt_away = 0;
}
$label_score = $pt_home . "-" . $pt_away . " ";
}
if ($prec_match_result['end_status'] == "R1" || $prec_match_result['end_status'] == "R2") {
$label_score = " RITIRATO";
}
}
}
if ($tour->isDoubleTournament($detail['id'])) {
echo "
" . $label_score . "";
} else {
echo $label_score;
}
?>
} ?>
if ($x > 1) { ?>
} else { ?>
} ?>
if ($label_player_2 == "" && $x < 2) {
$key = array_search($s['ref_match_2'], $array_ref_section);
$key++;
echo "Q" . $key;
} else {
echo $label_player_2;
}
?>
if ($x > 1) { ?>
$label_score = "";
if ($s['ref_match_2'] > 0) {
$prec_match_result = $match->getAssociatedBracketMatch($s['ref_match_2'], 'bracket');
$label_score = "0 | 0";
if ($prec_match_result['end_status'] == "N2" || $prec_match_result['end_status'] == "N1") {
$label_score = "NON DISPUTATO";
} elseif ($prec_match_result['end_status'] != "") {
if ($prec_match_result['end_status'] == "V1" || $prec_match_result['end_status'] == "R2") {
$score_1 = explode(", ", $prec_match_result['score_player_1']);
$score_2 = explode(", ", $prec_match_result['score_player_2']);
} elseif ($prec_match_result['end_status'] == "V2" || $prec_match_result['end_status'] == "R1") {
$score_1 = explode(", ", $prec_match_result['score_player_2']);
$score_2 = explode(", ", $prec_match_result['score_player_1']);
}
$k = 0;
$label_score = "";
foreach ($score_1 as $sc) {
$label_score .= $sc . "-" . $score_2[$k] . " ";
$k++;
}
if ($tour->isTeamTournament($detail['id'])) {
$pt_home = $match->countMatchWin($match_detail['team_1'], $s['id'], 'bracket');
$pt_away = $match->countMatchWin($match_detail['team_2'], $s['id'], 'bracket');
if ($pt_home == "" && $pt_away > 0) {
$pt_home = 0;
}
if ($pt_away == "" && $pt_home > 0) {
$pt_away = 0;
}
$label_score = $pt_home . "-" . $pt_away . " ";
}
if ($prec_match_result['end_status'] == "R1" || $prec_match_result['end_status'] == "R2") {
$label_score = " RITIRATO";
}
}
}
if ($tour->isDoubleTournament($detail['id'])) {
echo "
" . $label_score . "";
} else {
echo $label_score;
}
?>
} ?>
if ($s['round'] == "finale") {
if ($match_detail['end_status'] == "V1") {
if ($tour->isTeamTournament($detail['id'])) {
$team1 = $team->getDetail($match_detail['team_1']);
$head = $tour->isHeadOfSeries($detail['id'], $match_detail['team_1']);
$winner_label_player = strtoupper($team1['name']);
} else {
$player1 = $usr->getDetail($match_detail['player_1']);
$head = $tour->isHeadOfSeries($detail['id'], $match_detail['player_1']);
if ($player1['id'] > 0) {
if ($head > 0) {
$winner_label_player = "