public function get_index()
 {
     //LOAD JS LIBS
     Asset::container('footer')->add('ias', 'bundles/cms/js/jquery.ias.js', 'jquery');
     Asset::container('footer')->add('users', 'bundles/cms/js/sections/users_list.js', 'cms');
     $this->layout->header_data = array('title' => LL('cms::title.users', CMSLANG));
     $this->layout->top_data = array('search' => '/cms/user/search', 'q' => '');
     //GET DATA
     $data = CmsUser::with('role')->order_by('username', 'asc')->order_by('role_level', 'asc')->paginate(Config::get('cms::settings.pag'));
     $this->layout->content = View::make('cms::interface.pages.user_list')->with('data', $data);
 }
 public function action_search_user()
 {
     $auth = Auth::check();
     if ($auth and is_numeric(AUTHORID)) {
         //LOAD JS LIBS
         Asset::container('footer')->add('ias', 'bundles/cms/js/jquery.ias.js', 'jquery');
         Asset::container('footer')->add('user', 'bundles/cms/js/sections/users_list.js', 'cms');
         if (Input::has('q')) {
             $q = Input::get('q');
             $this->layout->header_data = array('title' => $q);
             $this->layout->top_data = array('search' => '/cms/user/search', 'q' => $q);
             //GET PAGE DATA
             $data = CmsUser::where('username', 'LIKE', '%' . $q . '%')->or_where('email', 'LIKE', '%' . $q . '%')->or_where('role_level', '=', $q)->order_by('username', 'asc')->order_by('email', 'asc')->order_by('role_id', 'asc')->paginate(Config::get('cms::settings.pag'));
             $this->layout->content = View::make('cms::interface.pages.user_list')->with('data', $data);
         } else {
             $this->layout->header_data = array('title' => LL('cms::title.users', CMSLANG));
             $this->layout->top_data = array('search' => '/cms/user/search', 'q' => '');
             //GET ALL PAGE DATA
             $data = CmsUser::with('role')->order_by('username', 'asc')->order_by('role_level', 'asc')->paginate(Config::get('cms::settings.pag'));
             $this->layout->content = View::make('cms::interface.pages.user_list')->with('data', $data);
         }
     }
 }