コード例 #1
0
ファイル: EventAction.class.php プロジェクト: yang7hua/hunshe
 public function index()
 {
     $vars = $_REQUEST;
     $total = EventModel::_list($vars, true);
     $Page = new Newpage($total, 9);
     $list = EventModel::_list($vars, false, $Page->limit);
     $types = EventModel::types();
     $recommend = EventModel::recommend(3);
     $this->assign('recommend', $recommend);
     $this->assign(array('list' => $list, 'page' => $Page->getPage(), 'types' => $types));
     $area = M('area')->where(array('pid' => 0))->field('area_id id,title')->order('sort asc')->limit(50)->select();
     array_unshift($area, array('id' => 0, 'title' => '全部'));
     $this->assign('areas', $area);
     $this->assign($vars);
     $this->display();
 }