function main() { load::logic('event'); $EventLogic = new EventLogic(); $hot_event = $EventLogic->getHotEvent(); $uids = array(); if ($uids = $EventLogic->getDaRen()) { $hd_daren = $this->TopicLogic->GetMember($uids); } $event_type = $EventLogic->get_event_type(); $where = " 1 "; $type = intval($this->Get['type']); if ($type) { $where .= " and a.type_id = '{$type}' "; $tclass[$type] = " class='fred'"; $hid_type = $type; } else { $tclass[0] = " class='fred'"; } if ($this->Config['same_city']) { $choose_province = intval($this->Get['province']); $choose_city = intval($this->Get['city']); $choose_area = intval($this->Get['area']); $nocity = $this->Get['nocity']; if ($choose_province) { $hid_province = $choose_province; } if ($this->Member['province']) { $province_id = $EventLogic->get_province_id($this->Member['province']); } else { $province_id = $EventLogic->get_province_id(); } $province = $EventLogic->get_province(); $province_id = $choose_province ? $choose_province : $province_id; $province_list = jform()->Select("province", $province, $province_id, " style=\"display:none\" onchange=\"changeProvince();\""); if ($province_id) { $hid_province = $province_id; if ($this->Member['city']) { $city_id = $EventLogic->get_city_id(array('name' => $this->Member['city'])); } else { $city_id = $EventLogic->get_city_id(array('upid' => $province_id, 'sql_order' => 'list')); } $city = $EventLogic->get_city($province_id); $city_id = $choose_city ? $choose_city : $city_id; $city_name = $EventLogic->get_city_name($city_id); $city_list = jform()->Select("city", $city, $city_id, " style=\"display:none\" onchange=\"changeCity();\""); if ($city_id) { $area = $EventLogic->get_area($city_id); } } if ($nocity) { $cclass['no'] = " class='fred'"; $hid_city = $city_id; $hid_no_city = $nocity; } else { if ($city_id && !$choose_area) { $where .= " and a.city_id = '{$city_id}' "; $cclass[$city_id] = " class='fred'"; $hid_city = $city_id; } else { if ($choose_area) { $where .= " and a.area_id = '{$choose_area}' "; $cclass[$choose_area] = " class='fred'"; $hid_city = $city_id; $hid_area = $choose_area; } } } } $where .= " and a.verify = 1 "; $param = array('where' => $where, 'order' => 'order by a.posttime DESC , a.app_num DESC ', 'limit' => '', 'page' => true, 'perpage' => 10, 'page_url' => "index.php?mod=event&province={$choose_province}&city={$choose_city}&area={$choose_area}&type={$type}&nocity={$nocity}"); $return = array(); $return = $EventLogic->getEventInfo($param); $count = $return['count'] ? $return['count'] : 0; $event = $return['event_list']; $page_arr = $return['page']; $app = $return['app']; $member = $this->Member; if ($member['medal_id']) { $medal_list = $this->TopicLogic->GetMedal($member['medal_id'], $member['uid']); } $this->Title = "活动"; include template('event/event'); }