error("非法操作!"); } } //网站首页面 public function index(){ $list = M("ctmarket")->where(array('status'=>1))->field("coinname,id")->select(); $this->assign("market",$list); $this->display(); } //公告中心 public function gglist(){ $list = M("content")->where(array('status'=>1))->select(); $this->assign("list",$list); $this->display(); } //公告详情 public function gginfo($id = null){ if (checkstr($id)) { $this->error(L('您输入的信息有误')); } $info = M("content")->where(array('id'=>$id))->find(); if(empty($info)){ redirect('/Index/gglist.html'); } $this->assign("info",$info); $this->display(); } } ?>