示例#1
0
}
?>
                </select>
            </div>
            <div id="casa_select_middle" class="col-lg-1">
                <br/><br/>
                <span id="casa_move_right" class="glyphicon glyphicon-arrow-right"
                        style="font-size:50px; cursor:pointer; margin-left:10px;"></span>
                <span id="casa_move_left"  class="glyphicon glyphicon-arrow-left"
                        style="font-size:48px; cursor:pointer; margin-left:10px;"></span>
            </div>
            <div id="casa_select_right" class="col-lg-4">
                <select multiple class="form-control" style="height:180px;">
                <?php 
// selected areas
$areaDao = new AreaDao();
$selected_rows = $areaDao->getRecommendCasas($area_id);
while ($row = mysql_fetch_array($selected_rows)) {
    echo '<option value="' . $row['id'] . '">' . $row['name'] . '(' . $row['code'] . ')' . '</option>';
}
?>
                </select>
            </div>
        </div>
        <div class="sub">
            <button id="submit_btn" class="btn btn-primary">更新</button>
        </div>
    </form>
</div>
</body>
</html>
示例#2
0
        </p>
      </div>
    </div>
  </div>

  <div class="section">
    <div class="col-md-3 hidden-sm hidden-xs">
      <img src="http://casarover.oss-cn-hangzhou.aliyuncs.com/image/tj_mx.png" width="100%" alt="">
    </div>
    <div class="m-radius-title visible-sm visible-xs">
      <h4>推荐民宿</h4>
    </div>
    <div class="col-md-9 recom-main">
    <?php 
$casaService = new CasaService();
$areaDao = new AreaDao();
$casas = array();
$casaSimpleRows = $areaDao->getRecommendCasas($area_id);
while ($row = mysql_fetch_array($casaSimpleRows)) {
    array_push($casas, $casaService->getCasaWithAttachment($row['id']));
}
if (count($casas) == 0) {
    ?>
        <?php 
    foreach ($themes as $value) {
        ?>
         <div class="col-md-6" onclick="goto_casa(4)">
           <div class="recom-content" >
             <div class="top-pic">
               <img src="<?php 
        echo $picdir . $value['pic'];
示例#3
0
<link rel="stylesheet" type="text/css" href="css/hzw-city-picker.css">
<script type="text/javascript" src="js/integration/hzw-city-picker.min.js"></script>
<script src="js/city_nav.js" type="text/javascript"></script>
<?php 
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/cache/AreaCache.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/models/AreaDao.php';
// var_dump($_SERVER['HTTP_USER_AGENT']);
$areaCache = new AreaCache();
$baseurl = getBaseUrl();
$provincesWithSub_json = $areaCache->getProvincesWithSub_json();
$cities_json = $areaCache->getCities_json();
$citydata = $areaCache->getCities();
$area = new stdClass();
if (isset($_GET['area_id'])) {
    $areaDao = new AreaDao();
    $area = $areaDao->getAreaMess($_GET['area_id']);
}
?>
<input id="provincesWithSub_json" type="hidden" value='<?php 
echo $provincesWithSub_json;
?>
'/>
<input id="cities_json" type="hidden" value='<?php 
echo $cities_json;
?>
'/>
<div class="search-place hidden-sm hidden-xs">
    <div class="input-group search-place-left">
        <input type="text" class="search-frame" id="cityChoice"
                value="<?php 
echo $area->name;
示例#4
0
"></script>
</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 {
示例#5
0
$hugePicsCache = new HugePicsCache();
$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/>
示例#6
0
 private function updateRecommendCasas($area_id, $casa_ids_str)
 {
     $areaDao = new AreaDao();
     $areaDao->delAreaCasasByAreaId($area_id);
     $casa_ids = decodeIdComma($casa_ids_str);
     $areaDao->addAreaCasas($area_id, $casa_ids);
 }