=',TIMESTAMP); $condition[]=array('activity_state','=',1); $activity_list = $activity_model->getActivityList($condition, 10); View::assign('activity_list', $activity_list); View::assign('show_page', $activity_model->page_info->render()); View::assign('html_title', config('ds_config.site_name') . ' - 加入我们'); return View::fetch($this->template_dir.'activity_index'); } /** * 单个活动信息页 */ public function detail() { //得到导航ID $nav_id = intval(input('param.nav_id')); View::assign('index_sign', $nav_id); //查询活动信息 $activity_id = intval(input('param.activity_id')); if ($activity_id <= 0) { $this->error(lang('param_error')); //'缺少参数:活动编号' } $activity = model('activity')->getOneActivityById($activity_id); if (empty($activity) || $activity['activity_type'] != '1' || $activity['activity_state'] != 1 || $activity['activity_startdate'] > TIMESTAMP || $activity['activity_enddate'] < TIMESTAMP) { $this->error(lang('activity_index_activity_not_exists')); //'指定活动并不存在' } View::assign('activity', $activity); //查询活动内容信息 $condition = array(); $condition[] = array('activitydetail.activity_id','=',$activity_id); $activitydetail_list = model('activitydetail')->getActivitydetailAndGoodsList($condition); View::assign('activitydetail_list', $activitydetail_list); View::assign('html_title', config('ds_config.site_name') . ' - ' . $activity['activity_title']); return View::fetch($this->template_dir.'activity_show'); } } ?>