<p align="center"><font size="+1" >Последние объявления</font></p>
<table width="100%" >
<?
$query = "SELECT * FROM board 
WHERE
activ !=1 
AND kol_foto > 0
ORDER BY id DESC LIMIT 12";	

$Recordset1 = mysql_query($query);

$i=0;
while ($row_Recordset1 = mysql_fetch_array($Recordset1)) 
	{ 
	if(!$i) echo '<tr>';
	echo '<td  width=33% valign=top>';
	echo '<table cellpadding="3" cellspacing="3"><tr>';
	if($row_Recordset1['small'] && file_exists($bp.$row_Recordset1['small']))
	echo '<td valign=top><a href="'.$bp.'items/'.$row_Recordset1['zag_url'].'_'.$row_Recordset1['id'].'" ><img class="imground" src="'.$base_path.$row_Recordset1['small'].'" border=0></a></td>';
	
	$titt=explode("<hr>", $row_Recordset1['opis']);
	if($titt[1])
	$tit='title="'.obrez(str_replace("\n"," ", $titt[1]), 200).'"'; else $tit='';

	echo '<td valign=top><a '.$tit.' href="'.$bp.'items/'.$row_Recordset1['zag_url'].'_'.$row_Recordset1['id'].'" >'.$row_Recordset1['zag'].'</a>';
	echo '<br>';
	
			if(date($date_format_site, strtotime($row_Recordset1['data'])) == date($date_format_site))
			echo 'Сегодня';
			elseif(date($date_format_site, (strtotime($row_Recordset1['data']) + 24*60*60)) == date($date_format_site))
			echo 'Вчера';
			else
			echo dat_rus($row_Recordset1['data'], 1);
			echo '<br><span style="color:#858585">'.date("H:i", strtotime($row_Recordset1['data'])).'</span>';
			
	echo '</td>';
	echo '</table>';
	echo '</td>';
	$i++;
	if($i==3) $i=0;
	} 

mysql_free_result($Recordset1);
?>
</table>