<div class="articles_panel">
<?php
	echo '<h1 class="curiosities"><a href="/'.$site['linki_do_sitemapy']['artykul'].'/ciekawostki-'.$idparent.'.html">Ciekawostki</a></h1>';
?>
<div class="pozioma_krecha"></div>
<?php
/*
	$i = 1;
	foreach($articles as $article){
		if($article['idparent'] == $idparent){
			echo '<div class="article_box">';
				echo '<div class="article">';
					echo '<div class="article_title"><a href="/'.$site['linki_do_sitemapy']['artykul'].'/'.$article['friendlyurl'].'-'.$article['idarticles'].'.html">'.$article['title'].'</a></div>';
					echo '<div class="article_content">'.$article['shortdesc'].'</div>';
					echo '<div class="link"><a href="/'.$site['linki_do_sitemapy']['artykul'].'/'.$article['friendlyurl'].'-'.$article['idarticles'].'.html">Więcej<img src="/files/css/img/frontside/strzalki.png" alt=".."/></a></div>';
					echo '<div style="clear: both;"></div>';
				echo '</div>';
				if($i == 1 || $i == 2){
					echo '<div class="poziome_kropki"></div>';
				}
			echo '</div>';
			if($i == 1 || $i == 3){
				echo '<div class="pionowa_kreska"></div>';
			}
			if($i == 2){
				echo '<div style="clear: both;"></div>';
			}
	
			$i++;
			if($i>4){
				break;
			}
		}
	}
	*/
	echo '<table cellspacing="20"><tr>';
	$i = 1;
	foreach($articles as $article){
		if($article['idparent'] == $idparent){
			//echo '<td class="article_box">';
				if($i == 2 || $i == 4){
					echo '<td class="article2"><table>';
				}else{
					echo '<td class="article"><table>';
				}	
					echo '<tr><td class="article_title"><a href="/'.$site['linki_do_sitemapy']['artykul'].'/'.$article['friendlyurl'].'-'.$article['idarticles'].'.html">'.$article['title'].'</a></td></tr>';
					echo '<tr><td class="article_content">'.$article['shortdesc'].'</td></tr>';
					echo '<tr><td class="link"><a href="/'.$site['linki_do_sitemapy']['artykul'].'/'.$article['friendlyurl'].'-'.$article['idarticles'].'.html">Więcej<img src="/files/css/img/frontside/strzalki.png" alt=".."/></a></td></tr>';
				echo '</table></td>';
				if($i == 1 || $i == 2){
					//echo '<div class="poziome_kropki"></div>';
				}
			//echo '</td>';
			if($i == 2){
				echo '</tr><tr><td class="poziome_kropki"></td><td class="poziome_kropki2"></td></tr><tr>';
			}
			
			$i++;
			if($i>4){
				break;
			}
		}
		
	}
	echo '</tr></table>';
?>
</div>