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


PHP DataFilter::build_form方法代码示例

本文整理汇总了PHP中DataFilter::build_form方法的典型用法代码示例。如果您正苦于以下问题:PHP DataFilter::build_form方法的具体用法?PHP DataFilter::build_form怎么用?PHP DataFilter::build_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataFilter的用法示例。


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

示例1: index

 function index()
 {
     $this->rapyd->load('datagrid', 'dataform', 'datafilter');
     $this->rapyd->uri->keep_persistence();
     $form = new DataFilter('Seleccione las fallas');
     foreach ($this->falla as $ind => $checkbox) {
         $id = 'f_' . $ind;
         $form->{$id} = new checkboxField($checkbox['nombre'], $id, '1');
         $form->{$id}->clause = '';
     }
     $form->submit('reset', 'Resetear');
     $form->submit('btnsubmit', 'Buscar');
     $form->build_form();
     $algo['falla'] = $this->falla;
     $algo['form'] =& $form;
     $salida = $this->load->view('view_fallas', $algo, true);
     if ($this->input->post('btnsubmit')) {
         $grid = new DataGrid('Lista de Productos');
         $grid->db->select = array('codigo', 'LEFT(descrip,20)AS descrip', 'margen1', 'margen2', 'margen3', 'margen4', 'base1', 'base2', 'base3', 'base4', 'precio1', 'precio2', 'precio3', 'precio4', 'id', 'existen', 'ultimo', 'pond');
         $grid->db->from('sinv');
         $grid->per_page = 15;
         $grid->order_by('existen', 'desc');
         foreach ($this->falla as $ind => $data) {
             $id = 'f_' . $ind;
             if ($this->input->post($id)) {
                 $grid->db->or_where($data['sql']);
             }
         }
         $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
         $link = anchor_popup('/inventario/sinv/dataedit/show/<#id#>', '<#codigo#>', $atts);
         $grid->column('C&oacute;digo', $link);
         $grid->column('Descripci&oacute;n', 'descrip');
         $grid->column('Margenes', '<ol><li><#margen1#></li><li><#margen2#></li><li><#margen3#></li><li><#margen4#></li></ol>');
         $grid->column('Bases', '<ol><li><#base1#></li><li><#base2#></li><li><#base3#></li><li><#base4#></li></ol>');
         $grid->column('Precios', '<ol><li><#precio1#></li><li><#precio2#></li><li><#precio3#></li><li><#precio4#></li></ol>');
         $grid->column('Costos', '<ul><li><b>Ultimo:</b><#ultimo#></li><li><b>Promedio:</b><#pond#></li></ul>');
         $grid->column_orderby('Existencia', 'existen', 'existen', 'align=\'right\'');
         $grid->build();
         //echo $grid->db->last_query();
         $salida .= $grid->output;
         $salida .= $grid->recordCount . ' Registros encontrados';
     }
     $data['content'] = $salida;
     $data['title'] = '<h1>Productos con fallas</h1>';
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:47,代码来源:fallas.php

示例2: index

 function index()
 {
     $this->rapyd->load("datagrid", 'dataform', 'datafilter');
     $this->rapyd->uri->keep_persistence();
     $form = new DataFilter("Seleccione las fallas");
     foreach ($this->falla as $ind => $checkbox) {
         $id = 'f_' . $ind;
         $form->{$id} = new checkboxField($checkbox['nombre'], $id, '1');
         $form->{$id}->clause = '';
     }
     $form->submit("reset", "Resetear");
     $form->submit("btnsubmit", "Buscar");
     $form->build_form();
     $algo['falla'] = $this->falla;
     $algo['form'] =& $form;
     $salida = $this->load->view('view_fallas', $algo, true);
     if ($this->input->post('btnsubmit')) {
         $grid = new DataGrid("Lista de Productos");
         $grid->db->select = array("codigo", "LEFT(descrip,20)AS descrip", "margen1", "margen2", "margen3", "margen4", "base1", "base2", "base3", "base4", "precio1", "precio2", "precio3", "precio4", "id", "existen", "ultimo", "pond");
         $grid->db->from('sinv');
         $grid->per_page = 15;
         foreach ($this->falla as $ind => $data) {
             $id = 'f_' . $ind;
             if ($this->input->post($id)) {
                 $grid->db->or_where($data['sql']);
             }
         }
         $link = anchor('/inventario/sinv/dataedit/show/<#id#>', '<#codigo#>');
         //$grid->column("C&oacute;digo",$link);
         $grid->column("C&oacute;digo", 'codigo');
         $grid->column("Descripci&oacute;n", "descrip");
         $grid->column("Margenes", "<ol><li><#margen1#></li><li><#margen2#></li><li><#margen3#></li><li><#margen4#></li></ol>");
         $grid->column("Bases", "<ol><li><#base1#></li><li><#base2#></li><li><#base3#></li><li><#base4#></li></ol>");
         $grid->column("Precios", "<ol><li><#precio1#></li><li><#precio2#></li><li><#precio3#></li><li><#precio4#></li></ol>");
         $grid->column("Costos", "<ul><li><b>Ultimo:</b><#ultimo#></li><li><b>Promedio:</b><#pond#></li></ul>");
         $grid->column("Existencia", "existen", "align='right'");
         $grid->build();
         //echo $grid->db->last_query();
         $salida .= $grid->output;
     }
     $data['content'] = $salida;
     $data['title'] = "<h1>Productos con fallas</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:45,代码来源:fallas.php


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