function layDanhSachBatDongSan($language) { $language = 'vi'; //gan tam $language2 = 'en'; $DBConfig = ilandCommonUtils::getSiteDBConfig(); $result = array(); $context = 'com_jea.projects'; $mainframe =& JFactory::getApplication(); $table = $mainframe->getUserStateFromRequest($context . 'table', 'table', 0, 'string'); $townId = $mainframe->getUserStateFromRequest($context . 'tinh_thanh', 'tinh_thanh', 0, 'string'); $tien_ichID = $mainframe->getUserStateFromRequest($context . 'loai_tien_ich', 'loai_tien_ich', 0, 'string'); $ten_tien_ich = $mainframe->getUserStateFromRequest($context . 'ten_tien_ich', 'ten_tien_ich', 0, 'string'); // $_SESSION['ten_tien_ich_config'] = ''; if ($ten_tien_ich != NULL) { $_SESSION['ten_tien_ich_config'] = $ten_tien_ich; } if (!$table) { $table = 'loai_bds'; } $result['name'] = $table; $result['townId'] = $townId; $result['tien_ichID'] = $tien_ichID; @($result['ten_tien_ich'] = $_SESSION['ten_tien_ich_config']); // print_r( "tttt---".$result['ten_tien_ich'] ); if (!$townId) { $townId = 1; } if (!$tien_ichID) { $tien_ichID = 1; } // $townId =1; // print_r($townId); // exit; // print_r($table); // exit; // echo "<script> alert($table)</script>"; switch ($table) { case 'phap_ly': $result['value'] = iland4_layDanhSachPhapLy($DBConfig, $language); $result['value2'] = iland4_layDanhSachPhapLy($DBConfig, $language2); break; case 'don_vi_tien': $result['value'] = iland4_layDanhSachDonViTien($DBConfig); $result['value2'] = iland4_layDanhSachDonViTien($DBConfig); break; case 'don_vi_dien_tich': $result['value'] = iland4_layDanhSachDonViDienTich($DBConfig, $language); $result['value2'] = iland4_layDanhSachDonViDienTich($DBConfig, $language2); break; case 'loai_tien_ich': $result['value'] = iland4_layDanhSachLoaiTienIch($DBConfig, $language); $result['value2'] = iland4_layDanhSachLoaiTienIch($DBConfig, $language2); break; case 'tien_ich': $result['value'] = iland4_layDanhSachTienIchTheoLoai($DBConfig, $tien_ichID, $language); $result['value2'] = iland4_layDanhSachTienIchTheoLoai($DBConfig, $tien_ichID, $language2); break; case 'tinh_thanh': $result['value'] = iland4_layDanhSachTinhThanhPho($DBConfig); $result['value2'] = iland4_layDanhSachTinhThanhPho($DBConfig); break; case 'quan_huyen': $result['value'] = iland4_layDanhSachQuanHuyen($DBConfig, $townId); $result['value2'] = iland4_layDanhSachQuanHuyen($DBConfig, $townId); break; case 'loai_bds': $result['value'] = iland4_layDanhSachLoaiBDS($DBConfig, $language); $result['value2'] = iland4_layDanhSachLoaiBDS($DBConfig, $language2); // print_r($result['value2']); // exit; break; case 'loai_du_an': $result['value'] = iland4_layDanhSachLoaiDuAn($DBConfig, $language); $result['value2'] = iland4_layDanhSachLoaiDuAn($DBConfig, $language2); break; // default: $result['value'] = iland4_layDanhSachLoaiBDS( $DBConfig, $language ); } // print_r($result['value']); // exit; return $result; }
function layDanhSachDonViTien() { $DBConfig = ilandCommonUtils::getSiteDBConfig(); return iland4_layDanhSachDonViTien($DBConfig); }