Example #1
0
 function listIems()
 {
     jimport('joomla.html.pagination');
     JHTML::_('behavior.tooltip');
     global $u_reGlobalConfig;
     // get return field
     $returnField = $u_reGlobalConfig['REALTOR']['realtor_list_return_field'];
     //get limit
     $limit = $u_reGlobalConfig['REALTOR']['list_limit'];
     $limitstart =& JRequest::getVar('limitstart', 0);
     $page = ($limitstart + $limit) / $limit;
     //		print_r($returnField ."<br/>");
     //		print_r($limit ."<br/>");
     //		print_r($limitstart ."<br/>");
     //		print_r($page ."<br/>");
     //		exit;
     $ModelRealtors = new JeaModelRealtors();
     $Danhsachnhamoigioi = $ModelRealtors->layDanhSachNhaMoiGioi($returnField, $page, $limit);
     //print_r($Danhsachnhamoigioi['rows'][3]);
     //	exit;
     //		$model = $this->getModel();
     //		$items = $this->get('items');
     $this->assign('rows', $Danhsachnhamoigioi['rows'][3]);
     $this->assignRef('tongDong', $Danhsachnhamoigioi['rows'][0]);
     $this->assignRef('paging', ilandCommonUtils::getPage($Danhsachnhamoigioi['rows'][0], $limit));
     $this->pagination = new JPagination($this->tongDong, $limitstart, $limit);
     $this->assignRef('hien_thi', $Danhsachnhamoigioi['published']);
     // print_r($this->hien_thi);
     //	exit;
     JToolBarHelper::title(JText::_(ucfirst($this->get('category')) . ' management'), 'jea.png');
     JToolBarHelper::publish();
     JToolBarHelper::unpublish();
     JToolBarHelper::addNew();
     JToolBarHelper::customX('copy', 'copy.png', 'copy_f2.png', 'Copy');
     JToolBarHelper::editList();
     JToolBarHelper::deleteList(JText::_('CONFIRM_DELETE_MSG'));
     $templatePath = "../templates/WebGH/html/com_u_re/realtors/";
     $this->addTemplatePath($templatePath);
     $this->setLayout('list');
     parent::display();
 }