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

/**
 * Editor Class
 *
 * 编辑器
 *
 * @package     zsb
 * @subpackage      Controllers
 * @category        Controllers
 * @author      sun
 */
class Pic_Wang extends MY_Controller {
    /**
    * 解析函数
    *
    * @access public
    * @return void
    */
    public function __construct()
    {
        parent::__construct();
    }
    
    public function house()
    {
        /***
        $tname = $dbback->GetOne("select truename from broker where uid = '$uid'");
		$truename = $tname != '' ? iconv('gbk','utf-8',$tname) : $_POST["truename"];

		if(!empty($truename)){
			$str1="该图片由";
			$str1=iconv('gbk','utf-8',$str1);
			$str2="提供";
			$str2=iconv('gbk','utf-8',$str2);
			$str = $str1.$truename.$str2;
			//$str = iconv('gbk','utf-8',$str);
			$this->$uf->otherstring = $str;
		}***/
		
        $this->load->model('pic_wang_model');
		
		//判断是否上传是360全景图片
		if(!empty($_GET['uploadType']) && $_GET['uploadType'] == '1')
		{
			//360全景图片限制上传大小，默认限制 5M
			$this->pic_wang_model->_max_size = 5120;
			$this->pic_wang_model->_image_width = '2688';
			$this->pic_wang_model->_image_height = '1344';
			$this->pic_wang_model->_imageCategory = '1';
			//$this->pic_model->_resize_width = '160';
			//$this->pic_model->_resize_height = '120';
		}	

        $this->pic_wang_model->is_insert_temp_table = true;
        echo $this->pic_wang_model->upload();
    }
    
    /**
     * 普通的上传
     */
    public function common()
    {   
        $this->load->model('pic_model');
        echo $this->pic_model->common_upload();
    }
}
