<h1>Galerie</h1>
	<?php
		//print_r($articles);
		echo '<table class="galleries_table" cellspacing="10">';
		$i=0;
		foreach($articles as $article){
			if($i == 0){
				echo '<tr>';
			}
				echo '<td class="imagediv">';
					if(isset($article['photo'])){
						echo '<a href="/'.strtolower($site['lang']['skrot']).'/'.$site['linki_do_sitemapy']['galeria'].'-'.$article['idgalleries'].'.html">';
							echo '<img src="/files/img/galleries/'.$article['photo']['idgalleries'].'/min/'.$article['photo']['path'].'" alt="'.$article['photo']['title'].'" class="gallery_image"/>';
						echo '</a>';
					}
						
						echo '<br /><a href="/'.strtolower($site['lang']['skrot']).'/'.$site['linki_do_sitemapy']['galeria'].'-'.$article['idgalleries'].'.html">'.$article['title'].'</a>';
				echo '</td>';
				$i++;
			if($i == 4){
				echo '</tr>';
				$i = 0;
			}
		}
		if($i != 4){
			echo '</tr>';
			$i = 0;
		}
		echo '</table>';
	?>