// Output
echo '<table class="'.$moduleclass_sfx.'" width="100%">';
$ord=explode(",",$order);
foreach ( $rows as $row ) {
// get Itemid //$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs ); // Blank itemid checker for SEF if ($Itemid == NULL) { $Itemid = ''; } else { $Itemid = '&Itemid='. $Itemid; } $lnk='index.php?option=com_classifieds&task=view&id='.$row->id; $alt=_OGL_TYPE." : ".$row->typename." "; $alt.="\n"._OGL_CATEGORY." : ".get_cat_path_titles($row->catid, " > "); echo '<tr><td><table class="'.$moduleclass_sfx.'-adblock">';for ($i=0; $i<count($ord); $i++) {
if ($ord*=="T") echo '<tr><td class="'.$moduleclass_sfx.'-type">'.$row->typename. '</td>'; if ($ord*=="C") echo '<td class="'.$moduleclass_sfx.'-category">'.$row->categoryname.'</td>'; if ($ord*=="D") echo '<td class="'.$moduleclass_sfx.'-date">'.date($date_format, strtotime($row->date )).'</td>'; if ($ord*=="A") echo '<td class="'.$moduleclass_sfx.'-title">[url="'.$lnk.'"]'. $row->title ."</td>"; if (($ord*=="I") && $row->adimage ) { $img=$row->adimage; $imgthumb="thumbs/".$row->adimage; if (substr_count($img,"/")>0) { $imgname=substr($img,strrpos($img,'/')); $imgpath=substr($img,0,strrpos($img,'/')); $imgthumb=$imgpath."/thumbs".$imgname; } echo '<td class="'.$moduleclass_sfx.'-image"><a href="'.$lnk.'" title="'.$alt.'"> ![image]('.$mosConfig_live_site.'/components/com_classifieds/adimages/'.$imgthumb.')</a></td>'; } if (($ord*=="X") && $desc_count_chars) { echo '<td class="'.$moduleclass_sfx.'-description">'.substr($row->description,0,$desc_count_chars); if ($desc_count_chars<strlen($row->description)) echo '...'; echo '</td>'; } if (($ord*=="P") && $row->telephone) echo '<td class="'.$moduleclass_sfx.'-phone">'._OGL_PHONE.' : '.$row->telephone.'</td>';}
echo '</tr></table></td></tr>';}
echo '</table>';