function getList($params) { $style = $params->get('style', 'emphasis'); $idKind = explode(',', trim($params->get('idKind'))); $order_by = $params->get('order_by', 'ordering'); $paging = $params->get('paging', '0'); $number_per_page = $params->get('number_per_page', '5'); $number_to_display = $params->get('number_to_display', '10'); $idKindStr = ""; $idPaging = $params->get('idPaging'); $select = modJeaEmphasisHelper::getBaseSelectSQL(); $where = " WHERE tp.published=1 "; if ($style == "emphasis") { $where .= " AND tp.emphasis=1 AND tp.success = 0 "; } else { if ($style == "newsest") { $where .= " AND tp.newsest=1 AND tp.success = 0 "; } else { if ($style == "byKind") { $where .= ' AND (tp.kind_id=' . implode(' OR tp.kind_id=', $idKind) . ') AND tp.success = 0 '; } else { if ($style == "byRealtor") { $realtorId = $params->get('realtor_id', 0); $where .= " AND (tp.realtor_id='" . $realtorId . "') AND tp.success = 0"; } else { if ($style == "sameItems") { $RowSam = modJeaEmphasisHelper::getSamRealItems(); $rows = $RowSam['rows']; $RowSam['TotalPage']; require JModuleHelper::getLayoutPath('mod_jea_emphasis'); return; } else { if ($style == "successfulItems") { $where .= " AND (tp.success=1) "; } else { if ($style == "byType") { $where .= ' AND (tp.type_id=' . implode(' OR tp.type_id=', $idKind) . ') AND tp.success = 0 '; } } } } } } } $where .= " ORDER BY {$order_by} DESC "; $sql = $select . $where; $db =& JFactory::getDBO(); $db->setQuery($sql, 0, $params->get('number_to_display')); $rows = $db->loadObjectList(); if ($db->getErrorNum()) { JError::raiseWarning(200, $db->getErrorMsg()); } return $rows; }
*/ defined('_JEXEC') or die('Restricted access'); require_once dirname(__FILE__) . DS . 'helper.php'; JHTML::stylesheet('css_short_show.css', 'components/com_jea/views/'); include_once "libraries/unisonlib/com_jea_lib.php"; include_once "libraries/unison/unison_jea_lib.php"; $params->set('surface_measure', modJeaEmphasisHelper::getComponentParam('surface_measure')); $paging = $params->get('paging'); $positionfooter = $params->get('positionfooter'); $positiontitle = $params->get('positiontitle'); $style = $params->get('style', 'emphasis'); if ($paging == 1) { $number_per_page = $params->get('number_per_page'); $ItemidParam = modJeaEmphasisHelper::getparamItemId($params); if ($style == "sameItems") { $RowSam = modJeaEmphasisHelper::getSamRealItems(); $rows = $RowSam['rows']; $tPage = $RowSam['TotalPage']; } else { $rowsF = modJeaEmphasisHelper::getList($params); $rows = array_slice($rowsF, 0, $number_per_page); $tPage = ceil(count($rowsF) / $number_per_page); } } else { $rows = modJeaEmphasisHelper::getList($params); } $idPaging = $params->get('idPaging'); $measure = $params->get('surface_measure'); $style = $params->get('style', 'emphasis'); $order_by = $params->get('order_by', 'ordering'); $idKind = $params->get('idKind');