Závodníci a jejich úspěchy:
české - zahraniční - všechny -
"; if(isSet($_GET['name'])||$_GET['separation']||is_numeric($_GET['country'])||is_numeric($_GET['club'])){ if($_GET['separation']){ switch ($_GET['separation']){ case 'cz': $where="and kr_country.id = 5";break; case 'foreign': $where="and kr_country.id != 5";break; } } if(!empty($_GET['name'])) $where="and LOWER(kr_competitor.lastname) like '".mysql_real_escape_string(mb_strtolower($_GET['name'],"UTF-8"))."%' or LOWER(cd.lastname) like '".mysql_real_escape_string(Mod_rewrite::diakritika_rewrite($_GET['name']))."%'"; if(is_numeric($_GET['country'])) $where=" and kr_country.id=".$_GET['country']; if(is_numeric($_GET['club'])) $where=" and kr_club.id=".$_GET['club']; if ($_GET['order']=='country') $_GET['order']='country, comp'; else $_GET['order']='comp'; $qry=mysql_query("select kr_competitor.lastname as comp, kr_competitor.firstname as first,kr_competitor.id, kr_club.name as club, kr_competitor.`mod-rewrite-cz` as mr_comp, kr_club.`mod-rewrite-cz` as mr_club,kr_club.id as cid, shortcut from kr_competitor join kr_club on kr_competitor.id_club=kr_club.id join kr_country on kr_country.id=kr_club.id_country join kr_competitordiakritika cd on kr_competitor.id=cd.id where kr_competitor.lastname != '' $where order by $_GET[order]")or die(" :".mysql_error()); if (mysql_affected_rows()>1){ echo ''; echo ''; if(isSet($_GET['name'])) $qry_string="&name=".htmlspecialchars($_GET['name'], ENT_QUOTES); if(isSet($_GET['separation'])) $qry_string.="&separation=".htmlspecialchars($_GET['separation'], ENT_QUOTES); if(isSet($_GET['country'])) $qry_string.="&country=".htmlspecialchars($_GET['country'], ENT_QUOTES); if(isSet($_GET['club'])) $qry_string.="&club=".htmlspecialchars($_GET['club'], ENT_QUOTES); echo "\n"; $count=0; while($line=mysql_fetch_array($qry)){?> " onmouseover="this.style.backgroundColor='#DDDDFF';" onmouseout="this.style.backgroundColor='';"> "; if(is_file("../imgs/vlajky/".strtolower($line['shortcut']).".gif")) echo "$line[shortcut]"; echo ""; echo "\t\n"; echo "\t\n"; ++$count; } echo "
Seřadit podle:
JménoKlub
".$line['comp']." ".$line['first']."".htmlspecialchars($line['club'])."
"; } else if (mysql_affected_rows()==1){ //je prave jeden vysledek-> primo ho zobrazime $line=mysql_result($qry,0,2); $_GET['c_id'] = (int) $line; } else echo "

