<?php

if (!defined('_VALID_MOS') && !defined('_JEXEC')) die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');

/**
 *
 * @package RealEstateManager
 * @copyright 2012-2017 by Ordasoft
 * @author Andrey Kvasnevskiy - OrdaSoft (akbet@mail.ru); Rob de Cleen (rob@decleen.com);
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * Homepage: https://ordasoft.com/
 *
**/

class mosRealEstateManagerOthers {

    /**
     * Sets the parametes for connecting to a webservice via a
     * @param the array of parameters
     * @deprecated $Revision: 1.0 $ - December 2007
     */
    static function setParams() {
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190118:
        // global $realestatemanager_configuration;
        global $realestatemanager_configuration, $database;
        // Prepare settings
        // Using single quotes is easier because you don't have to escape them. For every setting, add a line.
        $settings = "<?php\n";
        $settings .= "if (!defined('_VALID_MOS') && !defined('_JEXEC')) die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');\n";
        $settings .= "/**\n";
        $settings .= " *\n";
        $settings .= " * @package RealEstateManager\n";
        $settings .= " * @copyright 2012-2017 by Ordasoft\n";
        $settings .= " * @author Andrey Kvasnevskiy - OrdaSoft (akbet@mail.ru); Rob de Cleen (rob@decleen.com);\n";
        $settings .= " * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL\n";
        $settings .= " * Homepage: https://ordasoft.com/\n";
        $settings .= " *\n";
        $settings .= "**/\n";
        $settings .= "\n";
        $settings .= "// Do not edit this file. Generated by admin script.\n";
        $settings .= "// RealEstateManager Configuration file\n";
        $settings .= "// General Informations \n";
        $settings .= "\$realestatemanager_configuration['release']['version']='" . $realestatemanager_configuration['release']['version'] . "';\n";
        $settings .= "\$realestatemanager_configuration['release']['date']='" . $realestatemanager_configuration['release']['date'] . "';\n";
        $settings .= "// edit house \n";
        $settings .= "\$realestatemanager_configuration['edithouse']['default']['lang']='" . $realestatemanager_configuration['edithouse']['default']['lang'] . "';\n";
        $settings .= "// price settings\n";
        $settings .= "\$realestatemanager_configuration['price']['string']='" . $realestatemanager_configuration['price']['string'] . "';\n";
        $settings .= "\$realestatemanager_configuration['price']['show']='" . $realestatemanager_configuration['price']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['price']['registrationlevel']='" . $realestatemanager_configuration['price']['registrationlevel'] . "';\n";
        $settings .= "// auto increment for houseid, if 1 - can't add random houseid \n";
        $settings .= "\$realestatemanager_configuration['houseid']['auto-increment']['boolean']='" . $realestatemanager_configuration['houseid']['auto-increment']['boolean'] . "';\n";
        $settings .= "// review settings\n";
        $settings .= "\$realestatemanager_configuration['reviews']['show']='" . $realestatemanager_configuration['reviews']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['reviews']['registrationlevel']='" . $realestatemanager_configuration['reviews']['registrationlevel'] . "';\n";
        $settings .= "// show contacts\n";
        $settings .= "\$realestatemanager_configuration['contacts']['show']='" .
                $realestatemanager_configuration['contacts']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['contacts']['registrationlevel']='" .
                $realestatemanager_configuration['contacts']['registrationlevel'] . "';\n";

// --------------------------community builder section------------------------
        $settings .= "// show cb_myhouse\n";
        $settings .= "\$realestatemanager_configuration['cb_myhouse']['show']='" . $realestatemanager_configuration['cb_myhouse']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['cb_myhouse']['registrationlevel']='" . $realestatemanager_configuration['cb_myhouse']['registrationlevel'] . "';\n";
        $settings .= "// show cb_edit\n";
        $settings .= "\$realestatemanager_configuration['cb_edit']['show']='" . $realestatemanager_configuration['cb_edit']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['cb_edit']['registrationlevel']='" . $realestatemanager_configuration['cb_edit']['registrationlevel'] . "';\n";
        $settings .= "// show cb_rent\n";
        $settings .= "\$realestatemanager_configuration['cb_rent']['show']='" . $realestatemanager_configuration['cb_rent']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['cb_rent']['registrationlevel']='" . $realestatemanager_configuration['cb_rent']['registrationlevel'] . "';\n";
        $settings .= "// show cb_buy\n";
        $settings .= "\$realestatemanager_configuration['cb_buy']['show']='" . $realestatemanager_configuration['cb_buy']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['cb_buy']['registrationlevel']='" . $realestatemanager_configuration['cb_buy']['registrationlevel'] . "';\n";
        $settings .= "// show cb_history\n";
        $settings .= "\$realestatemanager_configuration['cb_history']['show']='" . $realestatemanager_configuration['cb_history']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['cb_history']['registrationlevel']='" . $realestatemanager_configuration['cb_history']['registrationlevel'] . "';\n";
// --------------------------end community builder section---------------------

        $settings .= "// show Location\n";
        $settings .= "\$realestatemanager_configuration['location_tab']['show']='" . $realestatemanager_configuration['location_tab']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration ['location_tab']['registrationlevel']='" . $realestatemanager_configuration ['location_tab']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['street_view']['show']='" . $realestatemanager_configuration['street_view']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration ['street_view']['registrationlevel']='" . $realestatemanager_configuration ['street_view']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['reviews_tab']['show']='" . $realestatemanager_configuration['reviews_tab']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['reviews_tab']['registrationlevel']='" . $realestatemanager_configuration['reviews_tab']['registrationlevel'] . "';\n";
        $settings .= "// rent settings\n";
        $settings .= "\$realestatemanager_configuration['rentstatus']['show']='" . $realestatemanager_configuration['rentstatus']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rentrequest']['registrationlevel']='" . $realestatemanager_configuration['rentrequest']['registrationlevel'] . "';\n";
        $settings .= "// status settings\n";
        $settings .= "\$realestatemanager_configuration['housestatus']['show']='" . $realestatemanager_configuration['housestatus']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['houserequest']['registrationlevel']='" . $realestatemanager_configuration['houserequest']['registrationlevel'] . "';\n";
        $settings .= "// buy settings\n";
        $settings .= "\$realestatemanager_configuration['buystatus']['show']='" . $realestatemanager_configuration['buystatus']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['buyrequest']['registrationlevel']='" . $realestatemanager_configuration['buyrequest']['registrationlevel'] . "';\n";
        $settings .= "// edoc settings\n";
        $settings .= "\$realestatemanager_configuration['edocs']['allow']='" . $realestatemanager_configuration['edocs']['allow'] . "';\n";
        $settings .= "\$realestatemanager_configuration['edocs']['show']='" . $realestatemanager_configuration['edocs']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['edocs']['registrationlevel']='" . $realestatemanager_configuration['edocs']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['edocs']['location']='" . $realestatemanager_configuration['edocs']['location'] . "';\n";
        $settings .= "// video and track\n";
        $settings.= "\$realestatemanager_configuration['videos_tracks']['show']='"
            . $realestatemanager_configuration['videos_tracks']['show'] . "';\n";
        $settings.= "\$realestatemanager_configuration['allowed_exts_video']='" .
            $realestatemanager_configuration['allowed_exts_video'] . "';\n";
        $settings.= "\$realestatemanager_configuration['allowed_exts_track']='" .
            $realestatemanager_configuration['allowed_exts_track'] . "';\n";
        $settings.= "\$realestatemanager_configuration['videos']['location']='" .
          $realestatemanager_configuration['videos']['location'] . "';\n";
        $settings.= "\$realestatemanager_configuration['tracks']['location']='" .
          $realestatemanager_configuration['tracks']['location'] . "';\n";
        $settings .= "// debuging\n";
        $settings .= "\$realestatemanager_configuration['debug']='" . $realestatemanager_configuration['debug'] . "';\n";
        $settings .= "\$realestatemanager_configuration['page']['items']='" . $realestatemanager_configuration['page']['items'] . "';\n";
        $settings .= "// foto size\n";
        $settings .= "\$realestatemanager_configuration['thumb_param']['show']= '" . $realestatemanager_configuration['thumb_param']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['foto']['high']= '" . $realestatemanager_configuration['foto']['high'] . "';\n";
        $settings .= "\$realestatemanager_configuration['foto']['width']= '" . $realestatemanager_configuration['foto']['width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotomain']['high']= '" . $realestatemanager_configuration['fotomain']['high'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotomain']['width']= '" . $realestatemanager_configuration['fotomain']['width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotoupload']['high']= '" . $realestatemanager_configuration['fotoupload']['high'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotoupload']['width']= '" . $realestatemanager_configuration['fotoupload']['width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotogallery']['high']= '" . $realestatemanager_configuration['fotogallery']['high'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotogallery']['width']= '" . $realestatemanager_configuration['fotogallery']['width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotocategory']['high']= '" . $realestatemanager_configuration['fotocategory']['high'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotocategory']['width']= '" . $realestatemanager_configuration['fotocategory']['width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotogal']['high']= '" . $realestatemanager_configuration['fotogallery']['high'] . "';\n";
        $settings .= "\$realestatemanager_configuration['fotogal']['width']= '" . $realestatemanager_configuration['fotogallery']['width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['license']['show']='" . $realestatemanager_configuration['license']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['license']['text']= '" . $realestatemanager_configuration['license']['text'] . "';\n";
        //user manager
        $settings .= "//user manager\n";
        $keys = array_keys( $realestatemanager_configuration['user_manager_rem'] );
        // iterate through styles
        foreach( $keys as $key ){
            $settings .= "\$realestatemanager_configuration['user_manager_rem']['$key']['count_homes']='" . $realestatemanager_configuration
            ['user_manager_rem'][$key]['count_homes'] ."';\n";
            $settings .= "\$realestatemanager_configuration['user_manager_rem']['$key']['count_foto']='" . $realestatemanager_configuration
            ['user_manager_rem'][$key]['count_foto'] ."';\n";
        }
        //PayPal
        $settings.= "\$realestatemanager_configuration['cancel_url']='".$realestatemanager_configuration['cancel_url']."';\n";
        $settings.= "\$realestatemanager_configuration['success_url']='".$realestatemanager_configuration['success_url']."';\n";
         $settings .= "\$realestatemanager_configuration['paypal_real_or_test']['show']='" . $realestatemanager_configuration['paypal_real_or_test']['show'] . "';\n";

        $settings .= "// paypal buy settings\n";
        $settings .= "\$realestatemanager_configuration['special_price']['show']='" . $realestatemanager_configuration['special_price']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['paypal_buy_status']['show']='" .                $realestatemanager_configuration['paypal_buy_status']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['paypal_buy']['registrationlevel']='" .                $realestatemanager_configuration['paypal_buy']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['paypal_buy_status_sale']['show']='" .                $realestatemanager_configuration['paypal_buy_status_sale']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['paypal_buy_sale']['registrationlevel']='" .                $realestatemanager_configuration['paypal_buy_sale']['registrationlevel'] . "';\n";

	//2checkout
$settings .= "// 2checkout buy settings\n";
		$settings .= "\$realestatemanager_configuration['2checkout_buy_status']['show']='" . $realestatemanager_configuration['2checkout_buy_status']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['2checkout_buy']['registrationlevel']='" . $realestatemanager_configuration['2checkout_buy']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['2checkout_buy_status_sale']['show']='" . $realestatemanager_configuration['2checkout_buy_status_sale']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['2checkout_buy_sale']['registrationlevel']='" . $realestatemanager_configuration['2checkout_buy_sale']['registrationlevel'] . "';\n";
//************   begin add for Manager Add: button 'Add a house'   ************
        $settings .= "// button '[ Add a house ]'\n";
        $settings .= "\$realestatemanager_configuration['add_house']['show']='" . $realestatemanager_configuration['add_house']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['add_house']['registrationlevel']='" . $realestatemanager_configuration['add_house']['registrationlevel'] . "';\n";
//*****   end add for Manager  Add: button ' Add a house'  ***********
//*******   begin add for  Manager print_pdf: button 'print PDF'    ******************************
        $settings .= "// button '[ print PDF ]'\n";
        $settings .= "\$realestatemanager_configuration['print_pdf']['show']='" . $realestatemanager_configuration['print_pdf']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['print_pdf']['registrationlevel']='" . $realestatemanager_configuration['print_pdf']['registrationlevel'] . "';\n";
//*****    end add for  Manager print_pdf: button 'print PDF'    ***********
//********   begin add for  Manager print_view: button 'print View'    ******************************
        $settings .= "// button '[ print View ]'\n";
        $settings .= "\$realestatemanager_configuration['print_view']['show']='" . $realestatemanager_configuration['print_view']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['print_view']['registrationlevel']='" . $realestatemanager_configuration['print_view']['registrationlevel'] . "';\n";
//*****    end add for  Manager print_view: button 'print View'    ***********
//****   begin add for  Manager mail_to: button 'mail_to'    ******************************
        $settings .= "// button '[ mail_to ]'\n";
        $settings .= "\$realestatemanager_configuration['mail_to']['show']='" . $realestatemanager_configuration['mail_to']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['mail_to']['registrationlevel']='" . $realestatemanager_configuration['mail_to']['registrationlevel'] . "';\n";
//*****    end add for  Manager mail_to: button 'mail_to'    ***********
//*************************   begin add send mail for admin  ************
        $settings .= "// send email for admin\n";
        $settings .= "\$realestatemanager_configuration['add_email']['address']='" . $realestatemanager_configuration['add_email']['address'] . "';\n";
        $settings .= "\$realestatemanager_configuration['add_email']['show']='" . $realestatemanager_configuration['add_email']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['add_email']['registrationlevel']='" . $realestatemanager_configuration['add_email']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['review_email']['address']='" . $realestatemanager_configuration['review_email']['address'] . "';\n";
        $settings .= "\$realestatemanager_configuration['review_added_email']['show']='" . $realestatemanager_configuration['review_added_email']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['review_added_email']['registrationlevel']='" . $realestatemanager_configuration['review_added_email']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rentrequest_email']['address']='" . $realestatemanager_configuration['rentrequest_email']['address'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rentrequest_email']['show']='" . $realestatemanager_configuration['rentrequest_email']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rentrequest_email']['registrationlevel']='" . $realestatemanager_configuration['rentrequest_email']['registrationlevel'] . "';\n";
        $settings .= "\$realestatemanager_configuration['buyingrequest_email']['address']='" . $realestatemanager_configuration['buyingrequest_email']['address'] . "';\n";
        $settings .= "\$realestatemanager_configuration['buyingrequest_email']['show']='" . $realestatemanager_configuration['buyingrequest_email']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['buyingrequest_email']['registrationlevel']='" . $realestatemanager_configuration['buyingrequest_email']['registrationlevel'] . "';\n";
