get("countrycode"); $compcode = $request->get("compcode"); $parentcode = $request->get("parentcode"); $matchday = $request->get("matchday"); $matchnum = $request->get("matchnum"); if ( (preg_match("/^[a-z0-9\-\_]+$/", $countrycode)) && (preg_match("/^[a-z0-9\-\_]+$/", $compcode)) && ($comparr = championat_code($countrycode, $compcode)) ) { $GLOBALVAR["statcountry"] = $countrycode; //variable to send to news block $champid = $comparr["champ_id"]; $champname = $comparr["champ_name"]; $champcountry = $comparr["country_name"]; $champcountryid = $comparr["country_id"]; $champdivision = $comparr["champ_division"]; $champtype = $comparr["cup"]; $subchamps = $comparr["sub_champs"]; $forum_url = $comparr["forum_url"]; //parent tournir if ( (ereg("^[a-z0-9\-\_]+$", $parentcode)) && ($parentarr = championat_code($countrycode, $parentcode)) ) { $parentid = $parentarr["champ_id"]; $parentname = $parentarr["champ_name"]; $parentsubchamps = $parentarr["sub_champs"]; } else { $parentid = 0; $parentname = ""; } $champalltours = tours_table($champid); $champscoredtours = active_tours_table($champid); $catcnt = count($champalltours); $cstcnt = count($champscoredtours); $scoredids = array(); for ($i=0; $i<$cstcnt; $i++) { $row = $champscoredtours[$i]; $scoredids[] = $row["id"]; } //define tour_id by its number $actualtour = $champalltours[$matchday-1]; //tour matches data $tourmatches = list_of_match_table($actualtour["id"]); $tmcnt = count($tourmatches); //match data $tourmatch = $tourmatches[$matchnum-1]; $mdata = get_match_data($tourmatch["id"]); $mstadium = $mdata["stadium"]; $mteam1 = $mdata["team1"]; $mteam2 = $mdata["team2"]; $mgoals1 = $mdata["goal1"]; $mgoals2 = $mdata["goal2"]; $mafterpen1 = $mdata["penshots1"]; $mafterpen2 = $mdata["penshots2"]; $mfailedpen1 = $mdata["failed_penshots1"]; $mfailedpen2 = $mdata["failed_penshots2"]; $mcards1 = $mdata["cards1"]; $mcards2 = $mdata["cards2"]; $mbest = $mdata["best_players"]; $msquad1 = getResortedSquad($mteam1["squad"]); $msquad2 = getResortedSquad($mteam2["squad"]); $marbiters = $mdata["arbiters"]; $mstat = $mdata["match_stat"]; } else { $error = 1; /* END OF MODULE-DEPENDENT FUNCTION CALLS */ /* START OF BLOCKS DEFINITION */ //css styles for stat tpl_block_start("addstyle"); print ""; tpl_block_end(); //news block tpl_block_start("pagetitle"); //page title here print $actualtour["tour_name"] . " (" . $mteam1["name"] . " - " . $mteam2["name"] . ")" . " - $champname ($champcountry, $champdivision) - Статистика"; tpl_block_end(); tpl_block_start("cenblock2"); //main central block } ?> 0) { ?>
- Cтадии турнира
Финальная (сводная) стадия
0) print $parentname . " - "; ?>
Эмблема <?php print $champname; ?>
0) { ?>
- Другие стадии

Протокол матча
"; print "
" . $mteam1["name"] . "
"; if (($mdata["match_status"] == 0) || ($mdata["match_status"] == 1) || ($mdata["match_status"] == 5) ){ //waiting, announced or moved print "
-:-
"; } else { print "
" . $mdata["score1"] . ":" . $mdata["score2"] . "
"; if ($mdata["match_status"] == 2) { switch ($mdata["match_extended_status"]) { case "0": print "Live"; break; case "1": print "1Т"; break; case "2": print "П"; break; case "3": print "2Т"; break; case "4": print "После О.В."; break; case "5": print "Д.В."; break; case "6": print "После Д.В."; break; case "7": print "Пен."; break; } }; if ($mdata["match_status"] == 3) { switch ($mdata["match_extended_status"]) { case "6": print "В д.в."; break; case "7": print "Пен-" . $mdata["pen_score1"] . ":" . $mdata["pen_score2"]; break; case "8": print "Тех.рез."; break; } }; if ($tmatch["match_status"] == 4) print "Прерв."; print "
"; } print "
" . $mteam2["name"] . "
"; print "
"; print "
"; print "
\""
"; print "
"; print "" . getVisitorDateType($mdata["match_date"]) . ". " . $mdata["match_time"] . "
"; if ($champcountryid != $mstadium["stadium_country_id"]) print "" . $mstadium["stadium_country"] . "\"\" "; print "" . $mstadium["stadium_city"] . "
"; print $mstadium["stadium_name"] . "
"; if ($mstadium["max_visitors"] > 0) print "Вместимость: " . $mstadium["max_visitors"] . "
"; if ($mstadium["visitors"] != "") print "Зрителей: " . $mstadium["visitors"] . "
"; print "
"; print "
\""
"; print "
"; //goals if ((count($mgoals1) > 0) || (count($mgoals2) > 0)) { print "
Голы
"; print "
"; print "
"; for ($j=0; $j 0) { print "
\"\" " . $grow["minute"] . "'
" . $grow["player_name"]; if (($grow["goal_type"] != "") && (getVisitorGoalType($grow["goal_type"]) != "")) print " (" . getVisitorGoalType($grow["goal_type"]) . ")"; print "
"; if ($grow["assistent_player_id"] > 0) print "
 
(пас - " . $grow["assistent_player_name"] . ")
"; } } print "
"; for ($j=0; $j 0) { print "
" . $grow["minute"] . "' \"\"
" . $grow["player_name"]; if (($grow["goal_type"] != "") && (getVisitorGoalType($grow["goal_type"]) != "")) print " (" . getVisitorGoalType($grow["goal_type"]) . ")"; print "
"; if ($grow["assistent_player_id"] > 0) print "
 
(пас - " . $grow["assistent_player_name"] . ")
"; } } print "
"; print "
"; } //after match penalty shots if (($mdata["pen_score1"] > 0) || ($mdata["pen_score2"] > 0)) { print "
Послематчевые пенальти - " . $mdata["pen_score1"] . ":" . $mdata["pen_score2"] . "
"; print "
"; print "
"; for ($j=0; $j
\"\" Пен
" . $frow["player_name"] . "
"; if ($frow["fail_reason"] != "") print "
 
(" . $frow["fail_reason"] . ")
"; } print "
"; for ($j=0; $j
Пен \"\"
" . $frow["player_name"] . "
"; if ($frow["fail_reason"] != "") print "
 
(" . $frow["fail_reason"] . ")
"; } print ""; print ""; } //failed penalty shots if ((count($mfailedpen1) > 0) || (count($mfailedpen2) > 0)) { print "
Нереализованные пенальти в матче
"; print "
"; print "
"; for ($j=0; $j
\"\" " . $frow["minute"] . "'
" . $frow["player_name"] . "
"; if ($frow["fail_reason"] != "") print "
 
(" . $frow["fail_reason"] . ")
"; } print "
"; for ($j=0; $j
" . $frow["minute"] . "' \"\"
" . $frow["player_name"] . "
"; if ($frow["fail_reason"] != "") print "
 
(" . $frow["fail_reason"] . ")
"; } print ""; print ""; } //cards if ((count($mcards1) > 0) || (count($mcards2) > 0)) { print "
Наказания
"; print "
"; print "
"; for ($j=0; $j
\"\" " . $crow["minute"] . "'
" . $crow["player_name"] . "
"; } print "
"; for ($j=0; $j
" . $crow["minute"] . "' \"\"
" . $crow["player_name"] . "
"; } print ""; print ""; } //best players if (count($mbest) > 0) { print "
Лучшие игроки матча по версии football.by
"; print "
"; for ($i=0; $i" . $mbestarr["player"] . ""; print " - " . $mbestarr["team_name"] . "
"; } print "
"; } print "
"; //squad1 if (count($msquad1) > 0) { print "
"; print "
Состав - " . $mteam1["name"] ."
"; print ""; print ""; print ""; for ($j=0; $j"; print ""; print ""; print ""; print ""; if ($prow["minute_in"] === "") print ""; if (($prow["minute_in"] === 0) && ($prow["minute_out"] == "")) print ""; //весь матч if (($prow["minute_in"] === 0) && ($prow["minute_out"] > 0)) print ""; //вышел в стартовом и заменен if (($prow["minute_in"] > 0) && ($prow["minute_out"] == "")) print ""; //вышел на замену if (($prow["minute_in"] > 0) && ($prow["minute_out"] > 0)) print ""; //вышел на замену и заменен print ""; } print "
АмпСтрИгрокОцЗамены
" . $prow["player_num"] . "" . getVisitorPlayerType($prow["player_amplua"]) . "\"\"" . (($prow["minute_in"] !== 0) ? "" : "") . $prow["player_name"] . "" . (($prow["player_mark"] == 0) ? "-" : $prow["player_mark"]) . "В запасе   \"\" /> " . $prow["minute_out"] . "'\"<\" " . $prow["minute_in"] . "' \"<\" " . $prow["minute_in"] . "'\"\" /> " . $prow["minute_out"] . "'
"; print "
"; } //squad2 if (count($msquad2) > 0) { print "
"; print "
Состав - " . $mteam2["name"] ."
"; print ""; print ""; print ""; for ($j=0; $j"; print ""; print ""; print ""; print ""; if ($prow["minute_in"] === "") print ""; if (($prow["minute_in"] === 0) && ($prow["minute_out"] == "")) print ""; //весь матч if (($prow["minute_in"] === 0) && ($prow["minute_out"] > 0)) print ""; //вышел в стартовом и заменен if (($prow["minute_in"] > 0) && ($prow["minute_out"] == "")) print ""; //вышел на замену if (($prow["minute_in"] > 0) && ($prow["minute_out"] > 0)) print ""; //вышел на замену и заменен print ""; } print "
АмпСтрИгрокОцЗамены
" . $prow["player_num"] . "" . getVisitorPlayerType($prow["player_amplua"]) . "\"\"" . (($prow["minute_in"] !== 0) ? "" : "") . $prow["player_name"] . "" . (($prow["player_mark"] == 0) ? "-" : $prow["player_mark"]) . "В запасе   \"\" /> " . $prow["minute_out"] . "'\"<\" " . $prow["minute_in"] . "' \"<\" " . $prow["minute_in"] . "'\"\" /> " . $prow["minute_out"] . "'
"; } print "
"; print "
"; //arbiters if (count($marbiters) > 0) { print "
Судьи и официальные лица
"; print "
"; for ($i=0; $i" . $marbarr["arb_name"] . ""; if ($champcountryid != $marbarr["arb_country_id"]) { if ($marbarr["arb_country"] != "") { print " (\"\" " . $marbarr["arb_country"]; if ($marbarr["arb_city"] != "") print ", " . $marbarr["arb_city"]; print ")"; } elseif ($marbarr["arb_city"] != "") print " (" . $marbarr["arb_city"] . ")"; } elseif ($marbarr["arb_city"] != "") print " (" . $marbarr["arb_city"] . ")"; print " - " . $marbarr["arb_type"] . "
"; } print "
"; } //match stat if (count($mstat) > 0) { print "
Статистика
"; print "
"; for ($i=0; $i"; print "
" . (($mstatarr["team1_value"] != "") ? $mstatarr["team1_value"] : "-") . "
"; print "
" . $mstatarr["stat_type"] . "
"; print "
" . (($mstatarr["team2_value"] != "") ? $mstatarr["team2_value"] : "-") . "
"; print "
"; } print ""; } ?>

"; print "
"; print "
\"\"" . $tmatch["team1_name"] . "
"; if (($tmatch["match_status"] == 0) || ($tmatch["match_status"] == 1) || ($tmatch["match_status"] == 5) ){ //waiting, announced or moved print "
-:-
"; } else { print "
" . $tmatch["score1"] . ":" . $tmatch["score2"] . "
"; if ($tmatch["match_status"] == 2) { switch ($tmatch["match_extended_status"]) { case "0": print "Live"; break; case "1": print "1Т"; break; case "2": print "П"; break; case "3": print "2Т"; break; case "4": print "После О.В."; break; case "5": print "Д.В."; break; case "6": print "После Д.В."; break; case "7": print "Пен."; break; } }; if ($tmatch["match_status"] == 3) { switch ($tmatch["match_extended_status"]) { case "6": print "В д.в."; break; case "7": print "Пен-" . $tmatch["pen_score1"] . ":" . $tmatch["pen_score2"]; break; case "8": print "Тех.рез."; break; } }; if ($tmatch["match_status"] == 4) print "Прерв."; print "
"; } print "
\"\"" . $tmatch["team2_name"] . "
"; print "
"; if ($tmatch["match_status"] > 0) { print "
"; if ($tmatch["news_id"] != "") print "• отчет   "; print "• протокол"; print "
"; } print "
\n"; } ?>
0) { ?>
Результаты

=0; $i--) { $row = $champalltours[$i]; if (in_array($row["id"], $scoredids)) { if (($i+1) == $matchday) $addbold = "font-weight: bold;"; else $addbold = ""; print "
"; print "" . $row["tour_name"]; switch ($row["state"]) { case "1": print " анонс"; break; case "2": print " онлайн"; break; } print "
"; } } ?>