Tomuto výběru neodpovídá žádná položka"; } if (is_numeric($_GET['c_id'])){ require "skupiny.php"; $whereEvent=array(); if (@is_numeric($_GET['event'])) { $whereEvent[]="kr_cache.id_event='$_GET[event]'"; $eventik=mysql_result(mysql_query("select event_cz from kr_event where id='$_GET[event]'"),0); } else if (is_array($_GET['event']) and count($_GET['event'])==2){ $whereEvent[] = " (event_cz like '%".mysql_real_escape_string(urldecode($_GET['event'][0]))."%' or event_cz like '%".mysql_real_escape_string(urldecode($_GET['event'][1]))."%') "; $eventik="
 ". htmlspecialchars(urldecode($_GET['event'][0]))."
 ".htmlspecialchars(urldecode($_GET['event'][1])); } elseif($_GET['event']=='seniori'){ $whereEvent[] = $SENIORI; echo "Senioři"; } elseif($_GET['event']=='kata_seniori'){ $whereEvent[] = $KATA_SENIORI; echo "Kata senioři"; } elseif($_GET['event']=='kumite_seniori'){ $whereEvent[] = $KUMITE_SENIORI; echo "Kumite senioři"; } elseif($_GET['event']=='dorost_juniori'){ $whereEvent[] = $JUNIORI; echo "Dorost + junioři"; } elseif($_GET['event']=='kata_dorost_juniori'){ $whereEvent[] = $KATA_JUNIORI; echo "Kata dorost + junioři"; } elseif($_GET['event']=='kumite_dorost_juniori'){ $whereEvent[] = $KUMITE_JUNIORI; echo "Kumite dorost + junioři"; } elseif($_GET['event']=='zaci'){ $whereEvent[] = $ZACI; echo "Žáci"; } elseif($_GET['event']=='kata_zaci'){ $whereEvent[] = $KATA_ZACI; echo "Kata žáci"; } elseif($_GET['event']=='kumite_zaci'){ $whereEvent[] = $KUMITE_ZACI; echo "Kumite žáci"; } else if (@strlen($_GET['event'])){ if($_GET['event']=='dorostenci' or $_GET['event']=='dorostenky'){ $whereEvent[]="event_cz like '%$_GET[event]%' and event_cz not like '%ml.%'"; } else{ $whereEvent[]="event_cz like '%".mysql_real_escape_string($_GET['event'])."%'"; } $eventik= htmlspecialchars(urldecode($_GET['event']),ENT_QUOTES); } if(isset($_GET['repre'])){ $eventik = "Postup do repre"; if(preg_match('~\d{4}-\d{2}-\d{2}~',$_GET['date_from']) and preg_match('~\d{4}-\d{2}-\d{2}~',$_GET['date_to'])){ $whereEvent[] = "contest_id in (". implode(",",$REPRE_POSTUPOVE_TURNAJE) .") AND contestdate >= '$_GET[date_from]' AND contestdate <= '$_GET[date_to]' "; } if(isset($_GET['kata'])){ $whereEvent[] = $KATA_SENIORI; } if(isset($_GET['kumite'])){ $whereEvent[] = $KUMITE_SENIORI; } } if(isset($_GET['repre_jr'])){ $eventik = "Postup do JR repre"; if(preg_match('~\d{4}-\d{2}-\d{2}~',$_GET['date_from']) and preg_match('~\d{4}-\d{2}-\d{2}~',$_GET['date_to'])){ $whereEvent[] = "contest_id in (". implode(",",$REPRE_POSTUPOVE_TURNAJE_JR) .") AND contestdate >= '$_GET[date_from]' AND contestdate <= '$_GET[date_to]' "; } if(isset($_GET['kata'])){ $whereEvent[] = $KATA_SENIORI; } if(isset($_GET['kumite'])){ $whereEvent[] = $KUMITE_SENIORI; } } if(isset($_GET['postup_na_mcr'])){ $eventik = "postupové žebříčky na MČR
