public function teaList() { import("@.ORG.Page"); //导入分页类 $stu = new StuModel(); $count = $stu->count(); $p = new Page($count, 15); $stu_res = $stu->relation('School')->limit($p->firstRow . ',' . $p->listRows)->order('stu_id desc')->findAll(); $p->setConfig('header', '篇记录'); $p->setConfig('prev', "上一页"); $p->setConfig('next', '下一页'); $p->setConfig('first', '<<'); $p->setConfig('last', '>>'); $page = $p->show(); $school = new SchoolModel(); $school_res = $school->findAll(); $xueji_res = getXueji(); $city_res = getCity(); $this->assign('xueji_res', $xueji_res); $this->assign('city_res', $city_res); $this->assign('school_res', $school_res); $this->assign('stu_res', $stu_res); $this->assign("page", $page); $this->display(); }