<?php
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
// Author: Tobias Liegl (AKA CHAPI)                                          //
// Site: http://www.chapi.de                                                 //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
if( ! preg_match( '/^(\D+)(\d*)$/' , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ;

include_once( XOOPS_ROOT_PATH . "/modules/$mydirname/include/mb_functions.php");

function realty_block_search( ){
	$search_typeid = isset($_GET['search_typeid']) ? intval($_GET['search_typeid']) : NULL;
	$search_price_low = isset($_GET['search_price_low']) ? intval($_GET['search_price_low']) : NULL;
	$search_price_high = isset($_GET['search_price_high']) ? intval($_GET['search_price_high']) : 99999;
	$search_area_low = isset($_GET['search_area_low']) ? intval($_GET['search_area_low']) : NULL;
	$search_area_high = isset($_GET['search_area_high']) ? intval($_GET['search_area_high']) : 999;
	$search_yearpriod = isset($_GET['search_yearpriod']) ? intval($_GET['search_yearpriod']) : NULL;
	$search_walkto = isset($_GET['search_walkto']) ? intval($_GET['search_walkto']) : NULL;
	$search_freewords = isset($_GET['search_freewords']) ? htmlspecialchars($_GET['search_freewords'], ENT_QUOTES) : NULL;
	$search_order = isset($_GET['search_order']) ? intval($_GET['search_order']) : NULL;
	$search_freewords = convert_mb_url($search_freewords); 
	$block['search_typeid'    ]=$search_typeid;
	$block['search_price_low' ]=$search_price_low;
	$block['search_price_high']=$search_price_high;
	$block['search_area_low'  ]=$search_area_low;
	$block['search_area_high' ]=$search_area_high;
	$block['search_yearpriod' ]=$search_yearpriod;
	$block['search_walkto'    ]=$search_walkto;
	$block['search_freewords' ]=$search_freewords;
	$block['search_order'     ]=$search_order;	
	return $block;
}

?>