<?php

/**
 * 前台 热门搜索 模块 Controller
 * ============================================================================
 * ZhunaCMS 住哪网酒店分销联盟程序php版　BY Tmac PHP MVC framework
 * $Author: zhangwentao $  <zwttmac@qq.com>
 * $Id: searchlist.php 19 2011-11-22 11:00:06Z zhangwentao $
 * http://union.zhuna.cn；
 */
class searchlistAction extends Action
{

    private $tmp_model;
    private $common_model;
    private $hotel_left_model;
    private $cityinfo;

    public function _init()
    {
        $this->assign('action', $_GET['TMAC_ACTION']);
        $this->tmp_model = Tmac::model('question');
        $this->common_model = Tmac::model('common');
        $this->hotel_left_model = Tmac::model('hotelLeft');
        //搜索块默认值
        $Searchinfo = $this->hotel_left_model->setLeftSearch();
        //设置SearchCookies$Searchinfo
        $sk_array = $this->hotel_left_model->getSearchCookies($Searchinfo);
        //取cityinfo
        $this->cityinfo = $this->hotel_left_model->getCityinfo();

        //footer里的相关设置
        $config_footer = $this->common_model->footer();
        $this->assign($config_footer);
        $this->assign('sk_array', $sk_array);
        $this->assign('cityinfo', $this->cityinfo);
    }

    public function index()
    {
        $cityid = !empty($_GET['cityid']) ? (int) $_GET['cityid'] : 0;  //cityid

        $this->assign('cityid', $cityid);
        $this->V('searchlist');
    }

}