<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 全景图片上传权限 
 *
 * @package         zsb
 * @subpackage      Models
 * @category        Models
 * 
 */
class panorama_pic_violation_total_model extends MY_Model{
    
    public function __construct() 
	{
        parent::__construct(1,1,3);
	}
   
   /**
    * 查询经纪人收藏的应用管理
    * get_app_custom
    * @param int $uid
    * @return array
    */
   public function getPanoramaStatus($uid){
        
        $key = GB_CITY.'_function_panorama_status_' . $uid;
        //$this->mc->delete($key);
        $cache = $this->mc->get($key);

        if($cache['isok'] == 1)
        {
            $return_data = $cache['data'];
        }
        else
        {
            //查询字段
            $this->dbback->select('id,uid,type');

            //查询条件
            $this->dbback->where("uid = '".$uid."'");

            //查询
            $arr_data = $this->dbback->get('panorama_pic_violation_total')->row_array();
			
			$return_data = true;
            if(!empty($arr_data) && $arr_data['type'] != '1')
			{
				$return_data = false;
			}

            $this->mc->set($key, array('isok'=>1, 'data'=>$return_data), 3600);
        }

        return $return_data;
   }
   
}




