public function index_for_member($member_id = 0, $offset = 0) { $this->load->helper('pagination'); $page_var = array(); $page_var['member_id'] = $member_id; $page_var['pagination'] = init_pagination('member/' . $member_id . '/director_produce/index', $this->gms_director_produce->get_rows_by_member_id($page_var['member_id'])); $page_var['gms_director_produces'] = $this->gms_director_produce->fetch_by_member_id($page_var['member_id'], $page_var['pagination']->per_page, $offset); $this->template->load('', 'gms_director_produce/_index_for_member', $page_var, ['layout' => FALSE]); }
public function index($offset = 0) { $this->load->helper('pagination'); $this->breadcrumbs->push($this->config->item('dashboard_icon') . ' Dashboard', 'dashboard'); $this->breadcrumbs->push('ข้อมูลตำแหน่งในรุ่นฝึกอบรม', 'term_position/index'); $page_var = array(); $page_var['pagination'] = init_pagination('/term_position/index', $this->gms_term_position->get_total_rows()); $page_var['gms_term_positions'] = $this->gms_term_position->fetch_data($page_var['pagination']->per_page, $offset); $this->template->load('S07-ตำแหน่งในรุ่นฝึกอบรม', 'gms_term_position/index', $page_var); }
public function index($offset = 0) { $this->load->helper('pagination'); $this->breadcrumbs->push($this->config->item('dashboard_icon') . ' Dashboard', 'dashboard'); $this->breadcrumbs->push('ข้อมูลเหตุผลที่ไม่อนุมัติ', 'cancel_result/index'); $page_var = array(); $page_var['search_params'] = $this->uri->uri_to_assoc(4); if (count($page_var['search_params']) === 0) { $page_var['pagination'] = init_pagination('/cancel_result/index', $this->gms_cancel_result->get_total_rows()); $page_var['gms_cancel_results'] = $this->gms_cancel_result->fetch_data($page_var['pagination']->per_page, $offset); } else { $page_var['pagination'] = init_pagination('/cancel_result/index', $this->gms_cancel_result->get_search_rows($page_var['search_params']), '/' . $this->uri->assoc_to_uri($page_var['search_params'])); $page_var['gms_cancel_results'] = $this->gms_cancel_result->search($page_var['search_params'], $page_var['pagination']->per_page, $offset); } $this->template->load('S05-เหตุผลที่ไม่อนุมัติ', 'gms_cancel_result/index', $page_var); }
public function index($offset = 0) { $this->load->helper('pagination'); $this->breadcrumbs->push($this->config->item('dashboard_icon') . ' Dashboard', 'dashboard'); $this->breadcrumbs->push('ข้อมูคำนำหน้านาม', 'prefix/index'); $page_var = array(); $page_var['search_params'] = $this->uri->uri_to_assoc(4); if (count($page_var['search_params']) === 0) { $page_var['pagination'] = init_pagination('/prefix/index', $this->gms_prefix->get_total_rows()); $page_var['gms_prefixs'] = $this->gms_prefix->fetch_data($page_var['pagination']->per_page, $offset); } else { $page_var['pagination'] = init_pagination('/prefix/index', $this->gms_prefix->get_search_rows($page_var['search_params']), '/' . $this->uri->assoc_to_uri($page_var['search_params'])); $page_var['gms_prefixs'] = $this->gms_prefix->search($page_var['search_params'], $page_var['pagination']->per_page, $offset); } $this->template->load('S04-คำนำหน้านาม', 'gms_prefix/index', $page_var); }
public function index($offset = 0) { $this->load->helper('pagination'); $page_var = array(); $page_var['table_title'] = 'ข้อมูลผู้มีอำนาจลงนาม'; $this->breadcrumbs->push($this->config->item('dashboard_icon') . ' Dashboard', 'dashboard'); $this->breadcrumbs->push($page_var['table_title'], 'certificate_sign/index'); $page_var['search_params'] = $this->uri->uri_to_assoc(4); if (count($page_var['search_params']) === 0) { $page_var['pagination'] = init_pagination('/certificate_sign/index', $this->gms_certificate_sign->get_total_rows()); $page_var['gms_certificate_signs'] = $this->gms_certificate_sign->fetch_data($page_var['pagination']->per_page, $offset); } else { $page_var['pagination'] = init_pagination('/certificate_sign/index', $this->gms_certificate_sign->get_search_rows($page_var['search_params']), '/' . $this->uri->assoc_to_uri($page_var['search_params'])); $page_var['gms_certificate_signs'] = $this->gms_certificate_sign->search($page_var['search_params'], $page_var['pagination']->per_page, $offset); } $this->template->load('S06-ผู้มีอำนาจลงนาม', 'gms_certificate_sign/index', $page_var); }
public function index($offset = 0) { $this->load->helper('pagination'); $this->breadcrumbs->push($this->config->item('dashboard_icon') . ' Dashboard', 'dashboard'); $this->breadcrumbs->push('ข้อมูลชนิดกีฬา/ชนิดการฝึกอบรม', 'sports/index'); $page_var = array(); $page_var['search_params'] = $this->uri->uri_to_assoc(4); if (count($page_var['search_params']) === 0) { $page_var['pagination'] = init_pagination('/sports/index', $this->gms_sport->get_total_rows()); $page_var['gms_sports'] = $this->gms_sport->fetch_data($page_var['pagination']->per_page, $offset); } else { $page_var['pagination'] = init_pagination('/sports/index', $this->gms_sport->get_search_rows($page_var['search_params']), '/' . $this->uri->assoc_to_uri($page_var['search_params'])); $page_var['gms_sports'] = $this->gms_sport->search($page_var['search_params'], $page_var['pagination']->per_page, $offset); } $page_var['gms_type_list'] = elements_for_dropdown($this->gms_type->get_all(), 'TYPE_ID', 'TYPE_SUBJECT', 'ALL'); $this->template->load('ชนิดกีฬา/ชนิดการฝึกอบรม', 'gms_sports/index', $page_var); }
public function listar($sOrdenarPor = "", $sEnSentido = "") { $this->load->helper("paginador"); $this->load->library(array("pagination")); $param_ordenar_por = (string) $sOrdenarPor; $param_en_sentido = !empty($sEnSentido) ? strtoupper($sEnSentido) === "DESC" ? "desc" : "asc" : ""; $rows = $this->modelo_entidad->get_all(); $total_rows = $this->modelo_entidad->count_all(); $segmento_ordenar_por = !empty($param_ordenar_por) ? "/{$param_ordenar_por}" : "no-definido"; $segmento_en_sentido = !empty($param_en_sentido) ? "/{$param_en_sentido}" : "no-definido"; $ruta_paginacion = static::RUTA_LISTADO . "{$segmento_ordenar_por}{$segmento_en_sentido}/"; init_pagination($ruta_paginacion, $total_rows, Crud_model::RPP, Crud_model::PAGE_SEGMENT); $this->_dataPagina["rows"] = $rows; $this->_dataPagina["paginador"] = $this->pagination->create_links(); $this->_dataLayout["contenido"] = $this->load->view($this->_entidad . "/listado_{$this->_entidad}", $this->_dataPagina, TRUE); $this->load->view("layout/default/default", $this->_dataLayout); }
public function selectCourse($numL = 0) { $this->load->helper('pagination'); $this->load->view("lib/header"); $data = array(); $data['search_params'] = $this->uri->uri_to_assoc(4); if (empty($data['search_params']['TYPE_ID']) === FALSE && $data['search_params']['TYPE_ID'] !== 'all') { $this->gms_course->TYPE_ID = $data['search_params']['TYPE_ID']; $data['gms_sport_list'] = elements_for_dropdown($this->gms_sport->_searchByType(), 'SPORT_ID', 'SPORT_SUBJECT', 'ALL'); } if (empty($data['search_params']['SPORT_ID']) === FALSE && $data['search_params']['SPORT_ID'] !== 'all') { $this->gms_course->SPORT_ID = $data['search_params']['SPORT_ID']; } if (empty($data['search_params']['COURSE_SUBJECT']) === FALSE) { $this->gms_course->COURSE_SUBJECT = $data['search_params']['COURSE_SUBJECT']; } $data['gms_type_list'] = elements_for_dropdown($this->gms_type->_getAllType(), 'TYPE_ID', 'TYPE_SUBJECT', 'ALL'); $data['sport'] = $this->gms_sport->_searchByType(); @($data['pagination'] = init_pagination('/s03/index', $this->gms_course->_selectCountViewCourse(), '/' . $this->uri->assoc_to_uri($data['search_params']))); @($data['course'] = $this->gms_course->_selectViewCourse($data['pagination']->per_page, $numL)); $this->load->view($this->dir . "/_select", $data); $this->load->view("lib/footer"); }
public function listado($sElemento = "foto", $sOrderBy = "fecha_subida", $sSentido = "desc") { $this->load->library(array("pagination")); $this->load->helper(array("paginador")); $view = $this->input->get("view"); if (!empty($view)) { $this->session->set_userdata("listado/view", $view); } $view_session = $this->session->userdata("listado/view"); $elemento = (string) strtolower($sElemento); $elementos_permitidos = config_item("elementos_permitidos"); if (!isset($elementos_permitidos[$elemento])) { show_error("No puede subir elementos de este tipo", 501); } $manager = $this->mm_factory_manager->get_manager($elemento); $elementos = $manager->get_elementos($sOrderBy, $sSentido); $script = 'elementos = ' . json_encode($elementos); add_js_inline($script); $data_contenido = array("elementos" => $elementos, "elemento" => $elemento, "ordenado_por" => $sOrderBy, "sentido" => $sSentido); // if (empty($view_session) OR ! in_array($view_session, array("grid", "list")OR $view_session === "list")) { // // } if ($view_session === "grid") { $view = "grid"; $view_elementos = $this->load->view("mm/archivos/metadata/{$elemento}/grilla_{$elemento}", $data_contenido, TRUE); } else { $view = "list"; $view_elementos = $this->load->view("mm/archivos/metadata/{$elemento}/listado_{$elemento}", $data_contenido, TRUE); } $filtros_buscador = $this->load->view("mm/archivos/metadata/{$elemento}/filtros_buscador_{$elemento}", NULL, TRUE); $cantidad_elementos = $manager->count_elementos(); $RPP = $manager->get_RPP(); $PAGE_SEGMENT = $manager->get_page_segment(); init_pagination("/mm/archivos/listado/{$elemento}/{$sOrderBy}/{$sSentido}/", (int) $cantidad_elementos, $RPP, $PAGE_SEGMENT); $paginador = $this->pagination->create_links(); $this->load->model("MM/MM_categoria_model"); $categorias = $this->MM_categoria_model->get_categorias_selector(); $archivos_master = array("categorias" => $categorias, "filtros_metadata" => $filtros_buscador, "view_elementos" => $view_elementos, "cantidad_elementos" => $cantidad_elementos, "paginador" => $paginador, "elemento" => $elemento, "view" => $view); $contenido = $this->load->view("mm/archivos/listado_archivos_master", $archivos_master, TRUE); $layout = array("contenido" => $contenido); $this->load->view("mm/layout/default/default", $layout); }
public function listado($sOrderBy = "id", $sSentido = "DESC") { $this->load->library(array("pagination")); $this->load->helper(array("paginador")); $pag = $this->uri->segment(self::PAGE_SEGMENT); $offset = ($pag > 0 ? $pag : 1) * self::RPP - self::RPP; $sentido = strtoupper($sSentido) === "DESC" ? "DESC" : "ASC"; $cantidad_registros = $this->_model->cantidad_categorias(); $registros = $this->_model->get_categorias(self::RPP, $offset, $sOrderBy, $sentido); $RPP = self::RPP; $PAGE_SEGMENT = self::PAGE_SEGMENT; init_pagination("/mm/categorias/listado/{$sOrderBy}/" . strtolower($sentido) . "/", (int) $cantidad_registros, $RPP, $PAGE_SEGMENT); $paginador = $this->pagination->create_links(); $categorias_filtro = $this->_model->get_categorias_selector(); $dataPagina = array("registros" => $registros, "cantidad_registros" => $cantidad_registros, "categorias" => $categorias_filtro, "paginador" => $paginador); $contenido = $this->load->view("mm/categorias/listado_categorias", $dataPagina, TRUE); $layout = array("contenido" => $contenido); $this->load->view("mm/layout/default/default", $layout); }