//*************************   end add send mail for admin   *************

        $settings .= "\$realestatemanager_configuration['owner']['show']='" . $realestatemanager_configuration['owner']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['owner']['registrationlevel']='" .
                $realestatemanager_configuration['owner']['registrationlevel'] . "';\n";

//********************************** begin show approve_on_add 	****************************
        $settings .= "\$realestatemanager_configuration['approve_on_add']['show']='" . $realestatemanager_configuration['approve_on_add']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['approve_on_add']['registrationlevel']='" . $realestatemanager_configuration['approve_on_add']['registrationlevel'] . "';\n";
//********************* end show approve_on_add 	******************************************
//********************************** begin show publish_on_add 	****************************
        $settings .= "\$realestatemanager_configuration['publish_on_add']['show']='" . $realestatemanager_configuration['publish_on_add']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['publish_on_add']['registrationlevel']='" . $realestatemanager_configuration['publish_on_add']['registrationlevel'] . "';\n";
//********************* end show publish_on_add 	******************************************
//********************************** begin show publish_on_review 	****************************
        $settings .= "\$realestatemanager_configuration['publish_on_review']['show']='" . $realestatemanager_configuration['publish_on_review']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['publish_on_review']['registrationlevel']='" . $realestatemanager_configuration['publish_on_review']['registrationlevel'] . "';\n";
