1
That greet change and as in order to last time < last > block addresses showed added agencies of estate with (from)category " house adresses and construction " sub-category" agency estate "
function b_addresses_top_show($options) {
global $xoopsDB;
$block = array();
$myts =& MyTextSanitizer::getInstance();
$result = $xoopsDB->query("SELECT lid, cid, title, date, hits FROM ".$xoopsDB->prefix("addresses_links")." WHERE status>0 ORDER BY ".$options[0]." DESC",$options[1],0);
while($myrow = $xoopsDB->fetchArray($result)){
$link = array();
$title = $myts->makeTboxData4Show($myrow["title"]);
if ( !XOOPS_USE_MULTIBYTES ) {
if (strlen($myrow['title']) >= $options[2]) {
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
}
}
$link['id'] = $myrow['lid'];
$link['cid'] = $myrow['cid'];
$link['title'] = $title;
if($options[0] == "date"){
$link['date'] = formatTimestamp($myrow['date'],'s');
}elseif($options[0] == "hits"){
$link['hits'] = $myrow['hits'];
}
$block['links'][] = $link;
}
return $block;
}