= 10) {
$aka = $team_num."..".$zteamname;
//}
//else {
// $aka = "*".$team_num."..".$zteamname;
// }
}
if ($team_ID=="") { $team_ID = 0;}
if ($tourn_ID=="") { $tourn_ID = 0;}
if ($league_ID=="") { $league_ID = 0; }
$insert = "insert into team_scoring (teamname, aka, players, team_ID, loc_ID, show_ID, usr_ID, game_date,
1_1, 1_1_yn, 1_2, 1_2_yn, 1_3, 1_3_yn,
2_1, 2_1_yn, 2_2, 2_2_yn, 2_3, 2_3_yn,
3_1, 3_1_yn, 3_2, 3_2_yn, 3_3, 3_3_yn,
H, H_in, first_half_score,
4_1, 4_1_yn, 4_2,4_2_yn, 4_3, 4_3_yn,
5_1, 5_1_yn, 5_2, 5_2_yn, 5_3, 5_3_yn,
6_1, 6_1_yn, 6_2, 6_2_yn, 6_3, 6_3_yn, second_half_score,
F, F_yn, final_score, team_rank, team_active, tourn_ID, league_ID, H_finalized, F_finalized)
values ('".$teamname."', '".$aka."', '".$players."', '".$team_ID."', '".$loc_ID."', '".$show_ID."', '".$usr_ID."', '".$this_game_date."',
'0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0',
'0', 'N', '0',
'0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '0', '0', '0',
'0', '0', '0', '0', '1', '".$tourn_ID."', '".$league_ID."', 'N', 'N')";
//echo $insert." ";
mysqli_query($local, $insert);
$query = "select id as 'scoring_ID' from team_scoring order by id desc limit 1";
$result = mysqli_query($local, $query);
$row = mysqli_fetch_assoc($result);
$scoring_ID = $row['scoring_ID'];
$insert = "insert into scoring_tracker (user_ID, loc_ID, show_ID, region_ID, game_date, game_round, qno, scoring_ID, score_action, points, yn) values
(".$user_ID.", ".$loc_ID.", ".$show_ID.", ".$region_ID.", '".$this_game_date."', '', 0, ".$scoring_ID.", 'add_team', 0, '-')";
}
}
if ($tourn_ID=="" || $tourn_ID==0) {
$oktoscore="Y";
}
else {
//check to see if scores are finalized...
if ($r==1 || $r==2 || $r==3 || $r=="H") {
$section = 1;
}
elseif ($r==4 || $r==5 || $r==6) {
$section = 2;
}
elseif ($r=="F") {
$section = 3;
}
$query = "select finalized from tournament_finalized where section = ".$section." and tourn_ID = ".$tourn_ID." and loc_ID = ".$loc_ID;
$result = mysqli_query($games, $query);
$row = mysqli_fetch_assoc($result);
$num = mysqli_num_rows($result);
if ($num==0) {
$finalized = "N";
}
else {
$finalized = $row['finalized'];
}
//check tournament_oktoscore table
$query = "select oktoscore, region_ID from tournament_oktoscore where tourn_ID = ".$tourn_ID;
$result = mysqli_query($games, $query);
$row = mysqli_fetch_assoc($result);
$region_ID = $row['region_ID'];
$oktoscore = $row['oktoscore'];
//if not ok to score, redirect to "wait.php";
if ($finalized=="Y" && $oktoscore=="N") {
$oktoscore="N";
//echo "LA LA LA";
}
elseif ($finalized=="N" && $oktoscore=="Y") {
$oktoscore="Y";
}
elseif ($finalized=="Y" && $oktoscore=="N") {
$oktoscore="N";
}
if ($section==1 && $finalized=="Y") {
$v = "firsthalf";
}
elseif ($section==2 && $finalized=="Y") {
$v = "secondhalf";
}
elseif ($section==3 && $finalized=="Y") {
$v = "final";
}
if ($oktoscore=="N") {
$url = "wait.php?v=".$v."&r=".$r."&q=".$q;
}
}
$query = "select * from team_scoring
where team_active = 1 and game_date = '".$this_game_date."' and loc_ID = ".$loc_ID." and show_ID = ".$show_ID." and usr_ID = ".$usr_ID;
//echo $query." ";
$result = mysqli_query($local, $query);
$num_active_teams = mysqli_num_rows($result);
$split_after = $_COOKIE['split_after'];
if ($split_after=="") {
$split_after = 12;
}
$greater_than_a = $split_after;
$greater_than_b = ($split_after * 2);
$greater_than_c = ($split_after * 3);
$greater_than_d = ($split_after * 4);
$greater_than_e = ($split_after * 5);
$greater_than_f = ($split_after * 6);
$less_than_a = ($greater_than_b + 1);
$less_than_b = ($greater_than_c + 1);
$less_than_c = ($greater_than_d + 1);
$less_than_d = ($greater_than_e + 1);
$less_than_e = ($greater_than_f + 1);
//echo $greater_than_d." - ".$less_than_d." ".$greater_than_e." - ".$less_than_e." ".$greater_than_f." - ".$less_than_f." ";
if (($num_active_teams > $greater_than_a && $num_active_teams < $less_than_a) && $screens!=2) {
$splitscreen = "nav.php?screens=2&r=".$r."&q=".$q;
$limit = $split_after;
}
elseif (($num_active_teams > $greater_than_b && $num_active_teams < $less_than_b) && $screens!=3) {
$splitscreen = "nav.php?screens=3&r=".$r."&q=".$q;
$limit = $greater_than_b.", ".$split_after;
}
elseif (($num_active_teams > $greater_than_c && $num_active_teams < $less_than_c) && $screens!=4) {
$splitscreen = "nav.php?screens=4&r=".$r."&q=".$q;
$limit = $greater_than_c.", ".$split_after;
}
elseif (($num_active_teams > $greater_than_d && $num_active_teams < $less_than_d) && $screens!=5) {
$splitscreen = "nav.php?screens=5&r=".$r."&q=".$q;
$limit = $greater_than_d.", ".$split_after;
}
elseif (($num_active_teams > $greater_than_e && $num_active_teams < $less_than_e) && $screens!=6) {
$splitscreen = "nav.php?screens=6&r=".$r."&q=".$q;
$limit = $greater_than_e.", ".$split_after;
}
?>
Scoring iframe
Past Dates:
Jump To:
1-1
1-2
1-3
2-1
2-2
2-3
3-1
3-2
3-3
H
4-1
4-2
4-3
5-1
5-2
5-3
6-1
6-2
6-3
F
Open Freq Teams
Teams.
$greater_than_a && $num_active_teams < $less_than_a) && $screens!=2) {
$splitscreen = "nav.php?screens=2&r=".$r."&q=".$q;
$limit = $split_after;
}
elseif (($num_active_teams > $greater_than_b && $num_active_teams < $less_than_b) && $screens!=3) {
$splitscreen = "nav.php?screens=3&r=".$r."&q=".$q;
$limit = $greater_than_b.", ".$split_after;
}
elseif (($num_active_teams > $greater_than_c && $num_active_teams < $less_than_c) && $screens!=4) {
$splitscreen = "nav.php?screens=4&r=".$r."&q=".$q;
$limit = $greater_than_c.", ".$split_after;
}
elseif (($num_active_teams > $greater_than_d && $num_active_teams < $less_than_d) && $screens!=5) {
$splitscreen = "nav.php?screens=5&r=".$r."&q=".$q;
$limit = $greater_than_d.", ".$split_after;
}
elseif (($num_active_teams > $greater_than_e && $num_active_teams < $less_than_e) && $screens!=6) {
$splitscreen = "nav.php?screens=6&r=".$r."&q=".$q;
$limit = $greater_than_e.", ".$split_after;
}
if ($splitscreen!="") {
?>
Split Screen
View All Teams
View All Teams
View National Status
= $split_after) {
$form_url = "scoring_master.php";
}
else {
$form_url = "scoring.php";
}
?>
You are scoring -
1 || $tourn_ID > 0) {
$nexturl = "scoring_master";
$scoring_iframe = "scoring_master";
}
else {
$nexturl = "scoring";
$scoring_iframe = "scoring";
}
$scoring_iframe = "scoring_master";
if ($r==3 && $q==3) {
?>
Next is Halftime
Next is Final
Next is Round
Next is Round 4 - Question 1
Next is Round - Question
";
$result = mysqli_query($local, $query);
while ($row=mysqli_fetch_assoc($result)) {
$scoreID = $row['id'];
?>
Jump To:
1-1
1-2
1-3
2-1
2-2
2-3
3-1
3-2
3-3
H
4-1
4-2
4-3
5-1
5-2
5-3
6-1
6-2
6-3
F
Open Freq Teams
= '".$last_date."'";
}
$query = "select distinct team_ID from scores_".$selected_region."
where show_ID = ".$show_ID."
and loc_ID = ".$loc_ID."
and team_ID < 100000 and team_ID > 0
and team_ID not in (select team_ID from team_scoring where game_date = '".$this_game_date."' and show_ID = ".$show_ID.")
order by team_ID asc";
//echo $query." ";
$result = mysqli_query($local, $query);
?>
Teams That have played here since :
Close
";
$result = mysqli_query($local, $query);
while ($row=mysqli_fetch_assoc($result)) {
$scoreID = $row['id'];
?>
";
$result = mysqli_query($local, $query);
while ($row=mysqli_fetch_assoc($result)) {
$scoreID = $row['id'];
?>
";
$result = mysqli_query($local, $query);
while ($row=mysqli_fetch_assoc($result)) {
$scoreID = $row['id'];
?>