(Nominační klíč | Nominační turnaje)"; $whereEvent[] = "(FIND_IN_SET(19,contest_id_group) or FIND_IN_SET(20,contest_id_group) or FIND_IN_SET(21,contest_id_group))"; } if(isset($_GET['vcske'])){ $eventik = "VčSKe"; $whereEvent[] = "FIND_IN_SET(1,contest_id_group)"; } if(@strlen($_GET['date'])){ $whereEvent[]="contestdate >= '".mysql_real_escape_string($_GET['date'])."'"; } if(@strlen($_GET['date2'])){ $whereEvent[]="contestdate <= '".mysql_real_escape_string($_GET['date2'])."'"; } if(isSet($_GET['year']) && is_numeric($_GET['year'])) $whereEvent[]="YEAR(contestdate) >= '$_GET[year]'"; if(isSet($_GET['year2']) && is_numeric($_GET['year2'])) $whereEvent[]="YEAR(contestdate) <= '$_GET[year2]'"; if ($_GET['competitor']=='C' || $_GET['competitor']=='T') $whereEvent[]="type ='$_GET[competitor]' "; $sql="select distinct c.id,c.lastname as comp, c.firstname as first, c.teamname as team, IF(repre,kr_country.country_cz,kr_club.name) as club, id_club2, id_club3, kr_club.id as cid,country_$lang, shortcut, cv_cz,ts_hodnota,ts_nazev, show_profile from kr_competitor c left join kr_club on kr_club.id=c.id_club left join kr_country on kr_country.id=kr_club.id_country where c.id = '".$_GET['c_id']."'"; $qry1=mysql_query($sql)or die(" :".mysql_error()); $rec=mysql_fetch_array($qry1); $sql3="select contest_id,title,contest_id_group,contestdate,position,event_cz,id_contesttype,position, mr_comp, mr_contest_cz,mr_club from kr_cache ".(isset($_GET['postup_na_mcr'])? "join kr_postup_na_mcr p on (FIND_IN_SET(p.id_group,kr_cache.contest_id_group) and p.id_event=kr_cache.id_event)":""). " where id = '".intval($_GET['c_id'])."' "; if(count($whereEvent)) $sql3.=" and ". implode(' and ',$whereEvent); if(@is_numeric($_GET['contest'])){ $sql3 .=" and contest_id='$_GET[contest]' "; } $sql3.=$skupiny; $sql3.=" order by contestdate desc, position asc,event_cz asc"; //echo $sql3; $qry=mysql_query($sql3)or die(" :".mysql_error()); //echo $sql3; $foto=mysql_fetch_assoc(mysql_query("select * from kr_foto where id_competitor='".intval($_GET['c_id'])."' and `primary`=1 and active=1 and typ=1")); if(mysql_affected_rows()) { $fotka=1; $rozmery= Funkce::rozmery_male($foto['sirka'],$foto['vyska']); } else{ $foto=mysql_fetch_assoc(mysql_query("select * from kr_foto where id_competitor='".intval($_GET['c_id'])."' and active=1 and typ=1")); if(mysql_affected_rows()) { $fotka=1; $rozmery= Funkce::rozmery_male($foto['sirka'],$foto['vyska']); } } echo "
"; //HANZL********************************* if($_GET["c_id"]=='561'){ echo "
"; } if($fotka and $rec['show_profile']){ echo "
"; if(file_exists("../imgs/foto/v/$foto[path]")){ echo ""; } echo "\"$foto[path]\"\n"; if(file_exists("../imgs/foto/v/$foto[path]")){ echo ""; } $pocet_fotek=mysql_fetch_assoc(mysql_query("select count(*) as pocet from kr_foto where id_competitor='".intval($_GET['c_id'])."' and typ=1 and active=1")); echo "
$str_photogallery ($pocet_fotek[pocet])"; echo "
"; } echo "
"; echo "\n\n "; if ($rec['show_profile'] == 1) { //GDPR if ($rec['id_club2']) { $name2 = mysql_fetch_assoc(mysql_query("select IF(repre,c.country_cz,name) as name,`mod-rewrite-cz` from kr_club left join kr_country c on kr_club.id_country=c.id where kr_club.id='$rec[id_club2]'")); } if ($rec['id_club3']) { $name3 = mysql_fetch_assoc(mysql_query("select IF(repre,c.country_cz,name) as name,`mod-rewrite-cz` from kr_club left join kr_country c on kr_club.id_country=c.id where kr_club.id='$rec[id_club3]'")); } echo "\n "; if (is_numeric($_GET['group'])) { $vyber = ""; } if ($_GET['event']) { $vyber .= ""; } if (isset($_GET['repre'])) { $vyber .= ""; } if (isset($_GET['repre_jr'])) { $vyber .= ""; } if (is_numeric($_GET['year']) && !$_GET['year2']) { $vyber .= ""; } else if (is_numeric($_GET['year']) && is_numeric($_GET['year2']) && $_GET['year2'] != $_GET['year']) { $vyber .= ""; } else if (is_numeric($_GET['year']) && is_numeric($_GET['year2']) && $_GET['year2'] == $_GET['year']) { $vyber .= ""; } if ($_GET['date']) { $vyber .= ""; } if ($_GET['date2']) { $vyber .= ""; } if (isSet($vyber)) { echo " \n $vyber"; } echo '
Jméno:

".$rec['first']." ".$rec['comp']. " ".$rec['team']."

