Select day:"; $listad .= ""; $table_name = "dg_config_sedziowie"; $sql = "SELECT * FROM $table_name WHERE `id_t` = \"$id_t1\""; $result = @mysql_query($sql,$dbc)or die("Wykonanie zapytania nie powiodło się."); while ($wiersz = mysql_fetch_array($result)) { for ($d = 1; $d <= 11; $d++) { $a = 'o_d'.$d; ${$a} = date('d.m.Y', strtotime($wiersz["$a"])); $listad .= ""; for ($s = 1; $s <=8; $s++) { //sesje $a = 'g_d'.$d.'s'.$s; ${$a} = date('H:i', strtotime($wiersz["$a"])); } } } //================================================================================================================================== //================================================================================================================================== // lista zawodników $table_name = "dg_zawodnicy"; $sql = "SELECT * FROM $table_name WHERE `id_t` = \"$id_t1\" OR `id_t` = \"$id_t2\" OR `id_t` = \"$id_t3\" ORDER by `zawodnik`"; $result = @mysql_query($sql,$dbc)or die("Wykonanie zapytania nie powiodĹ‚o siÄ™."); $ilu_z = mysql_numrows($result); $zawodnicy=array(); $x=1; $id_list = ''; $lista = ""; while ($wiersz = mysql_fetch_array($result)) { $nr_g = $wiersz['nr_g']; $g = $wiersz['grupa']; $c=64; if ($parametry['io'][$id_t]=='1') { //mam pokazywać grupy I oraz O $c += + $g; } else { switch($g) { case ($g >= 9 and $g < 14):$c += + $g +1; break; //omijamy nazwe grupy I case ($g >= 14):$c = $c += + $g + 2; break; //omijamy nazwe grupy O default:$c += + $g; break; } } switch($c) { case ($c>90):$c2 = $c-26; $grupa = "A".chr($c2);break; //Po Z wracamy do AA // case ($c>90):$c2 = $c+6; $grupa = chr($c2);break; //Po Z mamy a default:$grupa = chr($c); break; } //$lista .= ""; $lista .= ""; if ($wiersz['id_z']>0) {$id_list .= " `id` LIKE '".$wiersz['id_z']."' OR";} $x++; } $res1=@mysql_query("SELECT `zawodnicy`.* FROM `zawodnicy` WHERE ".substr($id_list,0,strlen($id_list)-2)); $players = array(); while($row=@mysql_fetch_array($res1)) { $kraj = $row['kraj']; $players[$row['id']]['kraj'] = $row['kraj']; $players[$row['id']]['player'] = $row['imie'].' '.$row['nazwisko']; } $ile_zaw = count($players); //================================================================================================================================== //================================================================================================================================== //Lista krajów //sortuje utworzona tablice po krajach uasort($players, 'porownajkraje'); function porownajkraje($a, $b) { if ($a[kraj]==$b[kraj]) return 0; else return $a<$b?-1:1;} $listak = ""; $kraj_chwila=''; $x=1; foreach ($players as $klucz => $wiersz) { if ($players[$klucz]['kraj']!=$kraj_chwila) { $listak .= ""; $x++; } $kraj_chwila=$players[$klucz]['kraj']; } //================================================================================================================================== $table_name = "dg_wyniki"; $where = "`id_t` = ".$id_t1; if ($id_t2>0) {$where .= " OR `id_t` = ".$id_t2;} if ($id_t3>0) {$where .= " OR `id_t` = ".$id_t3;} $sql = "SELECT * FROM $table_name WHERE ".$where." ORDER by `dzien`, `sesja`, `stol`"; $result = @mysql_query($sql,$dbc)or die("Wykonanie zapytania nie powiodło się."); $jest = mysql_numrows($result); if ($jest>0) { $display_block=" No Country Player A Player B Country "; $x=1; $color5 = 'orange'; //kolor vs $color0 = ' white'; //kolor No while ($wiersz = mysql_fetch_array($result)) { //jesli parametr xxx=741852963 to nie wyswietlaj wszystkiego lub moze odwrotnie wyswietlaj wszystko //tutaj dodac: jesli jest wynik i wprowadzil admin to mam pomijac i nastepne while: goto nastepne; ... ... ... nastepne: if ($wiersz['status'] != 'Mecz zakończony' ) {goto nastepne;} if ($player) { if ($wiersz['id_z1'] != $player and $wiersz['id_z2'] != $player) {goto nastepne;} } else if ($country) { if ($wiersz['kraj_z1'] != $country and $wiersz['kraj_z2'] != $country) {goto nastepne;} } else if ($dzien) { if ($dzien < 99 and $wiersz['dzien'] != $dzien) {goto nastepne;} } if ($x % 2 == 0) {$bg='w4';} else {$bg='w3';} $display_block.=" ".$x." ".$wiersz['w1']." vs ".$wiersz['w2']." "; $x++; nastepne: } //Koniec while } else { //nie ma jeszcze listy z wynikami $display_block=" "; } //include('zrob_razem_mini.php'); jak bylo w tym miejscu przed deklaracja strony kodowej to nie bylo utf-8 //include("js_upd_wyniki.php"); ?> Played matches


Click on vs to see the scoresheet