本文整理汇总了PHP中DataFilter::submit方法的典型用法代码示例。如果您正苦于以下问题:PHP DataFilter::submit方法的具体用法?PHP DataFilter::submit怎么用?PHP DataFilter::submit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataFilter
的用法示例。
在下文中一共展示了DataFilter::submit方法的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ódigo', $link);
$grid->column('Descripció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);
}
示例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ódigo",$link);
$grid->column("Código", 'codigo');
$grid->column("Descripció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);
}