Ejemplo n.º 1
0
 /**
  * define page title and load template files
  */
 public function index()
 {
     $this->data['title'] = 'Yimu Admin';
     // $course = new \models\courses;
     $user_model = new \models\user();
     // $total = $user_model->allUsers();
     $total = count($user_model->allUsers());
     $pages = new \helpers\paginator('10', 'p');
     $this->data['users'] = $user_model->allUsers($pages->get_limit());
     $pages->set_total($total);
     $path = DIR . 'dashboard/users?';
     $this->data['page_links'] = $pages->page_links($path, null);
     $this->data['title'] = 'Users';
     View::rendertemplate('header', $this->data);
     View::rendertemplate('sidebar', $this->data);
     View::render('user/user.index', $this->data);
     View::rendertemplate('footer', $this->data);
 }