Esempio n. 1
0
 /**
  * @author Bui Dang <*****@*****.**>
  * action list contact
  */
 public function action_index()
 {
     $data = array();
     $filters = array();
     $keyword = array();
     if (Input::get()) {
         Session::set('url_filter_contacts', http_build_query(\Input::get()));
         $arr_remove = array('', null);
         $filters = array_diff(Input::get(), $arr_remove);
         if (isset($filters['end_date'])) {
             $filters['end_date'] = $filters['end_date'] . ' 23:59:59';
         }
         if (isset($filters['keyword']) and trim($filters['keyword']) != '') {
             $keyword = array_unique(explode(' ', trim($filters['keyword'])));
         }
     }
     $contacts = new \Model_Contact();
     $pagination = \Uospagination::forge('pagination', array('pagination_url' => Uri::base() . 'support/contacts?' . Session::get('url_filter_contacts'), 'total_items' => $contacts->count_data($filters, $keyword), 'per_page' => \Constants::$default_limit_pagination, 'num_links' => \Constants::$default_num_links, 'uri_segment' => 'page', 'show_last' => true));
     $filters['offset'] = $pagination->offset;
     $filters['limit'] = $pagination->per_page;
     $data['pagination'] = $pagination;
     $data['contacts'] = $contacts->get_data($filters, $keyword);
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('contacts/index', $data);
 }
Esempio n. 2
0
 /**
  * @author Bui Dang <*****@*****.**>
  * action detail contact
  */
 public function action_index($id = null)
 {
     $data = array();
     if (!isset($id) or !\Model_Contact::find_by_pk($id)) {
         Response::redirect(Uri::base() . 'support/contacts');
     }
     $data['contact'] = \Model_Contact::find_by_pk($id);
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('contact/index', $data);
 }
Esempio n. 3
0
 public function action_index()
 {
     $this->template->title = 'UOS求人システム';
     $data = array();
     //get search value
     if ($search_arr = \Input::get()) {
         Session::set('url_filter_concierges', http_build_query(\Input::get()));
     }
     //set return url after edit
     $pagination_url = \Uri::base() . 'support/concierges/index';
     $return_url = \Uri::current();
     if (\Input::get()) {
         $pagination_url = \Uri::base() . 'support/concierges/index' . '?' . http_build_query($_GET);
         $return_url = \Uri::current() . '?' . http_build_query($_GET);
     }
     //setcookie
     \Cookie::set('register_url_search', $return_url, 60 * 60 * 24);
     //config pagination
     $config = array('pagination_url' => $pagination_url, 'total_items' => count(\Model_Concierges::get_register_list(null, null, $search_arr)), 'per_page' => \Constants::$default_limit_pagination, 'uri_segment' => 'page', 'num_links' => \Constants::$default_num_links, 'show_last' => true);
     //setup pagination
     $pagination = \Uospagination::forge('concierges-pagination', $config);
     $data['listall'] = \Model_Concierges::get_register_list($pagination->per_page, $pagination->offset, $search_arr);
     $this->template->content = \View::forge('concierges/index', $data);
 }