function getUpdateOrdering() { $id = JRequest::getVar('cid', array(0), '', 'array'); $language = ilandCommonUtils::getLanguage(); $ProjectGroup = new JeaModelProject_group(); $ProjectGroup->ordering($id[0], $language); }
function LayDSDuAn($param) { $field = 'id,ten'; $condition = 'hien_thi_ra_ngoai=1'; $orderby = ''; if ($param->get('ma_so', '0') != '0') { $orderby .= 'id ' . $param->get('ma_so', 'ASC'); } if ($param->get('thu_tu', '0') != '0') { if ($orderby != '') { $orderby .= ','; } $orderby .= 'ordering ' . $param->get('thu_tu', 'ASC'); } if ($param->get('noi_bat', '0') != '0') { if ($orderby != '') { $orderby .= ','; } $orderby .= 'noi_bat ' . $param->get('noi_bat', 'ASC'); } if ($param->get('moi_nhat', '0') != '0') { if ($orderby != '') { $orderby .= ','; } $orderby .= 'moi_nhat ' . $param->get('moi_nhat', 'ASC'); } $pagesize = $param->get('so_duan', '10'); $DBConfig = ilandCommonUtils::getSiteDBConfig(); $lang = ilandCommonUtils::getLanguage(); $dsduan = iland4_layDanhSachDuAn($DBConfig, $field, $condition, 1, $pagesize, $orderby, $lang); return $dsduan; }
function getProject(&$params) { $returnField = U_ReConfig::getValueByKey('SLIDESHOWIMAGE', 'slide_show_list_return_field'); $limit = U_ReConfig::getValueByKey('SLIDESHOWIMAGE', 'list_limit'); $orderby = U_ReConfig::getValueByKey('SLIDESHOWIMAGE', 'orderby'); $limitstart =& JRequest::getVar('limitstart', 0); $page = ($limitstart + $limit) / $limit; $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); $conditionParams = ' hien_thi_ra_ngoai=1 AND noi_bat=1 '; $rows = iland4_layDanhSachDuAn($DBConfig, $returnField, $conditionParams, $page, $limit, $orderby, $language); return $rows[3]; }
function displayPropertiesByCode($ma_so) { $propertyModel = new U_ReModelProperties(); $language = ilandCommonUtils::getLanguage(); $propertyId = $propertyModel->layBDSId($ma_so, $language); $this->displayPropertyDetail($propertyId); }
function lay_du_lieu($table) { $language = ''; if ($language == NULL) { $language = ilandCommonUtils::getLanguage(); } $propertyModel = new U_reModelProperties(); $projectModel = new U_ReModelProjects(); switch ($table) { case 'loai_giao_dich': return $propertyModel->layDanhSachLoaiGiaoDich($language); case 'huong': return $propertyModel->layDanhSachHuong($language); case 'loai_bds': return $propertyModel->layDanhSachLoaiBatDongSan($language); case 'tinh_thanh': return $propertyModel->layDanhSachTinhThanh($language); case 'quan_huyen': if (JRequest::getVar('tinh_thanh_id')) { $townId = JRequest::getVar('tinh_thanh_id'); } else { // $townId = U_ReConfig::getValueByKey( 'COMMON', 'tinh_thanh_mac_dinh' ); if (isset($_SESSION['tmp'])) { $townId = $_SESSION['tmp']['tinh_thanh_id']; } else { $townId = 0; } } return $propertyModel->layDanhSachQuanHuyen($townId, 'vi'); case 'phuong_xa': if (JRequest::getVar('quan_huyen_id')) { $quanHuyenId = JRequest::getVar('quan_huyen_id'); } else { $quanHuyenId = U_ReConfig::getValueByKey('COMMON', 'quan_huyen_mac_dinh'); } return $propertyModel->layDanhSachPhuongXa($quanHuyenId); case 'duong_pho': if (JRequest::getVar('quan_huyen_id')) { $quanHuyenId = JRequest::getVar('quan_huyen_id'); } else { $quanHuyenId = U_ReConfig::getValueByKey('COMMON', 'quan_huyen_mac_dinh'); } return $propertyModel->layDanhSachDuongPho($quanHuyenId); case 'nhom_du_an': return $nhomduan = $projectModel->laynhomduan($language); case 'tien_ich': return $propertyModel->layDanhSachTienIch($language); case 'du_an': $ix_quan_huyen_id = JRequest::getVar('quan_huyen_id', 0); $ix_tinh_thanh_id = JRequest::getVar('tinh_thanh_id', 0); return $projectModel->laydanhsachduan($ix_quan_huyen_id, $ix_tinh_thanh_id); } }
function layMaSo($table = 'bat_dong_san') { $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); switch ($table) { case 'bat_dong_san': $value = iland4_layDanhSachBDS($DBConfig, 'MAX(id) AS id', '1', 1, 1, '', $language); break; case 'du_an': $value = iland4_layDanhSachDuAn($DBConfig, 'MAX(id) AS id', '1', 1, 1, '', $language); break; } $stt = $value[3][0]['id']; if ($stt == NULL) { $stt = 0; } return $stt + 1; }
function getListProjectGroup() { $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); return iland4_layDanhSachLoaiDuAn($DBConfig, $language); }
function ordering($table, $id, $paramstring) { // print_r($table); // print_r($id); // print_r($paramstring); // exit; $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); $ordering = 'ordering_' . $id; $orderingvalue = JRequest::getVar("{$ordering}", ''); $paramvalue = "ordering = '{$orderingvalue}'"; switch ($table) { case 'phap_ly': iland4_suaPhapLy($DBConfig, $id, $paramstring, $language); break; case 'don_vi_tien': iland4_suaDonViTien($DBConfig, $id, $paramstring); break; case 'don_vi_dien_tich': iland4_suaDonViDienTich($DBConfig, $id, $paramstring, $language); break; case 'loai_tien_ich': iland4_suaLoaiTienIch($DBConfig, $id, $paramstring, $language); break; case 'tien_ich': iland4_suaTienIch($DBConfig, $id, $paramstring, $language); break; case 'tinh_thanh': iland4_suaTinhThanhPho($DBConfig, $id, $paramstring); break; case 'quan_huyen': iland4_suaQuanHuyen($DBConfig, $id, $paramstring); break; case 'loai_bds': iland4_suaLoaiBDS($DBConfig, $id, $paramstring, $language); break; case 'loai_du_an': iland4_suaLoaiDuAn($DBConfig, $id, $paramstring, $language); break; } }
function updateProject($id, $param, $language) { $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); return iland4_suaDuAn($DBConfig, $id, $param, $language); }
function getProjectById($id) { $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); return iland4_layChiTietDuAn($DBConfig, $id, $language); }
function updateLuotXem() { $id = JRequest::getVar('cid', array(0), '', 'array'); $language = ilandCommonUtils::getLanguage(); $propertiesModel = new U_ReModelProperties(); $propertiesModel->setLuotXem($id[0], $language); }
function getUpdateRealtor($id, $param, $language) { $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); return iland4_suaNhaMoiGioi($DBConfig, $id, $param, $language); }
$task = $_GET['task']; $language = $_GET['language']; $dbConfig = array(); $dbConfig[] = U_ReConfig::getValueByKey('DB', 'host'); $dbConfig[] = U_ReConfig::getValueByKey('DB', 'user'); $dbConfig[] = U_ReConfig::getValueByKey('DB', 'pass'); $dbConfig[] = U_ReConfig::getValueByKey('DB', 'name'); //$dbConfig[] = "localhost"; //$dbConfig[] = "mlbds_db"; //$dbConfig[] = "1234mldbqwer"; //$dbConfig[] = "mlbds_db"; $ordering = U_ReConfig::getValueByKey('MOD_DANH_SACH_BDS', 'orderby'); if ($task == 'bdslq') { // Lay data bdslq require_once 'libraries/com_u_re/models/properties.php'; $lang = ilandCommonUtils::getLanguage(); $currentPage = $_GET['page']; $condition = $_GET['condition']; $limit = 10; $returnField = $_GET['return_field']; $conditionArr = explode(',', $condition); // tao data property $propertyData = array(); foreach ($conditionArr as $con) { $propertyData[$con] = $_GET[$con]; } $conditionParam = ilandCommonUtils::genBDSLQConditionParam($condition, $propertyData); //$data = U_ReModelProperties::getListProperties( $returnField, $conditionParam, $currentPage, 10 ); // $data = U_ReModelProperties::getSameProperties( $lang, $returnField, // $condition, $propertyData, $currentPage ); // fetch bdslq template
function getUpdateRealtor($param) { $getLanguage = ilandCommonUtils::getLanguage(); $id = JRequest::getVar('cid', array(0), '', 'array'); $ModelRealtors = new JeaModelRealtors(); $ModelRealtors->getUpdateRealtor($id[0], $param, $getLanguage); }
function getUpdateProperties($id, $param, $language) { $language = ilandCommonUtils::getLanguage(); $DBConfig = ilandCommonUtils::getSiteDBConfig(); return iland4_suaBDS($DBConfig, $id, $param, $language); }
function dangKyMail($email) { $this->assignRef('lang', ilandCommonUtils::getLanguage()); $this->assignRef('SiteDBConfig', ilandCommonUtils::getSiteDBConfig()); // global config global $u_reGlobalConfig; // get data from post $data = array(); $data['du_an_id'] = '-1'; $data['ten_du_an'] = ''; $data['ho_ten'] = ''; $data['dia_chi'] = ''; $data['dien_thoai'] = ''; $data['email'] = $email; $data['yeu_cau'] = 'Nhận tin mới qua mail'; $data['ngay_gui'] = '' . time(); $data['dat_cho'] = '0'; $data['giao_dich_thanh_cong'] = '0'; // luu data $projectModel = new U_ReModelProjects(); $result = $projectModel->luuThongTinDatChoDuAn($data); // chuyen sang trang thong bao luu thanh cong $templatePath = "templates/" . $u_reGlobalConfig['DB']['template'] . "/html/com_u_re/projects/"; $this->addTemplatePath($templatePath); // hardcode template name $this->setLayout('dang_ky_mail_thanh_cong'); $linkData = array(); $linkData['linkTrangChu'] = 'index.php'; $linkData['linkListDuAn'] = 'index.php?option=com_u_re&controller=projects&Itemid=24'; // assign $this->assignRef('linkData', $linkData); // display template parent::display(); }