<?php

/**
 * 前台 城市酒店 模块 Model
 * ============================================================================
 * zhuna_php 住哪网酒店分销联盟程序php版　BY Tmac PHP MVC framework
 * $Author: zhangwentao $  <zwttmac@qq.com>
 * $Id: allcity.class.php 50 2011-12-05 02:56:32Z zhangwentao $
 * http://un.zhuna.cn；
 */
class allcity extends Model
{

    private $db;
    private $point_class_table;

    /**
     * 初始化变量　定义私有变量
     */
    public function _init()
    {
        //连接数据库
        $this->db = $this->connect();
        $this->city_table = DB_PREFIX . 'city';
    }

    /**
     * 取所有城市
     * @return array
     */
    public function getCityArray()
    {
        $sql = "SELECT cityid, cityname, abcd FROM $this->city_table WHERE hotelnum>0 ORDER BY ABCD,hotelnum DESC";
        $rs = $this->db->cacheGetAll($sql, 86400);
        return $rs;
    }

}