get("countrycode"); $compcode = $request->get("compcode"); $parentcode = $request->get("parentcode"); $matchday = $request->get("matchday"); if ( (ereg("^[a-z0-9\-\_]+$", $countrycode)) && (ereg("^[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"]; //selection for champ tables $first_in = $comparr["first_in"]; $second_in = $comparr["second_in"] + $comparr["first_in"]; $last_preout = $comparr["last_preout"] + $comparr["last_out"]; $last_out = $comparr["last_out"]; //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); //tournir table after current tour $champtable = get_tournir_table_by_tour($actualtour["id"]); $ctcnt = count($champtable); } 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("crblock2"); @include("_news_block.inc.php"); tpl_block_end(); tpl_block_start("pagetitle"); //page title here print $actualtour["tour_name"] . " - $champname ($champcountry, $champdivision) - Статистика"; tpl_block_end(); tpl_block_start("cenblock2"); //main central block } tpl_block_end(); tpl_block_start("cenblock4"); if ($parentid > 0) { ?>
- Cтадии турнира
Финальная (сводная) стадия
0) print $parentname . " - "; ?>
Эмблема <?php print $champname; ?>
0) { ?>
- Другие стадии

"; print "
"; print ""; if (($tmatch["match_status"] == 0) || ($tmatch["match_status"] == 1) || ($tmatch["match_status"] == 5) ) { //waiting, announced or moved if ($tmatch["match_status"] != 1) print ""; else 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 ""; print "
"; if (($tmatch["match_status"] >= 1) && ($tmatch["match_status"] <= 4)) { //announced, live, finished, breaked print "
"; print "
" . getVisitorDateType($tmatch["match_date"]) . ". " . $tmatch["match_time"] . "
"; print "
 "; if ($tmatch["stadium_place"] != "") print $tmatch["stadium_place"] . ", " . $tmatch["stadium_name"]; print "
"; print "
"; } if ($tmatch["match_status"] == 5) { //moved print "
"; print "
Матч перенесен или отменен.
"; print "
Следите за анонсом!
"; print "
"; } if (($tmatch["match_status"] >= 2) && ($tmatch["match_status"] <= 4)) { //live, finished or breaked print "
"; print "
"; $goals1 = $tmatch["goal1"]; for ($j=0; $j 0) { print "
\"+\" " . $grow["minute"] . "'
" . $grow["author_name"]; if (($grow["goal_type"] != "") && (getVisitorGoalType($grow["goal_type"]) != "")) print " (" . getVisitorGoalType($grow["goal_type"]) . ")"; print "
"; } } print "
"; print "
"; $goals2 = $tmatch["goal2"]; for ($j=0; $j 0) { print "
" . $grow["minute"] . "' \"+\"
" . $grow["author_name"]; if (($grow["goal_type"] != "") && (getVisitorGoalType($grow["goal_type"]) != "")) print " (" . getVisitorGoalType($grow["goal_type"]) . ")"; print "
"; } } print "
"; print "
"; } if ($tmatch["match_status"] > 0) { print "
"; if ($tmatch["news_id"] != "") print "• отчет   "; print "• протокол"; print "
"; } print "
\n"; } ?>
0)) { ?>
Положение команд после тура

=$first_in) && ($i<$second_in)) $addstyle = " style=\"background-color: #f5f5ff;\""; elseif ((($ctcnt-$i)>$last_out) && (($ctcnt-$i)<=$last_preout)) $addstyle = " style=\"background-color: #f5fff5;\""; elseif (($ctcnt-$i)<=$last_out) $addstyle = " style=\"background-color: #e8e8e8;\""; else $addstyle = ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; } ?>
  Команды И В Н П М О
" . ($i+1) . "" . $row["name"] . "" . $row["count"] . "" . $row["win"] . "" . $row["drawn"] . "" . $row["defeat"] . "" . $row["diff"] . "" . $row["spot"] . "

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 "
"; } } ?>