".($lang=='tr'?"Galeriye geri dön":"$str_back $str_to ".strtolower($str_photogallery))." "; switch($_GET['type']){ case 1: $res=mysql_fetch_assoc(mysql_query("select kr_competitor.*, c.name,c.`mod-rewrite-cz` as mr from kr_competitor left join kr_club c on kr_competitor.id_club = c.id where kr_competitor.id='$_GET[c_id]'")); $name=": $res[firstname] $res[lastname] - $res[name]"; $title="$res[firstname] $res[lastname]"; break; case 2: $res=mysql_fetch_assoc(mysql_query("select name,`mod-rewrite-cz` as mr from kr_club where id='$_GET[c_id]'")); $name=": $res[name]"; $title="$res[name]"; break; case 3: $res=mysql_fetch_assoc(mysql_query("select title".($lang=='cz'?"":"_$lang")." as title,`mod-rewrite-$lang` as mr from kr_contest where id='$_GET[c_id]'")); $name=": $res[title]"; $title="$res[title]"; break; } $q = mysql_query("select * from kr_foto where id_competitor='$_GET[c_id]' and typ='$_GET[type]' and active=1 order by id desc")or die(mysql_error());; $predesla_fotka=false; $konec=false; $prvni=false; $cnt=0; while($res=mysql_fetch_assoc($q)){ if($res['import']){ preg_match('/^(.*)m\/([^\/].*)$/',$res['path'],$matches); }else $matches=array(1=>'',2=>''); //nasledujici foto if($konec and (file_exists("../imgs/foto/v/$res[path]") or ($res['import'] and file_get_contents("$spartak/$matches[1]/$matches[2]",FILE_BINARY,null,0,1)))){ $navigace.= "   $str_next $str_next "; break; } //predesle foto if($res['id']==$_GET['photo_id']){ if($predesla_fotka and (file_exists("../imgs/foto/v/$predesla_fotka[path]") or ($predesla_fotka_import and file_get_contents("$spartak/$predesla_fotka_matches[1]/$predesla_fotka_matches[2]",FILE_BINARY,null,0,1)))){ $navigace.= " $str_previous $str_previous "; } $konec=true; } $predesla_fotka=$res; $predesla_fotka_matches=$matches; $predesla_fotka_import=$res['import']; $cnt++; } $navigace.=" "; } echo "

$str_photogallery$name

"; echo ""; if(is_numeric($_GET['photo_id']) and is_numeric($_GET['c_id']) and is_numeric($_GET['type'])){ /* **************** HODNOCENI **********************/ $q = mysql_query("select hodnoceni, hodnoceni_pocet_lidi from kr_hodnoceni where id=$_GET[photo_id]"); if(!$res = mysql_fetch_assoc($q)){ $res['hodnoceni']=0; $res['hodnoceni_pocet_lidi']=0; } $_SESSION['odkud']=$_SERVER['REQUEST_URI']; echo " "; echo " "; //if(!isset($_COOKIE['hodnoceni_'.$_GET['photo_id']."_$_GET[type]"])){ $continue=1; mysql_query("delete from kr_hodnoceni_identifikace where datum < date_sub(NOW(),interval 1 month)") or die(mysql_error()); if(isset($_COOKIE['token']) and strlen($_COOKIE['token'])==32){ $q = mysql_query("select * from kr_hodnoceni_identifikace where token='$_COOKIE[token]' and id='$_GET[photo_id]' and type='$_GET[type]'") or die(mysql_error()); if(mysql_affected_rows()){ $continue=0; } } if($continue){ echo " "; } echo "
$str_rating: "; if($res['hodnoceni']>0){ echo "
" ."". number_format(($res['hodnoceni']/($res['hodnoceni_pocet_lidi']*4))*100,2) . "%
"; } else echo "
0%
"; echo "
$str_vote: $str_terrible $str_not_good $str_average $str_good $str_perfect $str_Total: $res[hodnoceni_pocet_lidi]x
"; echo " $navigace"; $q = mysql_query("select * from kr_foto where id='$_GET[photo_id]'"); if($res=mysql_fetch_assoc($q)){ if($res['import']){ preg_match('/^(.*)m\/([^\/].*)$/',$res['path'],$matches); if(file_get_contents("$spartak/$matches[1]/$matches[2]",FILE_BINARY,null,0,1)){ echo "$title
"; } } else{ if(file_exists("../imgs/foto/v/$res[path]")){ echo "$title
"; } } } echo $navigace; } include "../menu/footer.php";?>