当前位置: 首页>>代码示例>>PHP>>正文


PHP DataGrid类代码示例

本文整理汇总了PHP中DataGrid的典型用法代码示例。如果您正苦于以下问题:PHP DataGrid类的具体用法?PHP DataGrid怎么用?PHP DataGrid使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DataGrid类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: filteredgrid2

 function filteredgrid2()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Cóodigo', 'nombre' => 'Nombre', 'rif' => 'Rif', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'Código', 'nombre' => 'Nombre', 'rif' => 'Rif'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "sprv");
     $filter = new DataFilter2($this->titp);
     $filter->nomi = new inputField("Número", "nomina");
     $filter->nomi->size = 15;
     //$filter->numero->clause="likerigth";
     $filter->cod_prov = new inputField("Proveedor", "cod_prov");
     $filter->cod_prov->rule = 'required';
     $filter->cod_prov->size = 5;
     $filter->cod_prov->append($bSPRV);
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . '/dataedit/show/<#nomina#>', '<str_pad><#nomina#>|8|0|STR_PAD_LEFT</str_pad>');
     $grid = new DataGrid("Lista de Deducciones de N&oacute;mina");
     $grid->db->select(array("nomina", "b.nombre", "SUM(monto)total"));
     $grid->db->from('retenomi');
     $grid->db->join('sprv b', 'retenomi.cod_prov = b.proveed', 'LEFT');
     $grid->db->groupby('nomina');
     $grid->db->orderby('nomina', 'desc');
     $grid->use_function('substr', 'str_pad');
     $grid->per_page = 20;
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Proveedor", "nombre", 'align="left"');
     $grid->column("Total", "<number_format><#total#>|2|,|.</number_format>", 'align="right"');
     $grid->add($this->url . "dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " {$this->titp} ";
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:34,代码来源:retenomi.php

示例2: index

 function index()
 {
     $this->rapyd->load("datagrid", "datafilter2");
     $filter = new DataFilter2("Filtro de " . $this->titp, 'horarios');
     $filter->id = new inputField("Id", "id");
     $filter->id->size = 10;
     $filter->id->clause = "likerigth";
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 10;
     $filter->codigo->clause = "likerigth";
     $filter->denomi = new inputField("Denominaci&oacute;n", "denomi");
     $filter->denomi->size = 10;
     $filter->denomi->clause = "likerigth";
     $filter->turno = new inputField("Turno", "turno");
     $filter->turno->size = 10;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<#id#>', '<#id#>');
     $grid = new DataGrid();
     $grid->order_by("codigo", "asc");
     $grid->per_page = 15;
     $grid->column("Id", $uri);
     $grid->column("C&oacute;ndigo", "codigo");
     $grid->column("Denomina&oacute;n", "denomi");
     $grid->column("Turno", "turno", "align='left'");
     $grid->column("Entrada", "entrada", "align='left'");
     $grid->column("Salida", "salida", "align='left'");
     $grid->add($this->url . "dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = "<h1>{$this->titp}</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:34,代码来源:horarios.php

示例3: detalles

 function detalles($codigo = NULL)
 {
     $this->rapyd->load("datagrid");
     $mSQL = "SELECT DATE_FORMAT(fecha, '%d/%m/%Y')as fecha,codigo,descri1,precio,costo,rela FROM rece WHERE codigo='{$codigo}'";
     $query = $this->db->query($mSQL);
     if ($query->num_rows() > 0) {
         $pdata = $query->row_array();
     }
     $grid = new DataGrid();
     $grid->db->select = array('codigo', 'descrip', 'cantidad', 'costo', 'monto', 'rendi');
     $grid->db->from('itrece');
     $grid->db->where('menu', $codigo);
     $grid->order_by("codigo", "asc");
     //$grid->per_page = 15;
     $uri = anchor("/hospitalidad/agregarrec/mdetalle/{$codigo}/<#codigo#>/modify", '<#codigo#>');
     $grid->column("C&oacute;digo", $uri);
     $grid->column("Descripci&oacute;n", "descrip");
     $grid->column("Cantidad", "cantidad", "align='right'");
     $grid->column("Rendimiento", "rendi", "align='center'");
     $grid->column("Costo", "costo", "align='right'");
     $grid->column("Monto", "monto", "align='right'");
     $grid->add("hospitalidad/agregarrec/mdetalle/{$codigo}/create");
     $grid->build();
     $pdata['items'] = $grid->output;
     $data['content'] = $this->load->view('view_agrecetas', $pdata, true);
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = '<h1>Agregar Receta</h1>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:29,代码来源:agregarrec.php

示例4: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro por C&oacute;digo", 'rete');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 15;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('finanzas/rete/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Retenciones");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 20;
     $grid->column("C&oacute;digo", $uri);
     $grid->column("Pago de", "activida");
     $grid->column("Base Imponible", "base1");
     $grid->column("Porcentaje de Retenci&oacute;n", "tari1");
     $grid->column("Para pagos mayores a", "pama1");
     $grid->column("Tipo", "tipo");
     $grid->add("finanzas/rete/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Retenciones</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:26,代码来源:rete.php

示例5: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataFilter("Filtro de Transferencias", "stra");
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->numero->size = 15;
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->size = 12;
     $filter->envia = new inputField("Envia", "envia");
     $filter->envia->size = 12;
     $filter->recibe = new inputField("Recibe", "recibe");
     $filter->recibe->size = 12;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('supermercado/stra/dataedit/show/<#numero#>', '<#numero#>');
     $grid = new DataGrid("Lista de transferencias");
     $grid->order_by("numero", "desc");
     $grid->per_page = 5;
     $grid->use_function("substr");
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "align='center'");
     $grid->column("Env&iacute;a", "envia", "envia");
     $grid->column("Recibe", "recibe");
     $grid->column("Observaci&oacute;n", "observ1");
     //echo $grid->db->last_query();
     $grid->add("supermercado/stra/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Transferencias</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:32,代码来源:stra.php

示例6: Load

 public function Load()
 {
     $eUsuario = unserialize($_SESSION['eUsuario']);
     if ($eUsuario == null) {
         die;
     }
     $sPage = "index.php?Page=BBImprimirr&Action=";
     $lVars['usuario'] = $eUsuario->Apellidos . ', ' . $eUsuario->Nombres;
     $oCelularBBMod = new CelularBBMod();
     $oUbicacionMod = new UbicacionMod();
     $CelID = $_SESSION["sCelID"];
     $FechaMax = $_GET["max"];
     $FechaMin = $_GET["min"];
     $oCelular = $oCelularBBMod->GetCelulaByrID($CelID);
     $lVars['persona'] = $oCelular->Apellidos . ', ' . $oCelular->Nombres;
     $lVars['celular'] = $oCelular->Numero;
     $lVars['imei'] = $oCelular->IMEI;
     $lVars["btnImprimir"] = $this->oHtml->button("btnImprimir", "btnPrincipal", "Imprimir", array('onclick', "window.print();"));
     $dsUbicaciones = $oUbicacionMod->ListarUbicaciones($CelID, $FechaMax, $FechaMin);
     $dgView = new DataGrid($dsUbicaciones, '', 'DataGridA');
     $dgView->lCabecera = array(array('12%', 'Fecha'), array('40%', 'Direccion'), array('12%', 'Distrito'), array('12%', 'Ciudad'), array('12%', 'Departamento'), array('12%', 'Pais'));
     $dgView->lCampos = array(array('d', 'Fecha'), array('d', 'Calle'), array('d', 'Distrito'), array('d', 'Ciudad'), array('d', 'Departamento'), array('d', 'Pais'));
     $lVars['dgUbicaciones'] = $dgView->Imprimir();
     $lVars['Ajax'] = $this->oAjax->ImprimirJs();
     $this->lView->show($this->lPage, $lVars);
 }
开发者ID:ColliderTD,项目名称:geopd,代码行数:26,代码来源:BBImprimirCon.php

示例7: index

 function index()
 {
     $this->rapyd->load("datagrid", "datafilter");
     $this->datasis->modulo_id(715, 1);
     $filter = new DataFilter("Filtro de noco");
     $filter->db->select("codigo,tipo,nombre,CONCAT_WS('',observa1,observa2 ) AS observa");
     $filter->db->from('noco');
     $filter->nombre = new inputField("Nombre", "nombre");
     $filter->nombre->size = 40;
     //$filter->status = new dropdownField("Status", "tipo");
     //$filter->status->option("S","Semanal");
     //$filter->status->option("Q","Quincenal");
     //$filter->status->option("M","Mensual");
     //$filter->status->option("O","Otro");
     //$filter->status->style='width:100px';
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/noco/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid();
     $grid->order_by("codigo", "asc");
     $grid->per_page = 15;
     $grid->column("C&oacute;digo", $uri);
     //$grid->column("T&iacute;tulo","nombre");
     //$grid->column("Observaci&oacute;n","observa");
     //$grid->column("Tipo" ,"tipo" ,"align='center'");
     $grid->add("nomina/noco/dataedit/create");
     $grid->build();
     //echo $grid->db->last_query();
     $data['content'] = $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = '<h1>Contratos</h1>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:33,代码来源:noco.php

示例8: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter2("", 'carg');
     $filter->cargo = new inputField("C&oacute;digo", "cargo");
     $filter->cargo->size = 3;
     $filter->cargo->clause = "likerigth";
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->cargo->clause = "likerigth";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/carg/dataedit/show/<raencode><#cargo#></raencode>', '<#cargo#>');
     $grid = new DataGrid("");
     $grid->order_by("cargo", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("Cargo", $uri, "cargo");
     $grid->column_orderby("Descripci&oacute;n", "descrip", "descrip", "align='left'NOWRAP");
     $grid->column_orderby("Sueldo", "<number_format><#sueldo#>|2|,|.</number_format>", "sueldo", "align='right'     ");
     $grid->column_orderby("Estructura Administrativa", "codigoadm", "codigoadm", "align='left'      ");
     $grid->column_orderby("Codigo Presupuestario", "codigopres", "codigopres", "align='left'      ");
     $grid->column_orderby("F. Financiamiento", "fondo", "fondo", "align='left'      ");
     $grid->add("nomina/carg/dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "Cargos";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:32,代码来源:carg.php

示例9: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro de Tarifas Telef&oacute;nicas", 'tari');
     $filter->gr_desc = new inputField("C&oacute;digo", "serial");
     $filter->gr_desc->size = 15;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('hospitalidad/taritele/dataedit/show/<#serial#>', '<#serial#>');
     $grid = new DataGrid("Lista de Tarifas Telef&oacute;nicas");
     $grid->order_by("serial", "asc");
     $grid->per_page = 7;
     $grid->column("C&oacute;digo", $uri);
     $grid->column("Descripci&oacute;n", "descrip", "descrip");
     $grid->column("Banda", "banda");
     $grid->column("Pulso", "pulso");
     $grid->column("Tarifa 1", "tarifa1");
     $grid->column("Tarifa2", "tarifa2");
     $grid->add("hospitalidad/taritele/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Tarifas Telef&oacute;nicas</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:26,代码来源:taritele.php

示例10: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid", "dataobject");
     $filter = new DataFilter("", "contribu");
     $filter->codigo = new inputField("C&oacute;digo", 'codigo');
     $filter->nombre = new inputField("Nombre", 'nombre');
     $filter->rifci = new inputField("RIF / C&eacute;dula", 'rifci');
     $filter->nacionali = new inputField("Nacionalidad", 'nacionali');
     $filter->nacionali->option('', '');
     $filter->nacionali->option('VENEZOLANA', 'VENEZOLANA');
     $filter->nacionali->option('EXTRANJERA', 'EXTRANJERA');
     $filter->direccion = new inputField("Direcci&oacute;n", 'direccion');
     $filter->telefono = new inputField("Telefono", 'telefono');
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#codigo#></raencode>', '<#codigo#>');
     $grid = new DataGrid("");
     $grid->order_by("codigo ");
     $grid->per_page = 40;
     $grid->column_orderby("C&oacute;digo", $uri, "codigo");
     $grid->column_orderby("Nombre", "nombre", "nombre", "align='left'    ");
     $grid->column_orderby("Nacionalidad", "nacionali", "numcuent", "align='left'    ");
     $grid->column_orderby("RIF/C&eacute;dula", "rifci", "cedula", "align='left'     ");
     $grid->column_orderby("Direcci&oacute;n", "direccion", "direccion", "align='left'    ");
     $grid->column_orderby("Telefono", "telefono", "direccion", "align='left'    ");
     $grid->add($this->url . "dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "{$this->titp}";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:35,代码来源:contribu.php

示例11: detalles

 function detalles($control = NULL)
 {
     $this->rapyd->load("datagrid");
     $mSQL = "SELECT * FROM scst WHERE control='{$control}'";
     $query = $this->db->query($mSQL);
     if ($query->num_rows() > 0) {
         $pdata = $query->row_array();
     }
     $grid = new DataGrid();
     $grid->db->select = array('codigo', 'descrip', 'cantidad', 'costo', 'importe');
     $grid->db->from('itscst');
     $grid->db->where('control', $control);
     $grid->order_by("codigo", "desc");
     //$grid->per_page = 15;
     $uri = anchor("/compras/agregar/mdetalle/{$control}/modify/<#id#>", '<#codigo#>');
     $grid->column("C&oacute;digo", $uri);
     $grid->column("Descripci&oacute;n", "descrip");
     $grid->column("Cantidad", "cantidad", "align='right'");
     $grid->column("Precio", "costo", "align='right'");
     $grid->column("Importe", "importe", "align='right'");
     $grid->add("compras/agregar/mdetalle/{$control}/create");
     $grid->add("compras/agregar/encab/modify/{$control}/", 'Modificar encabezado');
     $grid->build();
     $pdata['items'] = $grid->output;
     $data['content'] = $this->load->view('view_agcompras', $pdata, true);
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = '<h1>Agregar Art&iacute;culos</h1>';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:29,代码来源:agregar.php

示例12: createComponentDataGrid

 /**
  * Component factory.
  * @see Nette/ComponentContainer#createComponent()
  */
 protected function createComponentDataGrid($name)
 {
     $grid = new DataGrid();
     $grid->bindDataTable(dibi::getConnection()->dataSource('SELECT
       authorId as id,
       name,
       surname,
       class,', Model::sqlClassName(Model::getSchoolYear()) . 'as classMark,
       (SELECT COUNT(workId) FROM [works] WHERE author=authorId) as sum                        
       FROM [authors]
     '));
     $grid->addColumn('name', 'Jméno');
     $grid->addColumn('surname', 'Příjmení')->addDefaultSorting('asc');
     $grid->addColumn('class', 'Maturita')->getCellPrototype()->style('text-align: center;');
     $grid->addColumn('classMark', 'Třída')->getCellPrototype()->style('text-align: right;');
     $grid->addColumn('sum', 'Počet prací')->getCellPrototype()->style('text-align: right;')->class('pages');
     $grid->addActionColumn('Akce');
     $grid->keyName = 'id';
     $grid->addAction('Smazat', 'delete!', NULL, FALSE, DataGridAction::WITH_KEY);
     $grid['name']->addFilter();
     $grid['surname']->addFilter();
     $grid['class']->addSelectboxFilter();
     $grid['classMark']->addSelectboxFilter();
     $grid['sum']->addSelectboxFilter();
     $grid->multiOrder = FALSE;
     $grid->itemsPerPage = $this->getCookiesItemsCount(15);
     $renderer = $grid->getRenderer();
     $renderer->paginatorFormat = '%label% %input% z %count%';
     $renderer->infoFormat = 'Autoři %from%. - %to%. z %count% | Zobrazit: %selectbox% | %reset%';
     $renderer->onRowRender[] = array($this, 'OnRowRendered');
     //$grid->rememberState = TRUE;
     $this->addComponent($grid, $name);
     return;
 }
开发者ID:xixixao,项目名称:chytrapalice,代码行数:38,代码来源:AuthorList.php

示例13: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     //		$this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro por Expediente", "bi_terreno");
     $filter->expediente = new inputField("Numero expediente", "expediente");
     $filter->expediente->size = 20;
     $filter->denominacion = new inputField("Denominaci&oacute;n", "denominacion");
     $filter->denominacion->size = 20;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('bienes/bi_terreno/dataedit/show/<#id#>', '<#id#>');
     $grid = new DataGrid("Lista de terrenos");
     $grid->order_by("expediente", "asc");
     $grid->per_page = 20;
     $grid->column("Id", $uri, "align='center'");
     $grid->column("Expediente", "expediente", "align='center'");
     $grid->column_orderby("Est.Propietario", "est_propietario", "est_propietario", "align='left'");
     $grid->column_orderby("Denominaci&oacute;n", "denominacion", "denominacion");
     //		$grid->column_orderby("Uso","uso" ,"uso"                    ,"align='center'");
     //		$grid->column_orderby("Estado"          ,"estado","estado"                     ,"align='center'");
     $grid->column_orderby("Municipio", "municipio", "municipio", "align='center'");
     $grid->column_orderby("Direccion", "direccion", "direccion", "align='left'");
     $grid->add("bienes/bi_terreno/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "Terrenos";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:30,代码来源:bi_terreno.php

示例14: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("dataform", "datagrid");
     $modbus = array('tabla' => 'usuario', 'columnas' => array('us_codigo' => 'C&oacute;digo', 'us_nombre' => 'Nombre'), 'filtro' => array('us_nombre' => 'nombre'), 'retornar' => array('us_codigo' => 'usuario'), 'titulo' => 'Buscar Usuario');
     $filter = new DataForm('/supervisor/trabajo/filteredgrid/search/osp');
     $filter->mes = new dateonlyField("Mes", "mes", 'm/Y');
     $filter->mes->clause = "where";
     $filter->mes->operator = "=";
     $filter->mes->size = 8;
     $filter->mes->dbformat = 'Ym';
     $filter->mes->insertValue = date("Y-m-d");
     $filter->usuario = new inputField("C&oacute;digo de usuario", "usuario");
     $filter->usuario->size = 11;
     $filter->usuario->append($this->datasis->modbus($modbus));
     $filter->submit('manda', 'Buscar');
     $filter->build_form();
     /*
     $mSQL="(SELECT fecha, count(*) AS cant FROM bitacora WHERE usuario='DAVID' GROUP BY fecha ) UNION
     (SELECT a.fecha, 0 AS cant FROM dim_tiempo AS a LEFT JOIN  bitacora as b ON a.fecha=b.fecha AND b.usuario='DAVID'
     WHERE a.fecha BETWEEN (SELECT MIN(fecha) FROM bitacora) AND (SELECT MAX(fecha) FROM bitacora) AND b.fecha IS NULL) ORDER BY fecha";
     */
     $content = '';
     if ($this->input->post('manda')) {
         $usr = $this->input->post('usuario') ? ' AND b.usuario="' . $this->input->post('usuario') . '"' : '';
         $fechad = '(SELECT MIN(fecha) FROM bitacora)';
         $fechah = '(SELECT MAX(fecha) FROM bitacora)';
         if ($this->input->post('mes')) {
             $acum = explode('/', $filter->mes->value);
             $fechad = $acum[1] . $acum[0] . '01';
             $fechah = $acum[1] . $acum[0] . '31';
         }
         $mSQL = "SELECT a.fecha, semana FROM dim_tiempo AS a LEFT JOIN  bitacora as b ON a.fecha=b.fecha {$usr} WHERE a.fecha BETWEEN {$fechad} AND {$fechah} AND b.fecha IS NULL";
         //echo $mSQL;
         $sema = array('Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado', 'Domingo');
         $query = $this->db->query($mSQL);
         $data = array();
         foreach ($query->result() as $row) {
             $pasa = array();
             $pasa['fecha'] = $row->fecha;
             if ($row->semana > 5) {
                 $pasa['cant'] = $sema[$row->semana - 1];
             } else {
                 $pasa['cant'] = '<b>' . $sema[$row->semana - 1] . '</b>';
             }
             $data[] = $pasa;
         }
         $query->free_result();
         //grid
         $grid = new DataGrid("Lista de Bitacora", $data);
         $grid->per_page = 31;
         $grid->column("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>");
         $grid->column("Semana", "<#cant#>");
         $grid->build();
         $content = $grid->output;
     }
     $data['content'] = $filter->output . $content;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = ' Dias NO trabajados ';
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:60,代码来源:trabajo.php

示例15: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataFilter("", 'prof');
     $filter->codigo = new inputField("Codigo", "codigo");
     $filter->codigo->size = 20;
     $filter->codigo->maxlength = 8;
     $filter->profesion = new inputField("Profesion", "profesion");
     $filter->profesion->size = 20;
     $filter->profesion->maxlength = 40;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/prof/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("");
     $grid->per_page = 15;
     $grid->column_orderby("Codigo", $uri, "codigo");
     $grid->column_orderby("Profesiones", "profesion", "profesion", "align='left'NOWRAP");
     $grid->add("nomina/prof/dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['title'] = "Profesiones";
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:27,代码来源:prof.php


注:本文中的DataGrid类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。