Klub:" . $rec['club'] . " " . ($rec['id_club2'] ? " / $name2[name]" : "") . ($rec['id_club3'] ? " / $name3[name]" : "") . "
$str_country: " . (file_exists("../imgs/vlajky/" . strtolower($rec['shortcut']) . ".gif") ? "$rec[shortcut] " : '') . $rec["country_$lang"] . "
ze skupiny: $skupina
kategorie: " . $eventik . "
" . $eventik . "
" . $eventik . "
od roku: " . $_GET['year'] . "
za období: $_GET[year] - $_GET[year2]
za rok: $_GET[year]
od: " . vratPrevedeneDatum($_GET['date']) . "
do: " . vratPrevedeneDatum($_GET['date2']) . "
Výběr:
'; if ((isSet($_GET['event']) || isSet($_GET['group']) || isSet($_GET['year']) || isSet($_GET['repre']) || isSet($_GET['repre_jr'])) && is_numeric($_GET['c_id'])) { echo "
zobrazit všechny výsledky
"; } if (@is_numeric($_GET['contest'])) { $turnaj = mysql_fetch_assoc(mysql_query("select title from kr_contest where id=$_GET[contest]")); echo "
Z turnaje: $turnaj[title]
"; } /* Omezení medailí **************/ $sql5 = "select position,count(position) as pocet from kr_cache where id = '" . intval($_GET['c_id']) . "' "; if (count($whereEvent)) { $sql5 .= " and " . implode(' and ', $whereEvent); } $sql5 .= $skupiny; $sql5 .= " group by (position)"; //echo "____".$sql5; $qry5 = mysql_query($sql5) or die(" :" . mysql_error()); echo "
Medaile: "; $tmp = array(); while ($row = mysql_fetch_array($qry5)) { switch ($row['position']) { case 1: $tmp[] = "Zlato " . $row['pocet'] . "x"; break; case 2: $tmp[] = "Stříbro " . $row['pocet'] . "x"; break; case 3: $tmp[] = "Bronz " . $row['pocet'] . "x"; break; } } echo implode("     ", $tmp); //****************** generuje pořadí v českém žebříčku ************* echo "

