</head> <body> <?php include '301.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/models/AreaDao.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/AreaService.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/TagService.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/services/CasaService.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/controllers/AreaController.php'; $area_id = $_GET['area_id']; $areaService = new AreaService(); $picdir = 'http://casarover.oss-cn-hangzhou.aliyuncs.com/casa/'; $city_ids = $areaService->getCityIdsIncludeDirect(); if (!empty($area_id) && in_array($area_id, $city_ids)) { $areaDao = new AreaDao(); $area = new Area($areaDao->getById($area_id)); } else { header('Location:error.php?info=无效城市!'); } $tagService = new TagService(); $officialTags = $tagService->getOfficialTags(); $subAreas = $areaService->getSubAreas($area_id); $casaService = new CasaService(); $casas = array(); // because there may be casa that has no tag, // if one casa has no tag, it will never appear in the result of getForCitySearch(), // root cause is in sql query statement, look into CasaDao.getByMultiConfition(). if (empty($_GET['themes']) && empty($_GET['sceneries'])) { $casas = $casaService->getCasasByCityId($area_id); } else { $casas = $casaService->getForCitySearch($area_id, $_GET['themes'], null, $_GET['sceneries']);
$picCacheArray = $hugePicsCache->getHugePics(); for ($i = 0; $i < count($picCacheArray); $i++) { $picCache = $picCacheArray[$i]; $type = $picCache->type; $id = $picCache->id; $path = $picCache->path; $link_info = new stdClass(); if ($type == PicCache::TYPE_CITY) { $areaDao = new AreaDao(); $area_row = $areaDao->getById($id); $link_info->type = "城市"; $link_info->name = $area_row['value']; } else { if ($type == PicCache::TYPE_AREA) { $areaDao = new AreaDao(); $area_row = $areaDao->getById($id); $link_info->type = "区域"; $link_info->name = $area_row['value']; } else { if ($type == PicCache::TYPE_CASA) { $casaDao = new casaDao(); $casa_row = $casaDao->getById($id); $link_info->type = "民宿"; $link_info->name = $casa_row['name']; } } } ?> <div class="col-lg-12 vertical5"> <hr/> <div class="col-lg-12 vertical5">