//********************* end show publish_on_review 	******************************************

//********************************** begin Show captcha       ****************************
        $settings .= "\$realestatemanager_configuration['captcha_option']['show']='" . $realestatemanager_configuration['captcha_option']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['captcha_option']['registrationlevel']='" . $realestatemanager_configuration['captcha_option']['registrationlevel'] . "';\n";
//********************* end Show captcha      ******************************************
//********************************** begin show captcha_booking option       ****************************
        $settings .= "\$realestatemanager_configuration['captcha_option_booking']['show']='" . $realestatemanager_configuration['captcha_option_booking']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['captcha_option_booking']['registrationlevel']='" . $realestatemanager_configuration['captcha_option_booking']['registrationlevel'] . "';\n";
//********************* end show captcha_booking option      ******************************************
//********************************** begin show captcha_sendmessage option       ****************************
        $settings .= "\$realestatemanager_configuration['captcha_option_sendmessage']['show']='" . $realestatemanager_configuration['captcha_option_sendmessage']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['captcha_option_sendmessage']['registrationlevel']='" . $realestatemanager_configuration['captcha_option_sendmessage']['registrationlevel'] . "';\n";
//********************* end show captcha_sendmessage option      ******************************************

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190305, START:
//********************************** begin show captcha_add_house option       ****************************
        $settings .= "\$realestatemanager_configuration['captcha_option_add_house']['show']='" . $realestatemanager_configuration['captcha_option_add_house']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['captcha_option_add_house']['registrationlevel']='" . $realestatemanager_configuration['captcha_option_add_house']['registrationlevel'] . "';\n";
//********************* end show captcha_add_house option      ******************************************
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190305, END.

//****************** begin show map for search result       *************
        $settings .= "\$realestatemanager_configuration['searchlayout_map']['show']='" . $realestatemanager_configuration['searchlayout_map']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['searchlayout_map']['registrationlevel']='" . $realestatemanager_configuration['searchlayout_map']['registrationlevel'] . "';\n";
//*************** end show map for search rusalt      *******************
//************** begin show order by form for search result  ************
        $settings .= "\$realestatemanager_configuration['searchlayout_orderby']['show']='" . $realestatemanager_configuration['searchlayout_orderby']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['searchlayout_orderby']['registrationlevel']='" . $realestatemanager_configuration['searchlayout_orderby']['registrationlevel'] . "';\n";
//*********** end show order by form for search result ******************
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190802, START:
// The code below no needed, the death code. He was left to avoid conflicts on upgrade.
//************** begin show search form for search result  ************
        $settings .= "\$realestatemanager_configuration['searchlayout_form']['show']='" . $realestatemanager_configuration['searchlayout_form']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['searchlayout_form']['registrationlevel']='" . $realestatemanager_configuration['searchlayout_form']['registrationlevel'] . "';\n";
//*********** end show search form for search result ******************
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190802, END.
//************** begin option access to edit house  ************
        $settings .= "\$realestatemanager_configuration['option_edit']['show']='" . $realestatemanager_configuration['option_edit']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['option_edit']['registrationlevel']='" . $realestatemanager_configuration['option_edit']['registrationlevel'] . "';\n";
//*********** end option access to edit house ******************
//********************************** begin show search all houses       ****************************
        $settings .= "\$realestatemanager_configuration['search_option']['show']='" . $realestatemanager_configuration['search_option']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['search_option']['registrationlevel']='" . $realestatemanager_configuration['search_option']['registrationlevel'] . "';\n";
