Example #1
0
 private function sell_item($hid)
 {
     if (!isset($hid) || !is_numeric($hid)) {
         ishow_404('请指定房源');
     }
     $this->load->model('sellhouse_model');
     $sellhouse = $this->sellhouse_model->get_single_by_hid($hid);
     if (!isset($sellhouse) || empty($sellhouse)) {
         ishow_404('找不到房源');
     }
     $this->cat = HOUSE_CAT_SELL;
     loadCommonInfos($this);
     $this->house = parse_sell_house_item($this, $sellhouse);
     unloadCommonInfos($this);
     // print_r($this->house);
     $this->load->view('portal/sell-info', $this);
 }
Example #2
0
function loadRentCommonInfos($CI)
{
    loadCommonInfos($CI);
    $CI->rent_types = array(1 => '整租', 2 => '合租', 3 => '床位');
    $CI->rentpay_types = array(0 => '面议', 1 => '押一付一', 2 => '押一付二', 3 => '押一付三', 4 => '押二付一', 5 => '押二付二', 6 => '押二付三', 7 => '半年付', 8 => '年付');
    // $CI->support_devices = array(
    // 	1 => '床',
    // 	2 => '热水器',
    // 	3 => '洗衣机',
    // 	4 => '空调',
    // 	5 => '冰箱',
    // 	6 => '电视',
    // 	7 => '宽带',
    // 	8 => '沙发',
    // 	9 => '衣柜',
    // 	10 => '暖气',
    // );
}
Example #3
0
 public function addsell()
 {
     loadCommonInfos($this);
     $this->load->view('portal/other/addsell', $this);
 }
Example #4
0
 public function edit_sell()
 {
     $this->check_state_common('GET', TRUE);
     $hid = $this->check_param('hid');
     $uid = get_session_uid();
     $this->load->api('adminsellhouse_api');
     $api_result = $this->adminsellhouse_api->sell_item($uid, $hid);
     if (is_ok_result($api_result)) {
         loadCommonInfos($this);
         $this->house = $api_result['data'];
         $this->load->view('admin/house/edit-sell', $this);
     } else {
         redirect(base_url('adminhouse/index'));
     }
 }
Example #5
0
function loadCommonFilterInfos($CI, $sell = TRUE)
{
    if ($sell) {
        loadCommonInfos($CI);
    } else {
        loadRentCommonInfos($CI);
    }
    $CI->filters_area = array_merge(array(0 => array('area_name' => '不限')), $CI->areas);
    $CI->filters_community = array_merge(array(0 => array('cname' => '不限')), $CI->communitys);
    //$CI->communitys;
    $CI->filters_decor = array_merge(array(0 => '不限'), $CI->house_decors);
    $CI->filters_size = array(0 => '不限', 1 => '0-40㎡', 2 => '40-60㎡', 3 => '60-80㎡', 4 => '80-100㎡', 5 => '100-144㎡', 6 => '144㎡以上');
    $CI->filters_room = array(0 => '不限', 1 => '一室', 2 => '两室', 3 => '三室', 4 => '四室', 5 => '五室及以上');
    $CI->filters_floor = array(0 => '不限', 1 => '1楼', 2 => '2楼', 3 => '3楼', 4 => '4楼', 5 => '5楼', 6 => '6楼', 7 => '7楼', 8 => '8楼');
}