public function fill() { $sch = getproblemsearch('fill_id', FillBaseModel::FILL_PROBLEM_TYPE); $key = set_get_key(); $isadmin = $this->isSuperAdmin(); $mypage = splitpage('ex_fill', $sch['sql']); $numoffill = 1 + ($mypage['page'] - 1) * $mypage['eachpage']; $row = M('ex_fill')->field('fill_id,question,creator,easycount,kind')->where($sch['sql'])->order('fill_id asc')->limit($mypage['sqladd'])->select(); $widgets = array('row' => $row, 'mykey' => $key, 'mypage' => $mypage, 'isadmin' => $isadmin, 'numoffill' => $numoffill); $questionIds = array(); foreach ($row as $r) { $questionIds[] = $r['fill_id']; } $this->getQuestionChapterAndPoint($questionIds, FillBaseModel::FILL_PROBLEM_TYPE); $this->ZaddWidgets($widgets); $this->auto_display(); }
public function fill() { $sch = getproblemsearch(); $key = set_get_key(); $isadmin = checkAdmin(1); $mypage = splitpage('ex_fill', $sch['sql']); $numoffill = 1 + ($mypage['page'] - 1) * $mypage['eachpage']; $row = m('ex_fill')->field('fill_id,question,creator,point,easycount,kind')->where($sch['sql'])->order('fill_id asc')->limit($mypage['sqladd'])->select(); $this->assign('row', $row); $this->assign('mypage', $mypage); $this->assign('numoffill', $numoffill); $this->assign('isadmin', $isadmin); $this->assign('mykey', $key); $this->assign('search', $sch['search']); $this->assign('problem', $sch['problem']); $this->auto_display(); }