//********************* end show search all houses    ******************************************

 //add for show in category picture
        $settings .= "// show in category picture\n";
        $settings .= "\$realestatemanager_configuration['cat_pic']['show']='" . $realestatemanager_configuration['cat_pic']['show'] . "';\n";

        //add for show subcategory
        $settings .= "// show subcategory\n";
        $settings .= "\$realestatemanager_configuration['subcategory']['show']='" . $realestatemanager_configuration['subcategory']['show'] . "';\n";


        //view type house
       // $settings .= "//view type\n";
       // $settings .= "\$realestatemanager_configuration['view_type']='" . $realestatemanager_configuration['view_type'] . "';\n";

        //view type houses
     //   $settings .= "//all_categories\n";
     //   $settings .= "\$realestatemanager_configuration['all_categories']='" . $realestatemanager_configuration['all_categories'] . "';\n";

        $settings .= "//view_house\n";
        $settings .= "\$realestatemanager_configuration['view_house']='" . $realestatemanager_configuration['view_house'] . "';\n";

        //show location map
        $settings .= "//show location map\n";
        $settings .= "\$realestatemanager_configuration['location_map']='" . $realestatemanager_configuration['location_map'] . "';\n";

        $settings .= "//cat_orderind_default\n";
        $settings .= "\$realestatemanager_configuration['cat_orderind_default']='" . $realestatemanager_configuration['cat_orderind_default'] . "';\n";
        //show search house
      //  $settings .= "//show_search_house\n";
      //  $settings .= "\$realestatemanager_configuration['show_search_house']='" . $realestatemanager_configuration['show_search_house'] . "';\n";

        // *****  RSS *********
        $settings .= "\$realestatemanager_configuration['rss']['show']='" . $realestatemanager_configuration['rss']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rss']['registrationlevel']='" . $realestatemanager_configuration['rss']['registrationlevel'] . "';\n";
        // *****  end RSS *********
        // *****  wishlist *********
        $settings .= "\$realestatemanager_configuration['wishlist']['show']='" . $realestatemanager_configuration['wishlist']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['wishlist']['registrationlevel']='" . $realestatemanager_configuration['wishlist']['registrationlevel'] . "';\n";
        // *****  end wishlist *********

        $settings .= "\$realestatemanager_configuration['owner']['show']='" .
         $realestatemanager_configuration['owner']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['owner']['registrationlevel']='" .
                $realestatemanager_configuration['owner']['registrationlevel'] . "';\n";
        // *****  Owners list *********
        $settings .= "\$realestatemanager_configuration['ownerslist']['show']='" .
         $realestatemanager_configuration['ownerslist']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['ownerslist']['registrationlevel']='" .
         $realestatemanager_configuration['ownerslist']['registrationlevel'] . "';\n";
        // *****  END Owners list *********
        $settings .= "\$realestatemanager_configuration['calendar']['show']='" . $realestatemanager_configuration['calendar']['show'] . "';\n";
        // *****  Calendar list *********
        $settings .= "\$realestatemanager_configuration['calendarlist']['show']='" . $realestatemanager_configuration['calendarlist']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['calendarlist']['registrationlevel']='" . $realestatemanager_configuration['calendarlist']['registrationlevel'] . "';\n";
        // *****  END Calendar list *********

        $settings .= "\$realestatemanager_configuration['rent_answer']='" .
         $realestatemanager_configuration['rent_answer'] . "';\n";

        //******* Rent Request form******
        $settings .= "\$realestatemanager_configuration['rent_form']='" .
         $realestatemanager_configuration['rent_form'] . "';\n";
        //******* Buy Request form******
        $settings .= "\$realestatemanager_configuration['buy_answer']='" .
         $realestatemanager_configuration['buy_answer'] . "';\n";
        $settings .= "\$realestatemanager_configuration['buy_form']='" .
         $realestatemanager_configuration['buy_form'] . "';\n";
        $settings .= "//end rent notify\n";
        $settings .= "\$realestatemanager_configuration['rent_before_end_notify']='" .
         $realestatemanager_configuration['rent_before_end_notify'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rent_before_end_notify_days']='" .
         $realestatemanager_configuration['rent_before_end_notify_days'] . "';\n";
        $settings .= "\$realestatemanager_configuration['rent_before_end_notify_email']='" .
         $realestatemanager_configuration['rent_before_end_notify_email'] . "';\n";
        $settings .= "\$realestatemanager_configuration['calendar']['placeholder']='" .
         $realestatemanager_configuration['calendar']['placeholder'] . "';\n";
         //manager_feature_category
        $settings .= "//manager_feature_category\n";
        $settings .= "\$realestatemanager_configuration['manager_feature_category']='" . $realestatemanager_configuration['manager_feature_category'] . "';\n";
        //sale_separator
        $settings .= "//sale_separator\n";
        $settings .= "\$realestatemanager_configuration['sale_separator']='" . $realestatemanager_configuration['sale_separator'] . "';\n";
        //show extra
        $settings .= "//extra1\n";
        $settings .= "\$realestatemanager_configuration['extra1']='" . $realestatemanager_configuration['extra1'] . "';\n";
        $settings .= "//extra2\n";
        $settings .= "\$realestatemanager_configuration['extra2']='" . $realestatemanager_configuration['extra2'] . "';\n";
        $settings .= "//extra3\n";
        $settings .= "\$realestatemanager_configuration['extra3']='" . $realestatemanager_configuration['extra3'] . "';\n";
        $settings .= "//extra4\n";
        $settings .= "\$realestatemanager_configuration['extra4']='" . $realestatemanager_configuration['extra4'] . "';\n";
        $settings .= "//extra5\n";
        $settings .= "\$realestatemanager_configuration['extra5']='" . $realestatemanager_configuration['extra5'] . "';\n";
        $settings .= "//extra6\n";
        $settings .= "\$realestatemanager_configuration['extra6']='" . $realestatemanager_configuration['extra6'] . "';\n";
        $settings .= "//extra7\n";
        $settings .= "\$realestatemanager_configuration['extra7']='" . $realestatemanager_configuration['extra7'] . "';\n";
        $settings .= "//extra8\n";
        $settings .= "\$realestatemanager_configuration['extra8']='" . $realestatemanager_configuration['extra8'] . "';\n";
        $settings .= "//extra9\n";
        $settings .= "\$realestatemanager_configuration['extra9']='" . $realestatemanager_configuration['extra9'] . "';\n";
        $settings .= "//extra10\n";
        $settings .= "\$realestatemanager_configuration['extra10']='" . $realestatemanager_configuration['extra10'] . "';\n";

        $settings .= "\$realestatemanager_configuration['featuredmanager']['placeholder']='" .
         $realestatemanager_configuration['featuredmanager']['placeholder'] . "';\n";
        $settings .= "\$realestatemanager_configuration['currency']='" .
         $realestatemanager_configuration['currency'] . "';\n";
        $settings .= "\$realestatemanager_configuration['allowed_exts']='" .
         $realestatemanager_configuration['allowed_exts'] . "';\n";
        $settings .= "\$realestatemanager_configuration['allowed_exts_img']='" .
         $realestatemanager_configuration['allowed_exts_img'] . "';\n";

        $settings .= "\$realestatemanager_configuration['price_format']='" .
         $realestatemanager_configuration['price_format'] . "';\n";
        $settings .= "// 1 - affter 0 - beffore\n";
        $settings .= "\$realestatemanager_configuration['price_unit_show']='" .
         $realestatemanager_configuration['price_unit_show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['date_format']='" .
         $realestatemanager_configuration['date_format'] . "';\n";

        $settings .= "\$realestatemanager_configuration['datetime_format']='" .
         $realestatemanager_configuration['datetime_format'] . "';\n";

        $settings .= "\$realestatemanager_configuration['plugin_name_select']='" .
         $realestatemanager_configuration['plugin_name_select'] . "';\n";

        $settings .= "\$realestatemanager_configuration['toronto_login']='" .
         $realestatemanager_configuration['toronto_login'] . "';\n";
        $settings .= "\$realestatemanager_configuration['toronto_password']='" .
          $realestatemanager_configuration['toronto_password'] . "';\n";

        $settings .= "\$realestatemanager_configuration['google_openmap']['show']='" .
            $realestatemanager_configuration['google_openmap']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['api_key']='" .
         $realestatemanager_configuration['api_key'] . "';\n";
        $settings .= "\$realestatemanager_configuration['update']['map']='" .
          $realestatemanager_configuration['update']['map'] . "';\n";
        $settings .= "\$realestatemanager_configuration['toronto_link_import']='" .
        $realestatemanager_configuration['toronto_link_import'] . "';\n";

        //mresdms
        $settings .= "\$realestatemanager_configuration['mresdms_login']='" .
         $realestatemanager_configuration['mresdms_login'] . "';\n";
        $settings .= "\$realestatemanager_configuration['mresdms_password']='" .
          $realestatemanager_configuration['mresdms_password'] . "';\n";
        $settings .= "\$realestatemanager_configuration['mresdms_link_import']='" .
        $realestatemanager_configuration['mresdms_link_import'] . "';\n";

        //matrix rets
        $settings .= "\$realestatemanager_configuration['matrix_login']='" .
         $realestatemanager_configuration['matrix_login'] . "';\n";
        $settings .= "\$realestatemanager_configuration['matrix_password']='" .
          $realestatemanager_configuration['matrix_password'] . "';\n";
        $settings .= "\$realestatemanager_configuration['matrix_link_import']='" .
        $realestatemanager_configuration['matrix_link_import'] . "';\n";


        //29.06.17
        //***** option for search form on nothing found and result search pages *****
        $settings .= "\$realestatemanager_configuration['search_form_on_nothing_found_page_show']='" .
        $realestatemanager_configuration['search_form_on_nothing_found_page_show'] . "';\n";
        //***** end option for search form on nothing found and result search pages *****
        //***** option for search form on result search pages *****
        $settings .= "\$realestatemanager_configuration['search_form_on_result_search_page_show']='" .
        $realestatemanager_configuration['search_form_on_result_search_page_show'] . "';\n";
        //***** end option for search form on result search pages *****
        //***** options for serch button on frontend *****
        $settings .= "\$realestatemanager_configuration['search_button']['show']='" . $realestatemanager_configuration['search_button']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['search_button']['registrationlevel']='" . $realestatemanager_configuration['search_button']['registrationlevel'] . "';\n";
        //***** end options for serch button on frontend *****
        //***** search keyword options *****
        $settings .= "\$realestatemanager_configuration['search_form_search_keyword_field_show']='" .
        $realestatemanager_configuration['search_form_search_keyword_field_show'] . "';\n";
        //***** end search keyword options *****
        //***** Check In options options *****
        $settings .= "\$realestatemanager_configuration['search_form_check_in_field_show']='" .
        $realestatemanager_configuration['search_form_check_in_field_show'] . "';\n";
        //***** end Check In options options *****
        //***** Check Out options options *****
        $settings .= "\$realestatemanager_configuration['search_form_check_out_field_show']='" .
        $realestatemanager_configuration['search_form_check_out_field_show'] . "';\n";
        //***** end Check Out options options *****

        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190211, START:
        //***** Radiuse range field options *****
        $settings .= "\$realestatemanager_configuration['search_form_radiuse_range_field_show']='" .
        $realestatemanager_configuration['search_form_radiuse_range_field_show'] . "';\n";
        //***** end Radiuse range field options *****
        //***** Radiuse range options *****
        $settings .= "\$realestatemanager_configuration['search_form_radiuse_range']='" .
        $realestatemanager_configuration['search_form_radiuse_range'] . "';\n";
        //***** end Radiuse range options *****
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190211, END.

        //***** Price options options *****
        $settings .= "\$realestatemanager_configuration['search_form_price_field_show']='" .
        $realestatemanager_configuration['search_form_price_field_show'] . "';\n";
        //***** end price options options *****
        //***** lot size options options *****
        $settings .= "\$realestatemanager_configuration['search_lot_size_field_show']='" .
        $realestatemanager_configuration['search_lot_size_field_show'] . "';\n";
        //***** end lot size options options *****
        //***** house size options options *****
        $settings .= "\$realestatemanager_configuration['search_house_size_field_show']='" .
        $realestatemanager_configuration['search_house_size_field_show'] . "';\n";
        //***** end house size options options *****
        //***** Category options *****
        $settings .= "\$realestatemanager_configuration['search_form_category_field_show']='" .
        $realestatemanager_configuration['search_form_category_field_show'] . "';\n";
        //***** end Category options *****
        //***** Listing type options *****
        $settings .= "\$realestatemanager_configuration['search_form_listing_type_field_show']='" .
        $realestatemanager_configuration['search_form_listing_type_field_show'] . "';\n";
        //***** end Listing type options *****
        //***** Listing status options *****
        $settings .= "\$realestatemanager_configuration['search_form_listing_status_field_show']='" .
        $realestatemanager_configuration['search_form_listing_status_field_show'] . "';\n";
        //***** end Listing status options *****
        //***** Property type options *****
        $settings .= "\$realestatemanager_configuration['search_form_property_type_field_show']='" .
        $realestatemanager_configuration['search_form_property_type_field_show'] . "';\n";
        //***** end Property type options *****
        //***** Property ID options *****
        $settings .= "\$realestatemanager_configuration['search_form_propertyid_field_show']='" .
        $realestatemanager_configuration['search_form_propertyid_field_show'] . "';\n";
        //***** end Property ID options *****
        //***** Description options *****
        $settings .= "\$realestatemanager_configuration['search_form_comment_field_show']='" .
        $realestatemanager_configuration['search_form_comment_field_show'] . "';\n";
        //***** end Description options *****
        //***** Title options *****
        $settings .= "\$realestatemanager_configuration['search_form_title_field_show']='" .
        $realestatemanager_configuration['search_form_title_field_show'] . "';\n";
        //***** end Title options *****
        //***** Country options *****
        $settings .= "\$realestatemanager_configuration['search_form_country_field_show']='" .
        $realestatemanager_configuration['search_form_country_field_show'] . "';\n";
        //***** end Country options *****
        //***** House size options *****
        $settings .= "\$realestatemanager_configuration['search_form_house_size_field_show']='" .
        $realestatemanager_configuration['search_form_house_size_field_show'] . "';\n";
        //***** end House size options *****
        //***** Address options *****
        $settings .= "\$realestatemanager_configuration['search_form_address_field_show']='" .
        $realestatemanager_configuration['search_form_address_field_show'] . "';\n";
        //***** end Address options *****
        //***** Region options *****
        $settings .= "\$realestatemanager_configuration['search_form_region_field_show']='" .
        $realestatemanager_configuration['search_form_region_field_show'] . "';\n";
        //***** end Region options *****
        //***** City options *****
        $settings .= "\$realestatemanager_configuration['search_form_city_field_show']='" .
        $realestatemanager_configuration['search_form_city_field_show'] . "';\n";
        //***** end City options *****
        //******** add Custom Dropdown Field 6 options **********
        $settings .= "\$realestatemanager_configuration['extra6_advanced']='" .
        $realestatemanager_configuration['extra6_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 6 options **********
        //******** add Custom Dropdown Field 7 options **********
        $settings .= "\$realestatemanager_configuration['extra7_advanced']='" .
        $realestatemanager_configuration['extra7_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 7 options **********
        //******** add Custom Dropdown Field 8 options **********
        $settings .= "\$realestatemanager_configuration['extra8_advanced']='" .
        $realestatemanager_configuration['extra8_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 8 options **********
        //******** add Custom Dropdown Field 9 options **********
        $settings .= "\$realestatemanager_configuration['extra9_advanced']='" .
        $realestatemanager_configuration['extra9_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 9 options **********
        //******** add Custom Dropdown Field 10 options **********
        $settings .= "\$realestatemanager_configuration['extra10_advanced']='" .
        $realestatemanager_configuration['extra10_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 10 options **********
        //***** Zipcode options *****
        $settings .= "\$realestatemanager_configuration['search_form_zipcode_field_show']='" .
        $realestatemanager_configuration['search_form_zipcode_field_show'] . "';\n";
        //***** end Zipcode options *****
        //***** Lot size options *****
        $settings .= "\$realestatemanager_configuration['search_form_lot_size_field_show']='" .
        $realestatemanager_configuration['search_form_lot_size_field_show'] . "';\n";
        //***** end Lot size options *****
        //***** Owner options *****
        $settings .= "\$realestatemanager_configuration['search_form_owner_field_show']='" .
        $realestatemanager_configuration['search_form_owner_field_show'] . "';\n";
        //***** end Owner options *****
        //***** Exactly to all options *****
        $settings .= "\$realestatemanager_configuration['search_form_exactly_to_all_field_show']='" .
        $realestatemanager_configuration['search_form_exactly_to_all_field_show'] . "';\n";
        //***** end Exactly to all options *****
        //***** Garages options *****
        $settings .= "\$realestatemanager_configuration['search_form_garages_field_show']='" .
        $realestatemanager_configuration['search_form_garages_field_show'] . "';\n";
        //***** end Garages options *****
        //***** Built year options *****
        $settings .= "\$realestatemanager_configuration['search_form_build_year_field_show']='" .
        $realestatemanager_configuration['search_form_build_year_field_show'] . "';\n";
        //***** end Built year options *****
        //***** Contacts options *****
        $settings .= "\$realestatemanager_configuration['search_form_contacts_field_show']='" .
        $realestatemanager_configuration['search_form_contacts_field_show'] . "';\n";
        //***** end Contacts options *****
        //***** Agent name options *****
        $settings .= "\$realestatemanager_configuration['search_form_agent_field_show']='" .
        $realestatemanager_configuration['search_form_agent_field_show'] . "';\n";
        //***** end Agent name options *****
        //******** end add Custom Dropdown Field 1 options **********
        $settings .= "\$realestatemanager_configuration['extra1_advanced']='" .
        $realestatemanager_configuration['extra1_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 1 options **********
        //******** end add Custom Dropdown Field 2 options **********
        $settings .= "\$realestatemanager_configuration['extra2_advanced']='" .
        $realestatemanager_configuration['extra2_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 2 options **********
        //******** end add Custom Dropdown Field 3 options **********
        $settings .= "\$realestatemanager_configuration['extra3_advanced']='" .
        $realestatemanager_configuration['extra3_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 3 options **********
        //******** end add Custom Dropdown Field 4 options **********
        $settings .= "\$realestatemanager_configuration['extra4_advanced']='" .
        $realestatemanager_configuration['extra4_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 4 options **********
        //******** end add Custom Dropdown Field 5 options **********
        $settings .= "\$realestatemanager_configuration['extra5_advanced']='" .
        $realestatemanager_configuration['extra5_advanced'] . "';\n";
        //******** end add Custom Dropdown Field 5 options **********

        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190121, START:
        //***** features search options *****
        if ( isset($realestatemanager_configuration['search_form_features']) ) {
            $settings .= "//features search options\n";
            foreach ($realestatemanager_configuration['search_form_features'] as $id => $value) {
                $settings .= "\$realestatemanager_configuration['search_form_features']['$id']='" .
                    $realestatemanager_configuration['search_form_features'][$id] . "';\n";
            }
        }
        //***** end features search options *****
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190121, END.

        //***** search layout by default *****
        $settings .= "\$realestatemanager_configuration['default_search_layout']='" .
        $realestatemanager_configuration['default_search_layout'] . "';\n";
        //***** end search layout by default *****

        //***********begin show google captcha by default
        $settings .= "\$realestatemanager_configuration['google_captcha_by_default_show']='" .
        $realestatemanager_configuration['google_captcha_by_default_show'] . "';\n";
        //***********end begin show google captcha by default

        //***********begin show country, region, city as text field
        $settings .= "\$realestatemanager_configuration['show_country_region_city_as_text_field']='" .
        $realestatemanager_configuration['show_country_region_city_as_text_field'] . "';\n";
        //***********end begin show country, region, city as text field

        //***********begin rent request notification
        $settings .= "\$realestatemanager_configuration['rentrequest_user_email_notification']='" .
        $realestatemanager_configuration['rentrequest_user_email_notification'] . "';\n";
        //***********end begin rent request notification

        //***********begin buying request notification
        $settings .= "\$realestatemanager_configuration['buyingrequest_user_email_notification']='" .
        $realestatemanager_configuration['buyingrequest_user_email_notification'] . "';\n";
        //***********end begin buying request notification

        //***********begin input redirect link rent
        $settings .= "\$realestatemanager_configuration['input_link_rent']='" .
        $realestatemanager_configuration['input_link_rent'] . "';\n";
        //***********end begin input link rent

        //***********begin input redirect link sale
        $settings .= "\$realestatemanager_configuration['input_link_sale']='" .
        $realestatemanager_configuration['input_link_sale'] . "';\n";
        //***********end begin input redirect link sale

        //***********begin input built year
        $settings .= "\$realestatemanager_configuration['mandatory_built_year_field']='" .
        $realestatemanager_configuration['mandatory_built_year_field'] . "';\n";
        //***********end begin input built year

        //***********begin input address
        $settings .= "\$realestatemanager_configuration['mandatory_address_field']='" .
        $realestatemanager_configuration['mandatory_address_field'] . "';\n";
        //***********end begin address

        //***********begin input price
        $settings .= "\$realestatemanager_configuration['mandatory_price_field']='" .
        $realestatemanager_configuration['mandatory_price_field'] . "';\n";
        //***********end begin input price

        //***********begin input photo
        $settings .= "\$realestatemanager_configuration['mandatory_photo_field']='" .
        $realestatemanager_configuration['mandatory_photo_field'] . "';\n";
        //***********end begin input photo

        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190115, START:
        //***********begin input House size, Sqrt
        $settings .= "\$realestatemanager_configuration['mandatory_house_size_field']='" .
        $realestatemanager_configuration['mandatory_house_size_field'] . "';\n";
        //***********end begin input House size, Sqrt

        //***********begin input Rooms
        $settings .= "\$realestatemanager_configuration['mandatory_rooms_field']='" .
        $realestatemanager_configuration['mandatory_rooms_field'] . "';\n";
        //***********end begin input Rooms

        //***********begin input Bedrooms
        $settings .= "\$realestatemanager_configuration['mandatory_bedrooms_field']='" .
        $realestatemanager_configuration['mandatory_bedrooms_field'] . "';\n";
        //***********end begin input Bedrooms
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190115, END.

        //********************************** begin search_all_houses       ****************************
        $settings .= "\$realestatemanager_configuration['search_all_houses']['show']='" . $realestatemanager_configuration['search_all_houses']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['search_all_houses']['registrationlevel']='" . $realestatemanager_configuration['search_all_houses']['registrationlevel'] . "';\n";
        //********************* end show search_all_houses     ******************************************
        //********************************** begin search_alone_category       ****************************
        $settings .= "\$realestatemanager_configuration['search_alone_category']['show']='" . $realestatemanager_configuration['search_alone_category']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['search_alone_category']['registrationlevel']='" . $realestatemanager_configuration['search_alone_category']['registrationlevel'] . "';\n";
        //********************* end show search_alone_category     ******************************************
        //********************* show check in field on frontend     ******************************************
        $settings .= "\$realestatemanager_configuration['search_check_in_show']='" .
        $realestatemanager_configuration['search_check_in_show'] . "';\n";
        //********************* end show check in field on frontend     ******************************************
        //********************* show check out field on frontend     ******************************************
        $settings .= "\$realestatemanager_configuration['search_check_out_show']='" .
        $realestatemanager_configuration['search_check_out_show'] . "';\n";
        //********************* end show check out field on frontend     ******************************************
        //********************* show rooms number field on search form     ******************************************
        $settings .= "\$realestatemanager_configuration['search_rooms_num_field_show']='" .
        $realestatemanager_configuration['search_rooms_num_field_show'] . "';\n";
        //********************* end show rooms number field on search form     ******************************************
        //********************* show bathrooms number field on search form     ******************************************
        $settings .= "\$realestatemanager_configuration['search_bathrooms_num_field_show']='" .
        $realestatemanager_configuration['search_bathrooms_num_field_show'] . "';\n";
        //********************* end show bathrooms number field on search form     ******************************************
        //********************* show badrooms number field on search form     ******************************************
        $settings .= "\$realestatemanager_configuration['search_bedrooms_num_field_show']='" .
        $realestatemanager_configuration['search_bedrooms_num_field_show'] . "';\n";
        //********************* end show bedrooms number field on search form     ******************************************
        //********************* order by default *****
        $settings .= "\$realestatemanager_configuration['order_by_default']='" . $realestatemanager_configuration['order_by_default'] . "';\n";
        //***** end order by default *****
        //***********begin show energy field
        $settings .= "\$realestatemanager_configuration['energy_field_show']='" . $realestatemanager_configuration['energy_field_show'] . "';\n";
        //***********end begin show energy field

        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190313, START:
        //***********begin rotate img
        $settings .= "\$realestatemanager_configuration['rotate_img']='" .
        $realestatemanager_configuration['rotate_img'] . "';\n";
        //***********end rotate img
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Vitaliy, 190313, END.

        //***********begin show house slider
        $settings .= "\$realestatemanager_configuration['show_house_slider']='" .
        $realestatemanager_configuration['show_house_slider'] . "';\n";
        //***********end begin show house slider
        //***********add calendar year
        $settings .= "\$realestatemanager_configuration['initial_year']= '" . $realestatemanager_configuration['initial_year'] . "';\n";
        $settings .= "\$realestatemanager_configuration['final_year']= '" . $realestatemanager_configuration['final_year'] . "';\n";
        //***********end add calendar year
        //******** add sale fraction **********
        $settings .= "\$realestatemanager_configuration['sale_fraction']='" . $realestatemanager_configuration['sale_fraction'] . "';\n";
        //******** end add add sale fraction **********

        // *****  add option row vehicle lg resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_adv_lg']='" . $realestatemanager_configuration['rel_data_columns_adv_lg'] . "';\n";
        // *****  end add option row vehicle lg resolution *********
        // *****  add option row vehicle md resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_adv_md']='" . $realestatemanager_configuration['rel_data_columns_adv_md'] . "';\n";
        // *****  end add option row vehicle md resolution *********
        // *****  add option row vehicle sm resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_adv_sm']='" . $realestatemanager_configuration['rel_data_columns_adv_sm'] . "';\n";
        // *****  end add option row vehicle sm resolution *********
        // *****  add option row vehicle xs resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_adv_xs']='" . $realestatemanager_configuration['rel_data_columns_adv_xs'] . "';\n";
        // *****  end add option row vehicle xs resolution *********

        // *****  add option row vehicle lg resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_map_lg']='" . $realestatemanager_configuration['rel_data_columns_map_lg'] . "';\n";
        // *****  end add option row vehicle lg resolution *********
        // *****  add option row vehicle md resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_map_md']='" . $realestatemanager_configuration['rel_data_columns_map_md'] . "';\n";
        // *****  end add option row vehicle md resolution *********
        // *****  add option row vehicle sm resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_map_sm']='" . $realestatemanager_configuration['rel_data_columns_map_sm'] . "';\n";
        // *****  end add option row vehicle sm resolution *********
        // *****  add option row vehicle xs resolution *********
        $settings .= "\$realestatemanager_configuration['rel_data_columns_map_xs']='" . $realestatemanager_configuration['rel_data_columns_map_xs'] . "';\n";
        // *****  end add option row vehicle xs resolution *********
                //watermark
        $settings .= "\$realestatemanager_configuration['watermark']['show']='" .
        $realestatemanager_configuration['watermark']['show'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['type']='" .
        $realestatemanager_configuration['watermark']['type'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['file']='" .
        $realestatemanager_configuration['watermark']['file'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['text']='" .
        $realestatemanager_configuration['watermark']['text'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['size']='" .
        $realestatemanager_configuration['watermark']['size'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['color']='" .
        $realestatemanager_configuration['watermark']['color'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['angle']='" .
        $realestatemanager_configuration['watermark']['angle'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['position']='" .
        $realestatemanager_configuration['watermark']['position'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['opacity']='" .
        $realestatemanager_configuration['watermark']['opacity'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['min_width']='" .
        $realestatemanager_configuration['watermark']['min_width'] . "';\n";
        $settings .= "\$realestatemanager_configuration['watermark']['min_height']='" .
        $realestatemanager_configuration['watermark']['min_height'] . "';\n";
        //watermark

        //slider settings
        $settings .= "\$realestatemanager_configuration['slider']['height']='" .
        $realestatemanager_configuration['slider']['height'] . "';\n";
        $settings .= "\$realestatemanager_configuration['slider']['object_fit']='" .
        $realestatemanager_configuration['slider']['object_fit'] . "';\n";
        //slider settings

        $settings .= "?>";

        // Write out new initialization file
        $fd = fopen("./components/com_realestatemanager/realestatemanager.class.conf.php", "w")
                or die("Cannot create configuration file.");
        fwrite($fd, $settings);
        fclose($fd);
    }

    /**
     * Rating Array
     * @return array an Array containing the information of all Rating
     * possibilities
     */
    static function getRatingArray() {
        $i = 0;
        $retVal = array();
        while ($i < 5) {
            //erster teil x,0
            $tmp = $i * 2;
            array_push($retVal, array($tmp, $i . ",0"));
            //zweiter teil x,5
            $tmp++;
            array_push($retVal, array($tmp, $i . ",5"));
            $i++;
        }
        array_push($retVal, array(10, "10,0"));
        return $retVal;
    }

    // label 19_06_17

    // 04.07.17
    static function getElementsArray($file_name)
    {
        global $mosConfig_absolute_path;
        $filename = $mosConfig_absolute_path . "/components/com_realestatemanager/" . $file_name;
        $handle = fopen($filename, "r");
        $first_and_second = fread($handle, filesize($filename));
        fclose($handle);
        $firstPart = explode(';', $first_and_second);
        $c = 0;
        foreach ($firstPart as $first) {
            if (trim($first) != '')
            {
                $fst = explode(':', $first);
                $returnlist[0][$c] = trim($fst[0]);
                $second = explode(',', $fst[1]);
                foreach ($second as $scnd) {
                    $returnlist[1][$c][] = trim($scnd);
                }
            }
            $c++;
        }
        return $returnlist;
    }

    /**
     * Language Array - defined in the language files!
     * @return array an Array containing the information of all Language
     * possibilities
     */
    static function getLanguageArray() {
        $retVal = array();
        array_push($retVal, array("Not specified", _REALESTATE_MANAGER_LANGUAGE_NOT_USED));
        array_push($retVal, array("Brazilian Portuguese", _REALESTATE_MANAGER_LANGUAGE_PTBR));
        array_push($retVal, array("Danish", _REALESTATE_MANAGER_LANGUAGE_DK));
        array_push($retVal, array("Dutch", _REALESTATE_MANAGER_LANGUAGE_DUT));
        array_push($retVal, array("English", _REALESTATE_MANAGER_LANGUAGE_ENG));
        array_push($retVal, array("Farsi", _REALESTATE_MANAGER_LANGUAGE_FAR));
        array_push($retVal, array("French", _REALESTATE_MANAGER_LANGUAGE_FRE));
        array_push($retVal, array("German", _REALESTATE_MANAGER_LANGUAGE_GER));
        array_push($retVal, array("Italian", _REALESTATE_MANAGER_LANGUAGE_ITA));
        array_push($retVal, array("Makedonski", _REALESTATE_MANAGER_LANGUAGE_MKD));
        array_push($retVal, array("Portuguese", _REALESTATE_MANAGER_LANGUAGE_PR));
        array_push($retVal, array("Romanian", _REALESTATE_MANAGER_LANGUAGE_ROM));
        array_push($retVal, array("Russian", _REALESTATE_MANAGER_LANGUAGE_RUS));
        array_push($retVal, array("Spanish", _REALESTATE_MANAGER_LANGUAGE_SPA));
        array_push($retVal, array("Swedish", _REALESTATE_MANAGER_LANGUAGE_SWE));
        array_push($retVal, array("Srpski", _REALESTATE_MANAGER_LANGUAGE_SRP));
        return $retVal;
    }

}
