<?php
    require_once(WP_PLUGIN_DIR."/tospur/Config.php");
    require_once(WP_PLUGIN_DIR."/tospur/Dao/SearchDao.php");
    $context = array();
    $context['theme'] = get_template_directory_uri();
    $context['siteUrl'] = get_site_url();
    if(isset($_GET['hid'])){
        $hid = $_GET['hid'];
        $context['hid'] = $hid;
        $context['cityName'] = SearchDao::getCityNameWithId($result->city_id);
        $context = array_merge($context,SearchDao::getDetailInfo($hid));
        $houseType = $context['result']->house_type;
        if($houseType !=0){
            Timber::render('detailOther.html', $context);
        }else
            Timber::render('detail.html', $context);
    }else{
        Timber::render('error.html', $context);
    }

?>