Realizacje

'; $rok=0;$lpp=0; $sqlp = "SELECT id,name,ndate,content from menu where menu_cat=1 and active=1 order by ndate desc,morder"; $resultp = mysqli_query($connection,$sqlp); while ($rowp=mysqli_fetch_array($resultp)) { $image=''; if($rowp['ndate']<>$rok){ if($lpp>0){$pt='pt-5';}else{$pt='';} echo '

'.$rowp['ndate'].'

' ; } $rok=$rowp['ndate'];$lpp=$lpp+1; $sqlpx="select file,title,link from photos where idpage=".$rowp['id']." and ftype='menu'"; $resultpx=@mysqli_query($connection,$sqlpx) or die( mysqli_error($connection)); while ($rowpx=mysqli_fetch_array($resultpx)){ $image=$image.'
'.$rowp['name'].'
'; } echo '
'.$rowp['name'].'
'.htmlspecialchars_decode($rowp['content']).''; if($image<>''){echo '
'.$image.'
';} echo'
'; } echo '
'; } else if(!empty($_GET['page'] and $_GET['page']=='referencje')){ echo '

Referencje

'; $rok=0;$lpp=0; $sqlp = "SELECT id,name,ndate,content from menu where menu_cat=2 and active=1 order by ndate desc,morder"; $resultp = mysqli_query($connection,$sqlp); while ($rowp=mysqli_fetch_array($resultp)) { $sqlpx="select file,title,link from photos where idpage=".$rowp['id']." and ftype='menu' limit 1"; $resultpx=@mysqli_query($connection,$sqlpx) or die( mysqli_error($connection)); while ($rowpx=mysqli_fetch_array($resultpx)){ echo '
'.$rowp['name'].'
'; } } echo '
'; } ?>