本文整理汇总了PHP中DataGrid::column_detail方法的典型用法代码示例。如果您正苦于以下问题:PHP DataGrid::column_detail方法的具体用法?PHP DataGrid::column_detail怎么用?PHP DataGrid::column_detail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataGrid
的用法示例。
在下文中一共展示了DataGrid::column_detail方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filteredgrid
function filteredgrid()
{
$this->rapyd->load("datafilter", "datagrid");
$this->rapyd->uri->keep_persistence();
//filter
$filter = new DataFilter("Filtro de soporte", 'soporte');
$filter->usuario = new inputField("Usuario", "usuario");
$filter->estampa = new inputField("Estampa", "estampa");
$filter->titulo = new inputField("Titulo", "titulo");
$filter->comentario = new inputField("Comentario", "comentario");
$filter->buttons("reset", "search");
$filter->build();
$uri = "supervisor/sopor/dataedit/show/<#id#>";
$grid = new DataGrid("Filtro de soporte");
//$grid->order_by("nombre","asc");
$grid->per_page = 20;
$grid->column_detail("Usuario", "usuario", $uri);
$grid->column("Estampa", "estampa");
$grid->column("Titulo", "titulo");
$grid->column("Comentario", "comentario");
$grid->add("supervisor/soporte/dataedit/create");
$grid->build();
//grid
$data["crud"] = $filter->output . $grid->output;
$data["titulo"] = 'Soporte';
$content["content"] = $this->load->view('rapyd/crud', $data, true);
$content["rapyd_head"] = $this->rapyd->get_head();
$content["code"] = '';
$content["lista"] = "\r\n\t\t\t<h3>Editar o Agregar</h3>\r\n\t\t\t<div>Con esta pantalla se puede editar o agregar datos a la tabla scli del Modulo de Nómina</div>\r\n\t\t\t<div class='line'></div>\r\n\t\t\t<a href='#' onclick='window.close()'>Cerrar</a>\r\n\t\t\t<div class='line'></div>\n<br><br><br>\n";
$this->load->view('rapyd/tmpsolo', $content);
}
示例2: index
function index()
{
$this->rapyd->load('datagrid');
$this->rapyd->load('datafilter');
$control = array(false, false);
$filter = new DataFilter('Filtro de Facturas');
$filter->fechad = new dateField('Desde', 'fechad', 'd/m/Y');
$filter->fechad->operator = '>=';
$filter->fechah = new dateField('Hasta', 'fechah', 'd/m/Y');
$filter->fechah->operator = '<=';
$filter->fechah->clause = $filter->fechad->clause = 'where';
$filter->fechah->db_name = $filter->fechad->db_name = 'fecha';
$filter->fechah->size = $filter->fechad->size = 10;
$filter->fechah->insertValue = $filter->fechad->insertValue = date('Y/m/d');
$filter->fechah->group = $filter->fechad->group = 'Fecha';
$filter->nombre = new inputField('Nombre', 'nombre');
$filter->nombre->db_name = "CONCAT(b.nombres,' ',b.apellidos)";
$filter->cedula = new inputField('Cédula/RIF', 'cedula');
$filter->buttons('reset', 'search');
$action = "javascript:window.location='" . site_url('supermercado/poscuadre') . "'";
$filter->button('btn_regresa', 'Regresar', $action, 'TR');
$filter->build();
if (empty($filter->fechah->value) or $filter->fechah->value == date('Y/m/d')) {
$control[0] = true;
}
if (empty($filter->fechah->value) or $filter->fechah->value == date('Y/m/d')) {
$control[1] = true;
}
$grid = new DataGrid();
$grid->per_page = 10;
$select = array('b.cedula', "DATE_FORMAT(a.fecha, '%d/%m/%Y') fecha", 'a.cajero', 'a.caja', 'a.tipo', 'a.numero', "DATE_FORMAT(a.fecha, '%Y%m%d') qfecha", "IF(b.nombres IS NULL,a.nombres,CONCAT(b.nombres,' ',b.apellidos)) nombres", 'a.impuesto', 'a.gtotal', 'a.hora');
$grid->db->select($select);
$grid->db->from('viefac a');
$grid->db->join('club b', 'a.cliente=b.cod_tar', 'LEFT');
if ($control[0]) {
$grid->db->where('a.fecha>=', 'NOW()');
}
if ($control[1]) {
$grid->db->where('a.fecha<=', 'NOW()');
}
$grid->db->orderby('a.fecha, a.caja, a.numero');
$grid->column_detail('Caja', 'caja', site_url("supermercado/buscafac/verfactura/<#caja#>/<#cajero#>/<#qfecha#>/<#numero#>"));
$grid->column('Cajero', 'cajero');
$grid->column('Tipo', 'tipo');
$grid->column('Número', 'numero');
$grid->column('Fecha', 'fecha');
$grid->column('Cedula', 'cedula');
$grid->column('Nombres', 'nombres');
$grid->column('Impuesto', 'impuesto');
$grid->column('Total', 'gtotal');
$grid->build();
//echo $grid->db->last_query();
$data['content'] = $filter->output . $grid->output;
$data['title'] = '<h1>Consulta de facturas</h1>';
$data['head'] = $this->rapyd->get_head();
$this->load->view('view_ventanas', $data);
}
示例3: index
function index()
{
$this->rapyd->load("datagrid");
$this->rapyd->load("datafilter");
$control = array(false, false);
$filter = new DataFilter("Filtro de Facturas");
$filter->fechad = new dateField("Desde", "fechad", "d/m/Y");
$filter->fechad->operator = ">=";
$filter->fechah = new dateField("Hasta", "fechah", "d/m/Y");
$filter->fechah->operator = "<=";
$filter->fechah->clause = $filter->fechad->clause = "where";
$filter->fechah->db_name = $filter->fechad->db_name = "fecha";
$filter->fechah->size = $filter->fechad->size = 10;
$filter->fechah->insertValue = $filter->fechad->insertValue = date('Y/m/d');
$filter->nombre = new inputField("Nombre", "nombre");
$filter->nombre->db_name = "concat(b.nombres,' ',b.apellidos)";
$filter->cedula = new inputField("Cédula/RIF", "cedula");
$filter->buttons("reset", "search");
$filter->build();
if (empty($filter->fechah->value) or $filter->fechah->value == date('Y/m/d')) {
$control[0] = true;
}
if (empty($filter->fechah->value) or $filter->fechah->value == date('Y/m/d')) {
$control[1] = true;
}
$grid = new DataGrid();
$grid->per_page = 10;
$select = array("b.cedula", "DATE_FORMAT(a.fecha, '%d/%m/%Y') fecha", "a.cajero", "a.caja", "a.tipo", "a.numero", "DATE_FORMAT(a.fecha, '%Y%m%d') qfecha", "if(b.nombres IS NULL,a.nombres,concat(b.nombres,' ',b.apellidos)) nombres", "a.impuesto", "a.gtotal", "a.hora");
$grid->db->select($select);
$grid->db->from("viefac a");
$grid->db->join("club b", "a.cliente=b.cod_tar", "LEFT");
if ($control[0]) {
$grid->db->where('a.fecha>=', 'NOW()');
}
if ($control[1]) {
$grid->db->where('a.fecha<=', 'NOW()');
}
$grid->db->orderby('a.fecha, a.caja, a.numero');
$grid->column_detail("Caja", "caja", site_url("supermercado/buscafac/verfactura/<#caja#>/<#cajero#>/<#qfecha#>/<#numero#>"));
$grid->column("Cajero", "cajero");
$grid->column("Tipo", "tipo");
$grid->column("Numero", "numero");
$grid->column("Fecha", "fecha");
$grid->column("Cedula", "cedula");
$grid->column("Nombres", "nombres");
$grid->column("Impuesto", "impuesto");
$grid->column("Total", "gtotal");
$grid->build();
//echo $grid->db->last_query();
$data['content'] = $filter->output . $grid->output;
$data['title'] = '<h2>Consulta de facturas desde la fecha ' . $filter->fechad->value . ' hasta ' . $filter->fechah->value . '</h2>';
$data["head"] = $this->rapyd->get_head();
$this->load->view('view_ventanas', $data);
}
示例4: index
function index()
{
$this->rapyd->load("datagrid");
$this->rapyd->load("datafilter");
$diai = $this->uri->segment(4);
$mesi = $this->uri->segment(5);
$anoi = $this->uri->segment(6);
if ($diai === FALSE or $mesi === FALSE or $anoi === FALSE) {
$fechai = date('Y/m/d');
$qfechai = date('Ymd');
} else {
$fechai = "{$anoi}/{$mesi}/{$diai}";
$qfechai = $anoi . $mesi . $diai;
}
$filter = new DataForm('supermercado/poscuadre/index');
$filter->title('Filtro de cajas');
$filter->fechai = new dateField("Fecha", "fechai", "d/m/Y");
$filter->fechai->insertValue = $fechai;
$filter->fechai->size = 10;
$filter->button("btnsubmit", "Buscar", form2uri(site_url('supermercado/poscuadre/index'), 'fechai'), $position = "BL");
$filter->build_form();
$grid = new DataGrid();
//$grid->db->select("a.caja caja,IFNULL(b.nombre,'N/A') nombre, a.cajero as cajero,FORMAT(SUM(a.gtotal),2) monto, sum(TRUNCATE(a.gtotal/50000,0)) cupones ");
$select = array("a.caja caja", "IFNULL(b.nombre,'N/A') nombre", "a.cajero as cajero", "FORMAT(SUM(a.gtotal),2) monto", "sum(TRUNCATE(a.gtotal/50000,0)) cupones");
$grid->db->select($select);
$grid->db->from("posfact a");
$grid->db->where("substring(numero,1,1)!=", 'X');
$grid->db->where("fecha", $qfechai);
$grid->db->join("scaj b", "a.cajero=b.cajero", "LEFT");
$grid->db->groupby('a.caja,a.cajero');
$grid->column_detail("Caja", "caja", site_url("supermercado/poscuadre/concaja/<#caja#>/<#cajero#>/{$qfechai}"));
$grid->column("Nombre", "nombre");
$grid->column("Cajero", "cajero", 'align="center"');
$grid->column("Cupones", "cupones", 'align="center"');
$grid->column("Monto", "monto", 'align="right"');
$grid->build();
//echo $grid->db->last_query();
$consul = new DataForm('supermercado/buscafac/index/search/osp');
$consul->title('Buscar Factura');
$consul->fechad = new dateField("Desde", "fechad", "d/m/Y");
$consul->fechah = new dateField("Hasta", "fechah", "d/m/Y");
$consul->nombre = new inputField("Nombre", "nombre");
$consul->cedula = new inputField("Cédula/RIF", "cedula");
$consul->fechad->insertValue = $consul->fechah->insertValue = date("Y/m/d");
$consul->fechah->size = $consul->fechad->size = 10;
$consul->submit("btn_submit", "Buscar");
$consul->build_form();
$data['content'] = $filter->output . $grid->output . $consul->output;
$data['title'] = "<h1>Consulta de Cajas</h1>";
$data["head"] = $this->rapyd->get_head();
$this->load->view('view_ventanas', $data);
}
示例5: datagrid
function datagrid()
{
//datagrid//
$this->rapyd->load("datagrid");
$link = site_url('rapyd/crudsamples/dataedit/show/<#article_id#>');
$grid = new DataGrid("Article List", "articles");
$grid->per_page = 5;
$grid->use_function("substr", "strtoupper");
$grid->column_detail("ID", "article_id", $link);
$grid->column("Title", 'title', ' style="color:#ff0000" ');
$grid->column("Body", "<substr><#body#>|0|7</substr>..");
$grid->build();
$data["grid"] = $grid->output;
//enddatagrid//
$content["content"] = $this->load->view('rapyd/datagrid', $data, true);
$content["rapyd_head"] = $this->rapyd->get_head();
$content["code"] = highlight_code_file(THISFILE, "//datagrid//", "//enddatagrid//");
$this->load->view('rapyd/template', $content);
}
示例6: intval
function items_grid()
{
$this->rapyd->load("datagrid");
$art_id = intval($this->uri->segment(4));
$grid = new DataGrid("Art�culos", "itstra");
$grid->db->where("numero", $art_id);
$modify = site_url("inventario/stra/items_edit/{$art_id}/modify/<#numero#>/<#codigo#>");
$delete = anchor("inventario/stra/items_edit/{$art_id}/do_delete/<#numero#>/<#codigo#>", "Eliminar");
$grid->order_by("codigo", "desc");
$grid->per_page = 20;
$grid->column_detail("N�mero", "numero", $modify);
$grid->column("C�digo", "codigo");
$grid->column("Descripci�n", "descrip");
$grid->column("Cantidad", "cantidad");
$grid->column("Eliminar", $delete);
$grid->add("inventario/stra/items_edit/{$art_id}/create");
$grid->build();
$head = $this->rapyd->get_head();
$this->loadiframe($grid->output, $head, "related");
}
示例7: buscafac
function buscafac()
{
$this->rapyd->load("datagrid");
$this->rapyd->load("datafilter");
$control = array(false, false);
$filter = new DataFilter("Filtro de Facturas");
$filter->fechad = new dateField("Desde", "fechad", "d/m/Y");
$filter->fechad->operator = ">=";
$filter->fechah = new dateField("Hasta", "fechah", "d/m/Y");
$filter->fechah->operator = "<=";
$filter->fechah->clause = $filter->fechad->clause = "where";
$filter->fechah->db_name = $filter->fechad->db_name = "fecha";
$filter->fechah->size = $filter->fechad->size = 10;
$filter->fechah->insertValue = $filter->fechad->insertValue = date('Y/m/d');
$filter->nombre = new inputField("Nombre", "nombre");
$filter->nombre->db_name = "concat(b.nombres,' ',b.apellidos)";
$filter->cedula = new inputField("Cédula/RIF", "cedula");
$filter->buttons("reset", "search");
$filter->build();
if (empty($filter->fechah->value) or $filter->fechah->value == date('Y/m/d')) {
$control[0] = true;
}
if (empty($filter->fechah->value) or $filter->fechah->value == date('Y/m/d')) {
$control[1] = true;
}
$grid = new DataGrid();
$grid->per_page = 10;
$grid->db->select("b.cedula, DATE_FORMAT('a.fecha', '%d/%m/%Y') fecha, a.cajero, a.caja, a.tipo, a.numero, a.fecha, if(b.nombres IS NULL,a.nombres,concat(b.nombres,' ',b.apellidos)) nombres, a.impuesto, a.gtotal, a.hora ");
$grid->db->from("viefac a");
$grid->db->join("club b", "a.cliente=b.cod_tar", "LEFT");
if ($control[0]) {
$grid->db->where('a.fecha>=NOW()');
}
if ($control[1]) {
$grid->db->where('a.fecha<=NOW()');
}
$grid->db->orderby('a.fecha, a.caja, a.numero');
$grid->column_detail("Caja", "caja", site_url("supermercado/factura/<#caja#>/<#cajero#>/<#fecha#>/<#numero#>"));
$grid->column("Cajero", "cajero");
$grid->column("Tipo", "tipo");
$grid->column("Numero", "numero");
$grid->column("Fecha", "fecha");
$grid->column("Cedula", "cedula");
$grid->column("Nombres", "nombres");
$grid->column("Impuesto", "impuesto");
$grid->column("Total", "gtotal");
$grid->build();
//echo $grid->db->last_query();
$data['lista'] = '';
$data['forma'] = $filter->output . $grid->output;
$data['titulo'] = $this->rapyd->get_head() . '<center><h2>CONSULTA DE FACTURAS DESDE LA FECHA ' . $filter->fechad->value . ' HASTA ' . $filter->fechah->value . '</h2></center>';
$this->layout->buildPage('ventas/view_ventas', $data);
}
示例8: filteredgrid
function filteredgrid()
{
//filteredgrid//
$this->rapyd->load("datafilter", "datagrid");
//filter
$filter = new DataFilter("Article Filter");
//****************************************************************************
//* NOTES 1:
//* After the new DataFilter() instruction the DF constructor call the DF *
//* sniff_action() methode witch it gives the GFID if it is not set. *
//* so $filter->gfid is knowed directly after this instantiation.... *
//****************************************************************************
$filter->db->select("articles.*, authors.*");
$filter->db->from("articles");
$filter->db->join("authors", "authors.author_id=articles.author_id", "LEFT");
$filter->title = new inputField("Title", "title");
$filter->ispublic = new dropdownField("Public", "public");
$filter->ispublic->option("", "");
$filter->ispublic->options(array("y" => "Yes", "n" => "No"));
$filter->buttons("reset", "search");
$filter->build();
//grid
//****************************************************************************
//* NOTES 2: *
//* The Standard acces link to DataEdit, affected to the colum_detail col *
//* (No support for back session because GFID in not into the URI). *
//* Don't use it for the test.... *
//****************************************************************************
$linkSTDshow = site_url('rapyd/sessiontest/dataedit/show/<#article_id#>');
$grid = new DataGrid("Article List", null, $filter->uri_array);
$grid->order_by("article_id", "asc");
$grid->per_page = 5;
$grid->use_function("substr");
$grid->column_detail("ID", "article_id", $linkSTDshow);
$grid->column_orderby("title", "title", "title");
$grid->column("body", "<substr><#body#>|0|4</substr>....");
$grid->column("Author", "<#firstname#> <#lastname#>");
//*********************************************************************************
//* NOTES 3: *
//* The differents acces link to DataEdit in diffenrent states, with GFID in URI *
//* DE is now compliance with GFID in URI, to generate right back_url *
//*********************************************************************************
$linkshow = anchor("rapyd/sessiontest/directdataedit/gfid/{$grid->gfid}/show/<#article_id#>", "Show");
$linkedit = anchor("rapyd/sessiontest/directdataedit/gfid/{$grid->gfid}/modify/<#article_id#>", "Modify");
$linkdelete = anchor("rapyd/sessiontest/directdataedit/gfid/{$grid->gfid}/delete/<#article_id#>", "Delete");
$linkcreate = anchor("rapyd/sessiontest/directdataedit/gfid/{$grid->gfid}/create", "Create");
//*********************************************************************
//* NOTES 4: *
//* URI to DataEdit Change: *
//* For me it is the most problematic thing of this solution *
//* the URI to DE need now a DF property value for that back session *
//* Work. The uri IS MORE COMPLICATE; *
//*
//*********************************************************************
$grid->column("Actions", $linkcreate . " - " . $linkshow . " - " . $linkedit . " - " . $linkdelete);
//****************************************************************
//* NOTES 5: *
//* We also need to add the GFID in the 'add' URI *
//****************************************************************
$grid->add("rapyd/sessiontest/directdataedit/gfid/{$grid->gfid}/create");
$grid->build();
$test = "GFID current Value => " . $filter->gfid . "<br>";
$data["crud"] = $test . $filter->output . $grid->output;
//endfilteredgrid//
$content["content"] = $this->load->view('rapyd/crud', $data, true);
$content["rapyd_head"] = $this->rapyd->get_head();
$content["code"] = highlight_code_file(THISFILE, "//filteredgrid//", "//endfilteredgrid//");
$this->load->view('rapyd/template_test', $content);
}
示例9: DataGrid
function importgext_grid()
{
//commentsgrid//
$this->rapyd->load("datagrid");
$numero = $this->uri->segment(4);
$grid = new DataGrid("Gastos en el Exterior", "importgext");
$grid->db->where("numero", $numero);
$modify = site_url("import/importa/importgext_edit/{$numero}/modify/<#codigo#>");
$delete = anchor("import/importa/importgext_edit/{$numero}/do_delete/<#codigo#>", "delete");
$grid->order_by("factura", "desc");
$grid->per_page = 6;
$grid->column_detail("Factura", "factura", $modify, "align=left");
$grid->column("Fecha", "fecha");
$grid->column("Descripción", "descrip");
$grid->column("Precio", "<number_format><#precio#>|2</number_format>", "align=right");
$grid->column("Importe", "<number_format><#importe#>|2</number_format>", "align=right");
$grid->column("borrar", $delete);
$grid->add("import/importa/importgext_edit/{$numero}/create");
$grid->build();
$head = $this->rapyd->get_head();
$this->loadiframe($grid->output, $head, "related");
//endcommentsgrid//
}
示例10: intval
function comments_grid()
{
//commentsgrid//
$this->rapyd->load("datagrid");
$art_id = intval($this->uri->segment(4));
$grid = new DataGrid("Comments", "comments");
$grid->db->where("article_id", $art_id);
$modify = site_url("inventario/crudsamples/comments_edit/{$art_id}/modify/<#comment_id#>");
$delete = anchor("inventario/crudsamples/comments_edit/{$art_id}/do_delete/<#comment_id#>", "delete");
$grid->order_by("comment_id", "desc");
$grid->per_page = 6;
$grid->column_detail("ID", "comment_id", $modify);
$grid->column("comment", "<substr><#comment#>|0|100</substr>....");
$grid->column("delete", $delete);
$grid->add("inventario/crudsamples/comments_edit/{$art_id}/create");
$grid->build();
$head = $this->rapyd->get_head();
$this->loadiframe($grid->output, $head, "related");
//endcommentsgrid//
}
示例11: DataGrid
function comments_grid()
{
//commentsgrid//
$this->rapyd->load("datagrid");
$numero = $this->uri->segment(4);
$grid = new DataGrid("Comments", "itfmay");
$grid->db->where("numero", $numero);
$modify = site_url("import/crudsamples/comments_edit/{$numero}/modify/<#codigo#>");
$delete = anchor("import/crudsamples/comments_edit/{$numero}/do_delete/<#codigo#>", "delete");
$grid->order_by("codigo", "desc");
$grid->per_page = 6;
$grid->column_detail("Codigo", "codigo", $modify, "align=left");
$grid->column("Descripcion", "descrip");
$grid->column("Cant.", "cantidad", "align=right");
$grid->column("Frac.", "fraccion", "align=right");
$grid->column("Precio", "<number_format><#precio#>|2</number_format>", "align=right");
$grid->column("Importe", "<number_format><#importe#>|2</number_format>", "align=right");
$grid->column("borrar", $delete);
$grid->add("import/crudsamples/comments_edit/{$numero}/create");
$grid->build();
$head = $this->rapyd->get_head();
$this->loadiframe($grid->output, $head, "related");
//endcommentsgrid//
}