<?php

/**
 * Survey Model
 * @author Candison <www.kandisheng.com>
 */

class Tel_model extends MY_Model
{
    const TYPE1 = 1; //个人房源电话
    const TYPE2 = 2;
    const TYPE3 = 3;
    const TYPE4 = 4;
    const TYPE5 = 5;
    const  MODEL_TABLE_NAME = 'telno_config';
    
    function __construct()
    {
       parent::__construct();
    }

    /**
     * 获取后台电话配置
     */
    public function getTelInfoByType($type){
        $table = self::MODEL_TABLE_NAME;
        $sql = "select *  from {$table} where type = {$type} limit 0,1";
        $data = $this->db_esfhousebak->query($sql)->result_array();
        if($data) return $data[0];
        return array();
    }
}