Exemple #1
0
 /**
  * 学校班级列表
  */
 public function classlist($schcls_schid = 0)
 {
     Fn::ajax_call($this, 'removeClass');
     if (!Validate::isInt($schcls_schid) || $schcls_schid <= 0) {
         return;
     }
     $param['schcls_schid'] = $schcls_schid;
     $param['schcls_name'] = Fn::getParam('schcls_name');
     $total = SchoolModel::schoolClassListCount($param);
     $size = 15;
     $page = 1;
     if (isset($_GET['page']) && intval($_GET['page']) > 1) {
         $page = intval($_GET['page']);
     }
     $offset = ($page - 1) * $size;
     $schclass_list = SchoolModel::schoolClassList('*', $param, $page, $size);
     $get = $_GET;
     unset($get['page']);
     $url = site_url('admin/school/classlist/' . $schcls_schid) . '?' . http_build_query($get);
     $data['pagination'] = multipage($total, $size, $page, $url);
     $data['list'] = $schclass_list;
     $data['param'] = $param;
     // 模版
     $this->load->view('school/classlist', $data);
 }