Вод код
<?
$modelStreet=new Models_Street;
$itemStreet=false;
if($this->item['streetCode']!=''){
$itemStreet=$modelStreet->getItemByParam('code',$this->item['streetCode']);
}
?>
<table width="100%" border="0">
<tr>
<td width="137" align="center" valign="middle" style="text-align: center; font-weight: bold;">
<?if($itemStreet){?>
<?=Helpers_Model::GetMixed(new Models_StreetType,$itemStreet['parentType'],'shortTitle')?>
<?}?>
<?=$this->item['street']?>
<br />
<span style="font-size:75%;">
<?=Helpers_Model::GetMixed(new Models_TypeEstate,$this->item['typeEstate'])?>
<br />
<?if($this->item['typeCategories']!=''){?>
<?=Helpers_Model::GetMixed(new Models_TypeCategories,$this->item['typeCategories'])?>
<?}?>
</span>
</td>
<td width="502" align="center" style="text-align: center">
<div align="center">
<?
$modelAdImagesLinks=new Models_AdImagesLinks;
$images=$modelAdImagesLinks->getItems(array('where'=>array('parent'=>$this->item['id']),'order'=>'id asc'));
if(count($images)){
$copy=$images;
$inc=0;
foreach($copy as $key=>$val){
unset($images[$key]);
$image=Helpers_Images::Get($val['value'],$this->model,array(
'type'=>'small',
'that'=>false,
));
?>
<?if($image){?>
<a href="/upload/ad/<?=$val['value']?>" class="fancybox" rel="gallery-<?=$this->item['id']?>" style="text-decoration:none;">
<?=new Form_Elements_Img(false,(array)$image);?>
</a>
<?
if($inc==3){
break;
}
$inc++;
?>
<?}?>
<?}?>
<?
if(count($images)){
foreach($images as $key=>$val){
$image=Helpers_Images::Get($val['value'],$this->model,array(
'type'=>'small',
'that'=>false,
));
if($image){
?>
<a href="/upload/ad/<?=$val['value']?>" class="fancybox" rel="gallery-<?=$this->item['id']?>" style="display:none;">
<?=new Form_Elements_Img(false,(array)$image);?>
</a>
<?
}
}
}
?>
<?}?>
</div>
</td>
<td width="95" height="100" valign="middle" style="text-align: center; font-size: 14px;">
<span style="text-align: center"><?=Helpers_Number::Format($this->item['price'])?> руб.</span>
</td>
</tr>
<tr>
<td align="center" valign="middle" style="text-align: center; font-weight: bold;"> </td>
<td style="text-align: justify; font-size: 15px;"><?=$this->item['description']?>
<p> </p>
<p> </p>
<p><a href=$modelStreet">gbfgbfgb</a></p></td>
<td height="25" style="text-align: center"><a href="<a href='/product.php?id=$rowt[id]'>"></a></td>
</tr>
</table>
<hr align="center" width="700" size="2">