From 07fcbc0afd47717776f94948dbfeb4b0841f47f3 Mon Sep 17 00:00:00 2001 From: Tobias Krais Date: Mon, 26 Jun 2017 10:33:09 +0200 Subject: [PATCH] Version 1.0 --- install.php | 10 +- lib/category.php | 14 +- lib/d2u_immo_module_manager.php | 3 + lib/property.php | 2 +- modules/70/1/output.php | 50 ++++---- modules/70/1/styles.css | 0 modules/70/3/input.php | 40 ++++++ modules/70/3/output.php | 156 +++++++++++++++++++++++ pages/property.online.php | 2 +- plugins/export/install.php | 2 +- plugins/export/lib/exported_property.php | 1 - plugins/export/lib/openimmo.php | 2 +- plugins/export/lib/provider.php | 11 +- 13 files changed, 249 insertions(+), 44 deletions(-) delete mode 100644 modules/70/1/styles.css create mode 100644 modules/70/3/input.php create mode 100644 modules/70/3/output.php diff --git a/install.php b/install.php index 298224a..b7dc742 100644 --- a/install.php +++ b/install.php @@ -143,7 +143,7 @@ $clang_id = count(rex_clang::getAllIds()) == 1 ? rex_clang::getStartId() : 0; if($sql->getRows() == 0) { $sql->setQuery("INSERT INTO `". rex::getTablePrefix() ."url_generate` (`article_id`, `clang_id`, `url`, `table`, `table_parameters`, `relation_table`, `relation_table_parameters`, `relation_insert`, `createdate`, `createuser`, `updatedate`, `updateuser`) VALUES - (". rex_article::getSiteStartArticleId() .", ". $clang_id .", '', '1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties', '{\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_field_1\":\"name\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_field_2\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_field_3\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_id\":\"property_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_clang_id\":\"clang_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_restriction_field\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_restriction_operator\":\"=\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_restriction_value\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_url_param_key\":\"property_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_seo_title\":\"seo_title\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_seo_description\":\"seo_description\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_add\":\"1\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_frequency\":\"monthly\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_priority\":\"1.0\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_lastmod\":\"updatedate\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_path_names\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_path_categories\":\"0\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_relation_field\":\"category_id\"}', '1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories', '{\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_field_1\":\"parent_name\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_field_2\":\"name\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_field_3\":\"\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_id\":\"category_id\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_clang_id\":\"clang_id\"}', 'before', UNIX_TIMESTAMP(), 'd2u_immo_addon_installer', UNIX_TIMESTAMP(), 'd2u_immo_addon_installer');"); + (". rex_article::getSiteStartArticleId() .", ". $clang_id .", '', '1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties', '{\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_field_1\":\"name\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_field_2\":\"property_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_field_3\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_id\":\"property_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_clang_id\":\"clang_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_restriction_field\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_restriction_operator\":\"=\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_restriction_value\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_url_param_key\":\"property_id\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_seo_title\":\"seo_title\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_seo_description\":\"seo_description\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_add\":\"1\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_frequency\":\"monthly\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_priority\":\"1.0\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_sitemap_lastmod\":\"updatedate\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_path_names\":\"\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_path_categories\":\"0\",\"1_xxx_". rex::getTablePrefix() ."d2u_immo_url_properties_relation_field\":\"category_id\"}', '1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories', '{\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_field_1\":\"parent_name\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_field_2\":\"name\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_field_3\":\"\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_id\":\"category_id\",\"1_xxx_relation_". rex::getTablePrefix() ."d2u_immo_url_categories_clang_id\":\"clang_id\"}', 'before', UNIX_TIMESTAMP(), 'd2u_immo_addon_installer', UNIX_TIMESTAMP(), 'd2u_immo_addon_installer');"); } $sql->setQuery("SELECT * FROM ". rex::getTablePrefix() ."url_generate WHERE `table` = '1_xxx_". rex::getTablePrefix() ."d2u_immo_url_categories'"); if($sql->getRows() == 0) { @@ -170,14 +170,6 @@ $sql->setQuery("INSERT INTO ". rex::getTablePrefix() ."media_manager_type_effect (`type_id`, `effect`, `parameters`, `priority`, `createdate`, `createuser`) VALUES (". $last_id .", 'resize', '{\"rex_effect_convert2img\":{\"rex_effect_convert2img_convert_to\":\"jpg\",\"rex_effect_convert2img_density\":\"100\"},\"rex_effect_crop\":{\"rex_effect_crop_width\":\"\",\"rex_effect_crop_height\":\"\",\"rex_effect_crop_offset_width\":\"\",\"rex_effect_crop_offset_height\":\"\",\"rex_effect_crop_hpos\":\"left\",\"rex_effect_crop_vpos\":\"top\"},\"rex_effect_filter_blur\":{\"rex_effect_filter_blur_repeats\":\"\",\"rex_effect_filter_blur_type\":\"\",\"rex_effect_filter_blur_smoothit\":\"\"},\"rex_effect_filter_colorize\":{\"rex_effect_filter_colorize_filter_r\":\"\",\"rex_effect_filter_colorize_filter_g\":\"\",\"rex_effect_filter_colorize_filter_b\":\"\"},\"rex_effect_filter_sharpen\":{\"rex_effect_filter_sharpen_amount\":\"\",\"rex_effect_filter_sharpen_radius\":\"\",\"rex_effect_filter_sharpen_threshold\":\"\"},\"rex_effect_flip\":{\"rex_effect_flip_flip\":\"X\"},\"rex_effect_header\":{\"rex_effect_header_download\":\"open_media\",\"rex_effect_header_cache\":\"no_cache\"},\"rex_effect_insert_image\":{\"rex_effect_insert_image_brandimage\":\"\",\"rex_effect_insert_image_hpos\":\"left\",\"rex_effect_insert_image_vpos\":\"top\",\"rex_effect_insert_image_padding_x\":\"\",\"rex_effect_insert_image_padding_y\":\"\"},\"rex_effect_mediapath\":{\"rex_effect_mediapath_mediapath\":\"\"},\"rex_effect_mirror\":{\"rex_effect_mirror_height\":\"\",\"rex_effect_mirror_set_transparent\":\"colored\",\"rex_effect_mirror_bg_r\":\"\",\"rex_effect_mirror_bg_g\":\"\",\"rex_effect_mirror_bg_b\":\"\"},\"rex_effect_resize\":{\"rex_effect_resize_width\":\"768\",\"rex_effect_resize_height\":\"768\",\"rex_effect_resize_style\":\"maximum\",\"rex_effect_resize_allow_enlarge\":\"not_enlarge\"},\"rex_effect_rotate\":{\"rex_effect_rotate_rotate\":\"0\"},\"rex_effect_rounded_corners\":{\"rex_effect_rounded_corners_topleft\":\"\",\"rex_effect_rounded_corners_topright\":\"\",\"rex_effect_rounded_corners_bottomleft\":\"\",\"rex_effect_rounded_corners_bottomright\":\"\"},\"rex_effect_workspace\":{\"rex_effect_workspace_width\":\"\",\"rex_effect_workspace_height\":\"\",\"rex_effect_workspace_hpos\":\"left\",\"rex_effect_workspace_vpos\":\"top\",\"rex_effect_workspace_set_transparent\":\"colored\",\"rex_effect_workspace_bg_r\":\"\",\"rex_effect_workspace_bg_g\":\"\",\"rex_effect_workspace_bg_b\":\"\"}}', 1, '". date("Y-m-d H:i:s") ."', 'd2u_immo');"); } -$sql->setQuery("SELECT * FROM ". rex::getTablePrefix() ."media_manager_type WHERE name = 'd2u_immo_overview'"); -if($sql->getRows() == 0) { - $sql->setQuery("INSERT INTO ". rex::getTablePrefix() ."media_manager_type (`status`, `name`, `description`) VALUES - (1, 'd2u_immo_overview', 'D2U Immobilien Bild auf Immobilien Übersichtsseite.');"); - $last_id = $sql->getLastId(); - $sql->setQuery("INSERT INTO ". rex::getTablePrefix() ."media_manager_type_effect (`type_id`, `effect`, `parameters`, `priority`, `createdate`, `createuser`) VALUES - (". $last_id .", 'resize', '{\"rex_effect_convert2img\":{\"rex_effect_convert2img_convert_to\":\"jpg\",\"rex_effect_convert2img_density\":\"100\"},\"rex_effect_crop\":{\"rex_effect_crop_width\":\"\",\"rex_effect_crop_height\":\"\",\"rex_effect_crop_offset_width\":\"\",\"rex_effect_crop_offset_height\":\"\",\"rex_effect_crop_hpos\":\"left\",\"rex_effect_crop_vpos\":\"top\"},\"rex_effect_filter_blur\":{\"rex_effect_filter_blur_repeats\":\"\",\"rex_effect_filter_blur_type\":\"\",\"rex_effect_filter_blur_smoothit\":\"\"},\"rex_effect_filter_colorize\":{\"rex_effect_filter_colorize_filter_r\":\"\",\"rex_effect_filter_colorize_filter_g\":\"\",\"rex_effect_filter_colorize_filter_b\":\"\"},\"rex_effect_filter_sharpen\":{\"rex_effect_filter_sharpen_amount\":\"\",\"rex_effect_filter_sharpen_radius\":\"\",\"rex_effect_filter_sharpen_threshold\":\"\"},\"rex_effect_flip\":{\"rex_effect_flip_flip\":\"X\"},\"rex_effect_header\":{\"rex_effect_header_download\":\"open_media\",\"rex_effect_header_cache\":\"no_cache\"},\"rex_effect_insert_image\":{\"rex_effect_insert_image_brandimage\":\"\",\"rex_effect_insert_image_hpos\":\"left\",\"rex_effect_insert_image_vpos\":\"top\",\"rex_effect_insert_image_padding_x\":\"\",\"rex_effect_insert_image_padding_y\":\"\"},\"rex_effect_mediapath\":{\"rex_effect_mediapath_mediapath\":\"\"},\"rex_effect_mirror\":{\"rex_effect_mirror_height\":\"\",\"rex_effect_mirror_set_transparent\":\"colored\",\"rex_effect_mirror_bg_r\":\"\",\"rex_effect_mirror_bg_g\":\"\",\"rex_effect_mirror_bg_b\":\"\"},\"rex_effect_resize\":{\"rex_effect_resize_width\":\"768\",\"rex_effect_resize_height\":\"768\",\"rex_effect_resize_style\":\"maximum\",\"rex_effect_resize_allow_enlarge\":\"enlarge\"},\"rex_effect_rotate\":{\"rex_effect_rotate_rotate\":\"0\"},\"rex_effect_rounded_corners\":{\"rex_effect_rounded_corners_topleft\":\"\",\"rex_effect_rounded_corners_topright\":\"\",\"rex_effect_rounded_corners_bottomleft\":\"\",\"rex_effect_rounded_corners_bottomright\":\"\"},\"rex_effect_workspace\":{\"rex_effect_workspace_width\":\"\",\"rex_effect_workspace_height\":\"\",\"rex_effect_workspace_hpos\":\"left\",\"rex_effect_workspace_vpos\":\"top\",\"rex_effect_workspace_set_transparent\":\"colored\",\"rex_effect_workspace_bg_r\":\"\",\"rex_effect_workspace_bg_g\":\"\",\"rex_effect_workspace_bg_b\":\"\"}}', 1, '". date("Y-m-d H:i:s") ."', 'd2u_immo');"); -} // YForm e-mail template $sql->setQuery("SELECT * FROM ". rex::getTablePrefix() ."yform_email_template WHERE name = 'd2u_immo_request'"); diff --git a/lib/category.php b/lib/category.php index 4f8bb22..ae9374b 100644 --- a/lib/category.php +++ b/lib/category.php @@ -198,13 +198,23 @@ public function isChild() { /** * Gets the properties of the category. + * @param string $market_type KAUF, MIETE_PACHT, ERBPACHT, LEASING or empty (all) + * @param boolean $only_online Show only online properties * @return Property[] Properties in this category */ - public function getProperties() { + public function getProperties($market_type = '', $only_online = FALSE) { $query = "SELECT lang.property_id FROM ". rex::getTablePrefix() ."d2u_immo_properties_lang AS lang " ."LEFT JOIN ". rex::getTablePrefix() ."d2u_immo_properties AS properties " ."ON lang.property_id = properties.property_id " - ."WHERE category_id = ". $this->category_id ." AND clang_id = ". $this->clang_id .' '; + ."WHERE category_id = ". $this->category_id ." AND clang_id = ". $this->clang_id ." "; + if($only_online || $market_type != '') { + if($only_online) { + $query .= "AND online_status = 'online' "; + } + if($market_type != '') { + $query .= "AND market_type = '". $market_type ."' "; + } + } if(rex_addon::get('d2u_immo')->hasConfig('default_property_sort') && rex_addon::get('d2u_immo')->getConfig('default_property_sort') == 'priority') { $query .= 'ORDER BY priority ASC'; } diff --git a/lib/d2u_immo_module_manager.php b/lib/d2u_immo_module_manager.php index 6d6f1c9..97f6121 100644 --- a/lib/d2u_immo_module_manager.php +++ b/lib/d2u_immo_module_manager.php @@ -17,6 +17,9 @@ public static function getD2UImmoModules() { $modules[] = new D2UModule("70-2", "D2U Immo Addon - Infobox Ansprechpartner", 1); + $modules[] = new D2UModule("70-3", + "D2U Immo Addon - Ausgabe Kategorie", + 1); return $modules; } } \ No newline at end of file diff --git a/lib/property.php b/lib/property.php index 2cd617d..2d717dd 100644 --- a/lib/property.php +++ b/lib/property.php @@ -596,7 +596,7 @@ public function changeWindowAdvertisingStatus() { * @return string OpenImm Object ID */ private function createOpenImmoObjectID() { - return "OD2U". date('YmdHis', time()) ."000". rand(1000000000, 9999999999); + return "OD2U". date('YmdHis', time()) ."000". rand(10000, 99999). rand(10000, 99999); } /** diff --git a/modules/70/1/output.php b/modules/70/1/output.php index db15568..f422a9f 100644 --- a/modules/70/1/output.php +++ b/modules/70/1/output.php @@ -55,7 +55,7 @@ function printPropertylist($properties) { if($property->object_reserved) { print '
'; } - print 'pictures[0] .'" alt='. $property->name .' class="listpic">'; if($property->object_reserved) { print ''. $tag_open .'d2u_immo_object_reserved'. $tag_close .''; @@ -153,22 +153,25 @@ function printImages($pics) { } $property = new Property($property_id, rex_clang::getCurrentId()); - print '
'; - print ''; - print '
'; + if($print == "") { + print '
'; + print ''; + print '
'; - print '
'; - print '

'. $property->contact->firstname .' '. $property->contact->lastname .'
'; - print $tag_open .'d2u_immo_form_phone'. $tag_close .': '. $property->contact->phone .'
'; - print $tag_open .'d2u_immo_form_email'. $tag_close .': '. $property->contact->email .'

'; - print '

'; + print '
'; + print '

'. $property->contact->firstname .' '. $property->contact->lastname .'
'; + print $tag_open .'d2u_immo_form_phone'. $tag_close .': '. $property->contact->phone .'
'; + print $tag_open .'d2u_immo_form_email'. $tag_close .': '. $property->contact->email .'

'; + print '

'; + } // Tabs if($print == "") { @@ -211,13 +214,13 @@ function printImages($pics) { if($property->object_reserved || $property->object_sold) { print '
'; } - print 'pictures[0] .'" alt="'. $property->name .'" class="overviewpic">'; if($property->object_reserved) { - print ''. $tag_open .'d2u_immo_object_reserved'. $tag_close .''; + print ''. $tag_open .'d2u_immo_object_reserved'. $tag_close .''; } else if($property->object_sold) { - print ''. $tag_open .'d2u_immo_object_sold'. $tag_close .''; + print ''. $tag_open .'d2u_immo_object_sold'. $tag_close .''; } if($property->object_reserved || $property->object_sold) { print '
'; //
@@ -417,7 +420,8 @@ function printImages($pics) { print '
 
'; } - if(strtoupper($property->object_type) == "HAUS" || strtoupper($property->object_type) == "WOHNUNG" || strtoupper($property->object_type) == "BUERO_PRAXEN") { + if((strtoupper($property->object_type) == "HAUS" || strtoupper($property->object_type) == "WOHNUNG" || strtoupper($property->object_type) == "BUERO_PRAXEN") + && (count($property->bath) > 0 || count($property->kitchen) > 0 || count($property->floor_type) > 0 || count($property->elevator) > 0 || $property->cable_sat_tv || count($property->broadband_internet) > 0)) { if($print != "") { // Remove when https://github.com/twbs/bootstrap/issues/22753 is solved print '
'; } @@ -558,7 +562,7 @@ function printImages($pics) { if($print != "full") { print '
'; // START tab picures } - print '
'; // START pictures + print '
'; // START pictures print ''; @@ -569,7 +573,7 @@ function printImages($pics) { print '
'; // END pictures if(count($property->ground_plans) > 0) { - print '
'; + print '
'; print ''; @@ -579,7 +583,7 @@ function printImages($pics) { } if (count($property->location_plans) > 0) { - print '
'; + print '
'; print ''; diff --git a/modules/70/1/styles.css b/modules/70/1/styles.css deleted file mode 100644 index e69de29..0000000 diff --git a/modules/70/3/input.php b/modules/70/3/input.php new file mode 100644 index 0000000..60f6a24 --- /dev/null +++ b/modules/70/3/input.php @@ -0,0 +1,40 @@ +
+
+
+ setQuery($query); + $num_rows = $result->getRows(); + + $categories = []; + for($i = 0; $i < $num_rows; $i++) { + $categories[$result->getValue("category_id")] = $result->getValue("name"); + $result->next(); + } + print '

Welche Kategorie soll angezeigt werden?

'; + $select_category = new rex_select(); + $select_category->setName('REX_INPUT_VALUE[1]'); + $select_category->setSize(1); + $select_category->setAttribute('class', 'form-control'); + $select_category->addOption("Alle", 0); + + // Daten + foreach($categories as $category_id => $name) { + $select_category->addOption($name, $category_id); + } + + // Vorselektierung + $select_category->setSelected("REX_VALUE[1]"); + + echo $select_category->show(); + ?> +
+ Alle weiteren Einstellungen können im + D2U Immo Addon vorgenommen werden. +
+
\ No newline at end of file diff --git a/modules/70/3/output.php b/modules/70/3/output.php new file mode 100644 index 0000000..ba4b5f1 --- /dev/null +++ b/modules/70/3/output.php @@ -0,0 +1,156 @@ +getConfig('wildcard_open_tag'); + $tag_close = $sprog->getConfig('wildcard_close_tag'); + foreach($properties as $property) { + print ''; + } + } +} + + +// Get placeholder wildcard tags and other presets +$print = filter_input(INPUT_GET, 'print', FILTER_SANITIZE_SPECIAL_CHARS); +$sprog = rex_addon::get("sprog"); +$tag_open = $sprog->getConfig('wildcard_open_tag'); +$tag_close = $sprog->getConfig('wildcard_close_tag'); +$d2u_immo = rex_addon::get("d2u_immo"); +$urlParamKey = ""; +if(rex_addon::get("url")->isAvailable()) { + $url_data = UrlGenerator::getData(); + $urlParamKey = isset($url_data->urlParamKey) ? $url_data->urlParamKey : ""; +} + +// Output property list +$category_id = "REX_VALUE[1]"; +$properties_leasehold = []; +$properties_leasing = []; +$properties_rent = []; +$properties_sale = []; +if($category_id > 0) { + $category = new Category($category_id, TRUE); + $properties_leasehold = $category->getProperties("ERBPACHT", TRUE); + $properties_leasing = $category->getProperties("LEASING", TRUE); + $properties_rent = $category->getProperties("MIETE_PACHT", TRUE); + $properties_sale = $category->getProperties("KAUF", TRUE); +} +else { + $properties_leasehold = Property::getAll(Rex_clang::getCurrentId(), "ERBPACHT", TRUE); + $properties_leasing = Property::getAll(Rex_clang::getCurrentId(), "LEASING", TRUE); + $properties_rent = Property::getAll(Rex_clang::getCurrentId(), "MIETE_PACHT", TRUE); + $properties_sale = Property::getAll(Rex_clang::getCurrentId(), "KAUF", TRUE); +} + +// Tabs +print '
'; +print ''; +print '
'; + +print '
'; +print '
'; +$tab_active = TRUE; +if(count($properties_sale) > 0) { + print '
'; + printPropertylist($properties_sale); + print '
'; + $tab_active = FALSE; +} +if(count($properties_rent) > 0) { + print '
'; + printPropertylist($properties_rent); + print '
'; + $tab_active = FALSE; +} +if(count($properties_leasing) > 0) { + print '
'; + printPropertylist($properties_leasing); + print '
'; + $tab_active = FALSE; +} +if(count($properties_leasehold) > 0) { + print '
'; + printPropertylist($properties_leasehold); + print '
'; + $tab_active = FALSE; +} +print '
'; +print '
'; +?> + \ No newline at end of file diff --git a/pages/property.online.php b/pages/property.online.php index bbbb27b..7994c8c 100644 --- a/pages/property.online.php +++ b/pages/property.online.php @@ -8,7 +8,7 @@ .'ON properties.property_id = lang.property_id AND lang.clang_id = '. rex_config::get("d2u_immo", "default_lang") .' ' .'LEFT JOIN '. rex::getTablePrefix() .'d2u_immo_categories_lang AS categories ' .'ON properties.category_id = categories.category_id AND categories.clang_id = '. rex_config::get("d2u_immo", "default_lang") .' ' - .'WHERE online_status = "online" '; + .'WHERE online_status = "online" OR online_status = "offline"'; if($this->getConfig('default_property_sort') == 'priority') { $query .= 'ORDER BY online_status DESC, priority ASC'; } diff --git a/plugins/export/install.php b/plugins/export/install.php index 07c05e7..788c912 100644 --- a/plugins/export/install.php +++ b/plugins/export/install.php @@ -10,7 +10,7 @@ company_name varchar(100) collate utf8_general_ci default NULL, company_email varchar(255) collate utf8_general_ci default NULL, customer_number varchar(50) collate utf8_general_ci default NULL, - media_manager_type varchar(255) collate utf8_general_ci default 'd2u_immo_overview', + media_manager_type varchar(255) collate utf8_general_ci default 'd2u_helper_sm', ftp_server varchar(100) collate utf8_general_ci default NULL, ftp_username varchar(50) collate utf8_general_ci default NULL, ftp_password varchar(20) collate utf8_general_ci default NULL, diff --git a/plugins/export/lib/exported_property.php b/plugins/export/lib/exported_property.php index 7ae9f98..91ca271 100644 --- a/plugins/export/lib/exported_property.php +++ b/plugins/export/lib/exported_property.php @@ -204,7 +204,6 @@ public function save() { ."export_action = '". $this->export_action ."', " ."provider_import_id = '". $this->provider_import_id ."', " ."export_timestamp = '". $this->export_timestamp ."'"; - $result = rex_sql::factory(); $result->setQuery($query); diff --git a/plugins/export/lib/openimmo.php b/plugins/export/lib/openimmo.php index 401729c..b012ed6 100644 --- a/plugins/export/lib/openimmo.php +++ b/plugins/export/lib/openimmo.php @@ -33,7 +33,7 @@ public function export() { if($error != "") { return $error; } - + // Create ZIP $this->zip($this->xml_filename); diff --git a/plugins/export/lib/provider.php b/plugins/export/lib/provider.php index a414f4d..c63b075 100644 --- a/plugins/export/lib/provider.php +++ b/plugins/export/lib/provider.php @@ -256,15 +256,16 @@ public function delete() { * Exports objects for the provider. */ public function export() { - if($this->type == "openimmo") { + if(strtolower($this->type) == "openimmo") { $openimmo = new OpenImmo($this); + return $openimmo->export(); } - else if($this->type == "immobilienscout24") { + else if(strtolower($this->type) == "immobilienscout24") { $immobilienscout24 = new ImmobilienScout24($this); return $immobilienscout24->export(); } - else if($this->type == "facebook") { + else if(strtolower($this->type) == "facebook") { // Check requirements if (!function_exists('curl_init')) { return rex_i18n::msg('d2u_immo_export_failure_curl'); @@ -290,10 +291,10 @@ public function export() { exit; } } - else if($this->type == "twitter") { + else if(strtolower($this->type) == "twitter") { return "Schnittstelle ist nicht programmiert."; } - else if($this->type == "linkedin") { + else if(strtolower($this->type) == "linkedin") { // Check requirements if (!function_exists('curl_init')) { return rex_i18n::msg('d2u_immo_export_failure_curl');