Ejemplo n.º 1
0
 private function rent_item($hid)
 {
     if (!isset($hid)) {
         ishow_404('请指定房源');
     }
     $this->load->model('renthouse_model');
     $renthouse = $this->renthouse_model->get_single_by_hid($hid);
     if (!isset($renthouse) || empty($renthouse)) {
         ishow_404('找不到房源');
     }
     $this->cat = HOUSE_CAT_RENT;
     loadRentCommonInfos($this);
     $this->house = parse_rent_house_item($this, $renthouse);
     unloadRentCommonInfos($this);
     // print_r($this->house);
     $this->load->view('portal/rent-info', $this);
 }
Ejemplo n.º 2
0
 public function edit_rent()
 {
     $this->check_state_common('GET', TRUE);
     $hid = $this->check_param('hid');
     $uid = get_session_uid();
     $this->load->api('adminrenthouse_api');
     $api_result = $this->adminrenthouse_api->rent_item($uid, $hid);
     if (is_ok_result($api_result)) {
         loadRentCommonInfos($this);
         $this->house = $api_result['data'];
         $this->load->view('admin/house/edit-rent', $this);
     } else {
         redirect(base_url('adminhouse/index'));
     }
 }
Ejemplo n.º 3
0
 public function addrent()
 {
     loadRentCommonInfos($this);
     $this->load->view('portal/other/addrent', $this);
 }
Ejemplo n.º 4
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楼');
}