0) { $linkedit = "
"; } $zapyt_pliki = mysqli_query($sql,"SELECT * FROM STAJ_PODSTR WHERE ID = '$nr' AND VISI = '1' AND DZIAL = '8' AND RODZ = '0' "); $row_pod = mysqli_fetch_row($zapyt_pliki); // tresc okno po lewej stronie $trescLEFT = htmlspecialchars_decode($row_pod[2], ENT_QUOTES); // tresc okno po prawej stronie $trescRIGHT = htmlspecialchars_decode($row_pod[3], ENT_QUOTES); if ($row_pod[6] == true ) { $Azapyt_pliki = mysqli_query($sql,"SELECT * FROM STAJ_GAL WHERE ID = '$row_pod[6]' AND VISI = '1' "); $row_gal = mysqli_fetch_row($Azapyt_pliki); if ( $row_gal[2] == 1 ) { $aaa = 0; $spisfotkow= ""; $Bzapyt_pliki = mysqli_query($sql,"SELECT * FROM STAJ_FOTO WHERE IDGAL = '$row_pod[6]' ORDER BY KOL DESC "); while ($row_fot = mysqli_fetch_row($Bzapyt_pliki)) {$aaa++; $spisfotkow .= ",".$row_fot[0] ;} $trescRIGHT = " "; $bbb = 0; $Bzapyt_pliki = mysqli_query($sql,"SELECT * FROM STAJ_FOTO WHERE IDGAL = '$row_pod[6]' ORDER BY KOL DESC LIMIT 0,24 "); while ($row_fot = mysqli_fetch_row($Bzapyt_pliki)) { $bbb++; $trescRIGHT .= "
"; } if ($aaa > 24) { $trescRIGHT .= "
zobacz wszystkie miniatury
"; } } } include "top.php"; echo" "; include "bottom.php"; ob_end_flush();?>