"; echo "Pořadí v žebříčcích: "; echo ' '; mysql_query("set @a=0"); // $poradi_dotaz=mysql_query("select @a := @a +1 as poradi,id, sum(score) as bodu from kr_cache where // contest_id_group != '1' and not FIND_IN_SET(4,competitor_id_group) and // type = 'C' and // YEAR(contestdate) >= '2005' // GROUP BY id // ORDER BY bodu DESC,lastname asc // ") or die(mysql_error()); $poradi_dotaz = mysql_query("select * from kr_cache_cz ORDER BY bodu DESC,lastname asc ") or die(mysql_error()); $counter = 1; while ($poradi = mysql_fetch_assoc($poradi_dotaz)) { if ($poradi['bodu'] == $body) { $vypis_poradi = $min; } else { $vypis_poradi = $counter; $min = $counter; } if ($poradi['id'] == $_GET['c_id']) { echo ""; break; } $body = $poradi['bodu']; ++ $counter; } if (isSet($body)) { unset($body, $min, $celkem_stranek); } //****************** generuje pořadí v celkovém žebříčku ************* $_GET['group'] = 29; include 'skupiny.php'; mysql_query("set @a=0"); $sql = "select @a := @a +1 as poradi,id, sum(score) as bodu from kr_cache where type = 'C' and contest_id_group != '1' $skupiny GROUP BY id ORDER BY bodu DESC,lastname asc "; mysql_query("set @a=0"); $sql = "select * from kr_cache_en ORDER BY bodu DESC,lastname asc "; $poradi_dotaz = mysql_query($sql) or die(mysql_error()); $counter = 1; while ($poradi = mysql_fetch_assoc($poradi_dotaz)) { if ($poradi['bodu'] == $body) { $vypis_poradi = $min; } else { $vypis_poradi = $counter; $min = $counter; } if ($poradi['id'] == $_GET['c_id']) { echo ""; break; } $body = $poradi['bodu']; ++ $counter; } if (isSet($body)) { unset($body, $min); } //****************** generuje pořadí ve váhovkách ************* //*************zjistuje, jestli je českej***************// $groups = mysql_result(mysql_query("select id_group from kr_competitor c left join kr_competitorgroup cg on c.id=cg.id_competitor where c.id='$_GET[c_id]'"), 0); $pom_pole = explode(',', $groups); $rok = $cizinec = ''; if (array_search('4', $pom_pole) === FALSE) { //čech $cizinec = 'and not FIND_IN_SET(4,competitor_id_group) and (contestdate) >= "2005"'; $group = 14; $rok = '&year=2005'; } else { //zahraničí $group = 29; } $sql_vahovka = mysql_query("select distinct(id_event),event_cz from kr_cache where id = '$_GET[c_id]' order by event_cz"); if (mysql_affected_rows()) { while ($vahovka = mysql_fetch_assoc($sql_vahovka)) { mysql_query("set @a=0"); $poradi_dotaz = mysql_query("select @a:=@a+1 as poradi, kr_cache.id, sum(score) as bodu from kr_cache left join kr_event e on e.event_cz=kr_cache.event_cz where e.zobraz = '1' and contest_id_group != '1' and kr_cache.event_cz='$vahovka[event_cz]' $cizinec GROUP BY id ORDER BY bodu DESC,lastname asc ") or die(mysql_error()); $counter = 1; if (isSet($body)) { unset($body, $min); } while ($poradi = mysql_fetch_assoc($poradi_dotaz)) { if ($poradi['bodu'] == $body) { $vypis_poradi = $min; } else { $vypis_poradi = $counter; $min = $counter; } if ($poradi['id'] == $_GET['c_id']) { echo ""; break; } $body = $poradi['bodu']; ++ $counter; } } } if (isSet($body)) { unset($body, $min); } echo "
kategorie Pořadí
1 ? "&page=$aktualni_stranka" : '') . "'>ČR $vypis_poradi.
1 ? "&page=$aktualni_stranka" : '') . "'>svět $vypis_poradi.
1 ? "&page=$aktualni_stranka" : '') . "'>$vahovka[event_cz] " . (empty($cizinec) ? ' (svět)' : ' (ČR)') . " $vypis_poradi.
"; //ZIVOTOPIS if (trim($rec['cv_cz']) or $rec['ts_hodnota']) { echo "

O závodníkovi $rec[first] $rec[comp]:

"; if ($rec['ts_hodnota']) { echo "$rec[ts_hodnota]. $rec[ts_nazev]
"; } echo nl2br($rec['cv_cz']) . "
"; } echo "
"; if (!$foto) { echo "Můžete nahrát foto tohoto závodníka
"; } echo "
"; echo ""; echo ""; $count = 0; while ($line = mysql_fetch_array($qry)){ $skore = mysql_fetch_assoc(mysql_query("select score from kr_classification where id_contesttype='$line[id_contesttype]' and position='$line[position]'")); ?> " onmouseover="this.style.backgroundColor='#DDDDFF';" onmouseout="this.style.backgroundColor='';">" . $line['position'] . ".\n"; echo "\t\n"; echo "\t\n"; echo "\t\n"; echo "\t\n"; $score += $skore[ score ]; ++ $count; } echo ""; echo "
PoziceTurnajDisciplínaDatumBody
" . $line['title'] . "" . $line['event_cz'] . ""; echo prevedDatum($line['contestdate']); echo "$skore[score]
Celkem:    $score
\n"; if ($count > 20) { echo "
\n" . '^ nahoru' . "
\n"; } echo "
 Tisk "; echo Funkce::get_referer(); } // GDPR else { echo " Profil smazán
"; } } echo '

Nově evidovaní závodníci:

'; $pole=array(); $qry=mysql_query("select id, lastname, `mod-rewrite-cz` as mr from kr_competitor where type='C' order by id desc limit 9"); while($last_competitors=mysql_fetch_assoc($qry)){ $pole[]= "$last_competitors[lastname]"; } echo implode(' | ',$pole); mysql_free_result($qry); ?>