$res[firstname] $res[lastname] -
$res[name]";
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]";
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]";
break;
}
}
echo "
$str_photogallery$name
";
$limit=35;
if(is_numeric($_GET['c_id']) and is_numeric($_GET['type'])){
echo "$str_upload";
$fotekNaStranku=20;
$q = mysql_query("select count(*) as celkem from kr_foto where id_competitor='$_GET[c_id]' and typ='$_GET[type]' and active=1") or die(mysql_error());
$res = mysql_fetch_assoc($q);
$celkemFotek=$res['celkem'];
if($celkemFotek>$fotekNaStranku){
echo Funkce::strankovac(ceil($celkemFotek / $fotekNaStranku));
}
$neniGetPage=false;
if(!isset($_GET['page']) or $_GET['page']<1) {
$_GET["page"]=1;
$neniGetPage=true;
}
$limit=($_GET['page']-1)*$fotekNaStranku;
$q = mysql_query("select * from kr_foto where id_competitor='$_GET[c_id]' and typ='$_GET[type]' and active=1 order by id desc limit $limit, $fotekNaStranku");
$count=1;
$spartak="http://old.spartak.cz/obrazky";
echo "
\n";
while($res = mysql_fetch_assoc($q)){
if($res['import']){
preg_match('/^(.*)m\/([^\/].*)$/',$res['path'],$matches);
echo " ".(file_get_contents("$spartak/$matches[1]/$matches[2]",FILE_BINARY,null,0,1)?"":"").
"\n \n
".(file_get_contents("$spartak/$matches[1]/$matches[2]",FILE_BINARY,null,0,1)?"":"")." | ";
}
else{
$url='../imgs/foto';
$rozmery=Funkce::rozmery_male($res['sirka'],$res['vyska']);
echo " ".(file_exists("$url/v/$res[path]")?"":"").
"
".(file_exists("../imgs/foto/v/$res[path]")?"":"")." | ";
}
if($count%5==0){
echo "
\n";
}
$count++;
}
while(($count-1)%5!=0){
echo "| | ";
$count++;
}
echo "
";
if($neniGetPage) unset($_GET["page"]);
if($celkemFotek>$fotekNaStranku){
echo Funkce::strankovac(ceil($celkemFotek / $fotekNaStranku));
}
}
include "../menu/footer.php";?>