function createEvent() { if (MEMBER_ID < 1) { $this->Messager("你需要先登录才能继续本操作", 'index.php?mod=login'); } load::logic('event'); $EventLogic = new EventLogic(); if (MEMBER_ROLE_TYPE != 'admin') { $is_allowed = $EventLogic->allowedCreate(MEMBER_ID, $this->Member); } if ($is_allowed) { $this->Messager($is_allowed); } $free = 'checked'; $all = 'checked'; $info = array(); $info = jconf::get('profileeventinfo'); $rs = $EventLogic->get_event_type(); $event_type = jform()->Select("type", $rs, $val['type_id']); if ($this->Member['province']) { $province_id = $EventLogic->get_province_id($this->Member['province']); } else { $province_id = $EventLogic->get_province_id(); } $province = $EventLogic->get_province(); $hid_province = $province_id; $province_list = jform()->Select("province", $province, $province_id, "onchange=\"changeProvince();\""); if ($this->Member['city']) { $city_id = $EventLogic->get_city_id(array('name' => $this->Member['city'], 'upid' => $province_id)); $where_city = " and upid = '{$city_id}'"; } $hid_city = $city_id; if ($this->Member['area']) { $area_where = array('name' => $this->Member['area']); if ($city_id) { $area_where['upid'] = $city_id; } $area_id = $EventLogic->get_area_id($area_where); } $hid_area = $area_id; $fromt = $edit_fromt ? $edit_fromt : my_date_format(TIMESTAMP, 'Y-m-d'); $edit_fromt_h = $edit_fromt_h ? $edit_fromt_h : false; $edit_fromt_i = $edit_fromt_i ? $edit_fromt_i : false; $hour_select_from = mk_time_select('hour', $edit_fromt_h, 'hour_select_from'); $min_select_from = mk_time_select('min', $edit_fromt_i, 'min_select_from'); $tot = $edit_tot ? $edit_tot : my_date_format(TIMESTAMP + 7 * 24 * 3600, 'Y-m-d'); $edit_tot_h = $edit_tot_h ? $edit_tot_h : false; $edit_tot_i = $edit_tot_i ? $edit_tot_i : false; $hour_select_to = mk_time_select('hour', $edit_tot_h, 'hour_select_to'); $min_select_to = mk_time_select('min', $edit_tot_i, 'min_select_to'); $member = $this->Member; if ($member['medal_id']) { $medal_list = $this->TopicLogic->GetMedal($member['medal_id'], $member['uid']); } $this->Title = "发起活动"; include template('event/event_create'); }