Exemplo n.º 1
0
 function datatable()
 {
     //datatable//
     $this->rapyd->load("datatable");
     $table = new DataTable(null, $this->data);
     $table->per_row = 3;
     $table->per_page = 6;
     $table->use_function("substr", "strtoupper");
     $table->cell_template = '
 <div style="padding:4px">
   <div style="color:#119911; font-weight:bold"><#title#></div>
   This is the body number <substr><#body#>|5|100</substr>
 </div>';
     $table->build();
     $data["table"] = $table->output;
     //enddatatable//
     $content["content"] = $this->load->view('rapyd/datatable', $data, true);
     $content["rapyd_head"] = $this->rapyd->get_head();
     $content["code"] = highlight_code_file(THISFILE, "//datatable//", "//enddatatable//");
     $this->load->view('rapyd/template', $content);
 }
Exemplo n.º 2
0
    function enlistar()
    {
        //$this->session->_flashdata_sweep();
        //echo '<pre>';print_r($this->session->userdata);echo '</pre>';
        $repo = $this->uri->segment(3);
        $this->rapyd->load("datatable");
        $this->rapyd->config->set_item("theme", "clean");
        if ($repo) {
            $repo = strtoupper($repo);
            $grid = new DataTable();
            //$grid->db->select('titulo, mensaje, SUBSTR(SUBSTRING_INDEX(REPLACE(ejecutar, "\'",\'"\'), \'"\', 2),10) AS nombre');
            //$grid->db->from("tmenus");
            //$grid->db->where("modulo='".$repo."LIS' AND TRIM(ejecutar) LIKE 'REPOSQL(%)'");
            $grid->db->select('a.titulo, a.mensaje, a.nombre');
            $grid->db->from("intrarepo AS a");
            $grid->db->join("reportes AS b", "a.nombre=b.nombre");
            $grid->db->where('a.modulo', $repo);
            $grid->db->where('a.activo', 'S');
            $grid->per_row = 3;
            $grid->use_function("substr", "strtoupper");
            $grid->cell_template = '
			<div style="padding:4px">
			  <div style="color:#119911; font-weight:bold">' . anchor('reportes/ver/<#nombre#>/' . $repo, "<#titulo#>", array('onclick' => "parent.navegador.afiltro()")) . '</div>
			   <htmlspecialchars><#mensaje#></htmlspecialchars>
			</div>';
            $grid->build();
            //echo $grid->db->last_query();
        }
        if ($repo and $grid->recordCount > 0) {
            $data['forma'] = $grid->output;
        } else {
            $data['forma'] = '<p class="mainheader">No se encontrar&oacute;n reportes.</p>';
        }
        //echo $grid->db->last_query();
        $data['head'] = $this->rapyd->get_head();
        $data['titulo'] = "<center><h2>Listados Disponibles</h2></center>";
        $data['repo'] = $repo;
        //$CI->session->set_userdata('estaba', $CI->uri->uri_string());
        $this->load->view('view_reportes', $data);
    }