<?php

	echo '<ul class="vypis left">';
	
?>

	<li class="ads"><?php include('ads_vypis_center.php'); ?></li>

<?php
	foreach($result as $k => $row)
	{
		echo '<li class="hov">';
		echo '<div class="list-rating">';
		if($row->pocet_hodnoceni > 0)echo $words[65].': <span class="orange bold">'.$row->rating.' ('.$row->pocet_hodnoceni.'x)</span>';
		else echo $words[65].': <span class="orange bold">'.$row->rating.'</span>';
		if($row->pocet_prispevku > 0)echo '<br><a href="/'.$diskusecontroller.'/'.$row->uri.'/">'.$words[60].'</a>(<span class="orange bold">'.$row->pocet_prispevku.'x</span>)';
		echo '</div>';
		echo '<h3><a href="/'.$detailcontroller.'/'.$row->uri.'/" title="';
		echo htmlspecialchars($row->nazev);
		if(!empty($row->title))echo ' - '.htmlspecialchars($row->title);
		echo '">'.htmlspecialchars($row->nazev).'</a></h3>';
		if(strlen($row->popis) > 0)echo htmlspecialchars(mb_substr(str_replace('|', ',', $row->popis), 0, 200, "utf-8"));
		if(strlen($row->popis) > 200)echo '...';
		if(!empty($row->ulice) and !empty($row->obec) and !empty($row->psc))
		{
			echo '<div>'.$row->ulice.', '.$row->obec.', '.$row->psc.'</div>';
		}
		echo '</li>';
	}
	
	if(count($result) > 5)
  {
    echo '<li class="hov">';
    include('ads_vypis_center_end.php');
    echo '</li>';
  }
	?>
	
	<?php echo '</ul>';
	
?>
