• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP DataForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: imprimir

 function imprimir()
 {
     $this->rapyd->load("dataform");
     $scli = array('tabla' => 'scli', 'columnas' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cliente'), 'titulo' => 'Buscar Cliente');
     $cboton = $this->datasis->modbus($scli);
     $filter = new DataForm('/tiketimp/index');
     $filter->title('Filtro de Impresion de Tiket');
     $filter->fechad = new dateonlyField("Desde", "fechad", 'Ymd');
     $filter->fechah = new dateonlyField("Hasta", "fechah", 'Ymd');
     $filter->fechad->clause = $filter->fechah->clause = "where";
     $filter->fechad->db_name = $filter->fechah->db_name = "fecha";
     //$filter->fechad->insertValue = $fechad;
     //$filter->fechah->insertValue = $fechah;
     $filter->fechah->size = $filter->fechad->size = 10;
     $filter->fechad->operator = ">=";
     $filter->fechah->operator = "<=";
     $filter->cliente = new inputField("Cliente", "cliente");
     $filter->cliente->size = 10;
     //$filter->cliente->insertValue=$cliente;
     $filter->cliente->maxlength = 10;
     $filter->cliente->append($cboton);
     $filter->button("btnsubmit", "Buscar", form2uri(site_url("/formatos/ver/TIKET/"), array('cliente', 'fechad', 'fechah')), $position = "BL");
     //
     $filter->build_form();
     $data['content'] = $filter->output;
     $data['title'] = "<h1>Imprimir</h1>";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:29,代码来源:tiketimp.php


示例2: index

 function index()
 {
     $mSCLId = array('tabla' => 'scli', 'columnas' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('cliente' => 'Código Cliente', 'nombre' => 'Nombre'), 'retornar' => array('cliente' => 'cod_cli'), 'titulo' => 'Buscar Cliente');
     $bsclid = $this->datasis->modbus($mSCLId);
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataForm("ventas/cobrocli/index/process");
     $filter->cliente = new inputField("Cliente", "cod_cli");
     $filter->cliente->rule = "required";
     $filter->cliente->append($bsclid);
     $filter->cliente->size = 10;
     $filter->caja = new inputField("Caja", "caja");
     $filter->caja->rule = "required";
     $filter->caja->group = "Selecci&oacute;n de caja";
     $filter->caja->size = 4;
     /*$filter->clave= new inputField("Clave", "clave");
     		$filter->clave->rule = "required";
     		$filter->clave->group = "Selecci&oacute;n de caja";
     		$filter->clave->type  = "password";
     		$filter->clave->size  =4;*/
     $filter->submit("btnsubmit", "aceptar");
     $filter->build_form();
     if ($filter->on_success()) {
     }
     $data['content'] = $filter->output;
     $data['title'] = "<h1>Cobro a clientes</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:28,代码来源:cobrocli.php


示例3: busca

 function busca()
 {
     $this->rapyd->load("dataform");
     $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Bancos');
     $bBANC = $this->datasis->p_modbus($mBANC, "banc");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'rif' => 'Rif', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre', 'rif' => 'Rif'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->p_modbus($mSPRV, "sprv");
     $filter = new DataForm($this->url . "busca/process");
     $filter->cod_prov = new inputField("Proveedor", "cod_prov");
     $filter->cod_prov->rule = 'required';
     $filter->cod_prov->size = 5;
     $filter->cod_prov->append($bSPRV);
     $filter->codbanc = new inputField("Banco", 'codbanc');
     $filter->codbanc->size = 5;
     $filter->codbanc->rule = "required";
     $filter->codbanc->append($bBANC);
     $filter->submit("btnsubmit", "Buscar");
     $filter->build_form();
     //exit('=============');
     if ($filter->on_success()) {
         $cod_prov = $filter->cod_prov->newValue;
         $codbanc = $filter->codbanc->newValue;
         redirect($this->url . "selecciona/" . raencode($cod_prov) . "/" . raencode($codbanc));
     }
     $data['content'] = $filter->output;
     $data['title'] = "Pago de Deducciones de n&oacute;mina";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:29,代码来源:pagorete.php


示例4: wol

 function wol()
 {
     if (!extension_loaded('sockets')) {
         show_error('La extension "sockets" no esta cargada, debe cargarla para poder usar estas opciones');
     }
     $this->load->library('rapyd');
     $this->rapyd->load('dataform');
     $form = new DataForm('supervisor/monitoreo/wol/process');
     $form->mac = new inputField('Direcci&oacute;n MAC', 'mac');
     $form->mac->append('Ejemplo: 00:01:02:03:04:05');
     $form->mac->rule = 'required|mac';
     $form->mac->maxlength = 17;
     $form->mac->size = 20;
     $form->submit('btnsubmit', 'Enviar');
     $form->build_form();
     if ($form->on_success()) {
         $mac = $form->mac->newValue;
         $rt = $this->_wol($mac);
         if (!$rt) {
             $form->error_string = $this->error;
             $form->build_form();
             $salida = $form->output . br();
         } else {
             $salida = $form->output . br() . 'Se&ntilde;al enviada satisfactoriamente';
         }
     } else {
         $salida = $form->output;
     }
     $this->rapyd->jquery[] = '$(".inputnum").numeric(".");';
     $data['content'] = $salida;
     $data['title'] = heading('Envio de se&ntilde;al de encendido por LAN');
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:34,代码来源:monitoreo.php


示例5: carga

 function carga()
 {
     $this->rapyd->load("dataform");
     $form = new DataForm("sincro/cargasinv/carga/procesa");
     $form->title('Cargar Archivo de Productos (*.txt)');
     $form->archivo = new uploadField("Archivo", "archivo1");
     $form->archivo->upload_path = $this->upload_path;
     $form->archivo->allowed_types = "TXT";
     $form->archivo->delete_file = false;
     $form->archivo->rule = "required";
     $form->archivo->file_name = 'precios.txt';
     $form->submit("btnsubmit", "Cargar");
     $form->build_form();
     if ($form->on_success()) {
         set_time_limit(600);
         $nombre = $form->archivo->upload_data['file_name'];
         $dir = './uploads/archivos/' . $nombre;
         $msg = 'Carga &Eacute;xitosa';
         redirect("sincro/cargasinv/procesa/{$nombre}");
         //$this->procesa();
     }
     $data['content'] = $form->output;
     $data['title'] = "<h1>Actualizaci&oacute;n de Inventario</h1>";
     $data["head"] = script("jquery.pack.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:26,代码来源:cargasinv.php


示例6: 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


示例7: cargazip

 function cargazip()
 {
     set_time_limit(600);
     $this->rapyd->load('dataform');
     $this->load->library('Sqlinex');
     $form = new DataForm("cargasarch/cargazip/process");
     $form->upl = new uploadField("Archivo Zip", "arch");
     $form->upl->upload_path = $this->dir;
     $form->upl->max_size = 6000;
     $form->upl->allowed_types = "zip";
     $form->submit("btnsubmit", "Cargar");
     $form->build_form();
     $msg = '';
     if ($form->on_success()) {
         $nombre = $form->upl->upload_data['file_name'];
         $rt = $this->_cargazip($nombre);
         if (!empty($rt)) {
             $form->error_string = $rt;
             $form->build_form();
         } else {
             $msg = '<p>Carga completada</p>';
         }
     }
     $data['content'] = $form->output . $msg;
     $data['title'] = '<h1>Cargas de Zip</h1>';
     $data['script'] = '';
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:29,代码来源:cargasarch.php


示例8: index

 function index()
 {
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $anio = $this->uri->segment(4);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $filter = new DataForm('ventas/vendedoresanuales');
     $filter->title('Filtro de Ventas Anuales');
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->rule = "max_length[4]";
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('ventas/vendedoresanuales /index'), array('anio')), $position = "BL");
     $filter->build_form();
     $grafico = open_flash_chart_object(760, 300, site_url("ventas/vendedoresanuales/grafico/{$anio}/"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . "<h1>Ventas</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:27,代码来源:anuales.php


示例9: index

 function index()
 {
     $this->rapyd->load('dataform');
     $this->load->helper('openflash');
     $dolar = $this->datasis->dameval("SELECT valor FROM valores WHERE nombre='dolar'");
     $filter = new DataForm("inventario/cambioprecio/consulta/");
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('¿Desea cambiar el precio de sus art&iacute;culos en el inventario seg&uacute;n el precio del d&oacute;lar?');
     $filter->dolar = new inputField("Precio del D&oacute;lar", "dolar");
     $filter->dolar->size = 12;
     $filter->dolar->maxlength = 10;
     $filter->dolar->insertValue = $dolar;
     $filter->desc2 = new inputField("Descuento Precio2", "desc2");
     $filter->desc2->size = 12;
     $filter->desc2->maxlength = 10;
     $filter->desc2->insertValue = '3';
     $filter->desc3 = new inputField("Descuento Precio3", "desc3");
     $filter->desc3->size = 12;
     $filter->desc3->maxlength = 10;
     $filter->desc3->insertValue = '5';
     $filter->desc4 = new inputField("Descuento Precio4", "desc4");
     $filter->desc4->size = 12;
     $filter->desc4->maxlength = 10;
     $filter->desc4->insertValue = '7';
     $filter->button("btnsubmit", "Aceptar", form2uri(site_url('inventario/cambioprecio/cambio'), array('dolar', 'desc2', 'desc3', 'desc4')), $position = "BL");
     $filter->build_form();
     $data['content'] = $filter->output;
     $data['head'] = $this->rapyd->get_head();
     $data['title'] = "<h1>Cambio de Precio</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:31,代码来源:cambioprecio.php


示例10: index

 function index()
 {
     $this->datasis->modulo_id($this->modulo, 1);
     $this->rapyd->load("datagrid", "dataform", "fields");
     $control = $this->uri->segment(4);
     $checkbox = '<input type="checkbox" name="genera[]" value="<#modulo#>" CHECKED>';
     $grid = new DataGrid('Seleccione los m&oacute;dulos que desea generar');
     $grid->db->select('modulo, descripcion');
     $grid->db->from('`reglascont`');
     $grid->db->groupby('modulo');
     $grid->db->orderby('modulo,regla');
     $grid->column("M&oacute;dulo", "modulo");
     $grid->column("Descripci&oacute;n", "descripcion");
     $grid->column('Generar', $checkbox, 'align="center"');
     $grid->build();
     $form = new DataForm('contabilidad/generar/procesar');
     $form->title('Rango de fecha para la Generaci&oacute;n');
     $form->fechai = new dateonlyField("Fecha Desde", "fechai", "d/m/Y");
     $form->fechaf = new dateonlyField("Fecha Hasta", "fechaf", "d/m/Y");
     $form->fechaf->size = $form->fechai->size = 10;
     $form->fechai->insertValue = $this->input->post('fechai') ? $this->input->post('fechai') : date("Ymd");
     $form->fechaf->insertValue = $this->input->post('fechaf') ? $this->input->post('fechaf') : date("Ymd");
     $form->tabla = new containerField('tabla', $grid->output);
     if ($control) {
         $form->control = new containerField('control', 'Contabilidad Generada');
     }
     //$form->submit("btn_submit","Generar Depurado");
     $form->build_form();
     $data['script'] = "<script type='text/javascript'>\n\t\tvar handlerFunc = function(t) {\n\t\t\tdocument.getElementById('preloader').style.display='none';\n\t\t\tnew Effect.Opacity('contenido', {duration:0.5, from:0.3, to:1.0});\n\t\t\talert(t.responseText);\n\t\t}\n\n\t\tvar errFunc = function(t) {\n\t\t\tdocument.getElementById('preloader').style.display='none';\n\t\t\tnew Effect.Opacity('contenido', {duration:0.5, from:0.3, to:1.0});\n\t\t\talert('Error ' + t.status + ' -- ' + t.statusText);\n\t\t}\n\n\t\tfunction generar() {\n\t\t\tnew Effect.toggle('preloader', 'appear');\n\t\t\tnew Effect.Opacity('contenido', {duration:0.5, from:1.0, to:0.3});\n\t\t\tnew Ajax.Request('" . site_url('contabilidad/generar/procesar') . "',{\n\t\t\t method: 'post',\n\t\t\t parameters : Form.serialize('df1'),\n\t\t\t onSuccess:handlerFunc,\n\t\t\t onFailure:errFunc});\n\t\t}\n\t\t</script>";
     $data['extras'] = "<div id='preloader' style='display: none;\tposition:absolute; left:40%; top:40%; font-family:Verdana, Arial, Helvetica, sans-serif;'>\n\t\t\t<center>" . image("loading4.gif") . "<br>" . image("loadingBarra.gif") . "<br>\n\t\t\t<b>Generando . . . </b>\n\t\t\t</center>\n\t\t</div>";
     $data['content'] = $form->output . "<input type=button value='Generar' onclick='generar()'>";
     $data["head"] = $this->rapyd->get_head() . script("prototype.js") . script("scriptaculous.js") . script("effects.js");
     $data['title'] = "<h1>Generar Contabilidad</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:35,代码来源:generar.php


示例11: index

 function index()
 {
     $this->rapyd->load('dataform', 'datagrid');
     $form = new DataForm("supermercado/cupones/index/process");
     $form->fecha = new dateonlyField("Fecha", "fecha", 'd/m/Y');
     $form->fecha->insertValue = date("Y-m-d");
     $form->fecha->size = 11;
     $form->fecha->rule = "required";
     $form->fecha->maxlength = 11;
     $form->fecha->rule = "trim";
     /*$form->monto= new inputField("Monto por cupon", "monto");
     		$form->monto->size = 15;
     		$form->monto->rule = "required"; 
       		$form->monto->insertValue = $this->datasis->traevalor('FMAYCUPON');
     		*/
     $form->caja = new dropdownField("Caja", "ipcaj");
     $form->caja->rule = "required";
     $form->caja->options("SELECT caja AS value, caja FROM caja ORDER BY caja");
     $form->submit("reset", "Resetear");
     $form->submit("btnsubmit", "Buscar");
     $form->build_form();
     $ggri = '';
     if ($form->on_success()) {
         $mSQL = "SELECT caja,cliente, gtotal,numero FROM viefac WHERE fecha={$form->fecha->newValue} AND caja='{$form->caja->newValue}'";
         //echo $mSQL;
         $query = $this->db->query($mSQL);
         $cupones = 0;
         $facturas = array();
         if ($query->num_rows() > 0) {
             foreach ($query->result() as $row) {
                 if (array_key_exists($row->numero, $facturas)) {
                     $facturas[$row->numero] += $row->gtotal;
                 } else {
                     $facturas[$row->numero] = $row->gtotal;
                 }
                 /*$pivocli='';
                 		$monto=0;
                 		foreach ($query->result() as $row){
                 			if ($pivocli!=$row->cliente){
                 				$cupones+=floor($monto/$form->monto->newValue);
                 				$pivocli=$row->cliente;
                 				$monto=0;
                 			}
                 			$monto+=$row->gtotal;
                 			
                 		}*/
             }
         }
         $monto = $this->datasis->traevalor('FMAYCUPON');
         foreach ($facturas as $key => $value) {
             $cupones += round($facturas[$key] / $monto, 0);
         }
         $ggri = "Fueron entregados <b>{$cupones}</b> cupones";
     }
     $data['content'] = $form->output . $ggri;
     $data['title'] = "<h1>Tikes repartidos</h1>";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:59,代码来源:cupones.php


示例12: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load('dataform', 'datagrid');
     $this->load->library('encrypt');
     $filter = new DataForm('ejecutasql/filteredgrid/process');
     $filter->sql = new textareaField('', 'sql');
     $filter->sql->cols = 90;
     $filter->sql->rows = 9;
     $filter->sql->rule = 'required';
     $filter->submit('btnsubmit', 'Ejecutar');
     $filter->build_form();
     $salida = '';
     if ($filter->on_success()) {
         $data = array();
         $mSQL = $filter->sql->value;
         $link = @mysql_connect($this->db->hostname, $this->db->username, $this->db->password) or die('Error de coneccion');
         mysql_select_db($this->db->database, $link) or die('Base de datos no seleccionable');
         $result = mysql_query($mSQL, $link);
         if (!$result) {
             $salida = mysql_errno($link) . ": " . mysql_error($link);
         } else {
             if (is_resource($result)) {
                 $num_rows = mysql_num_rows($result);
                 $afectados = 0;
             } elseif (is_bool($result)) {
                 $num_rows = 0;
                 $afectados = mysql_affected_rows();
             } else {
                 $num_rows = 0;
                 $afectados = 0;
             }
             if ($num_rows > 0) {
                 $colunas = mysql_num_fields($result);
                 while ($row = mysql_fetch_assoc($result)) {
                     $data[] = $row;
                 }
                 $grid = new DataGrid("Filas : {$num_rows}, Columnas : {$colunas} ,Afectados :{$afectados}", $data);
                 $grid->per_page = 100000;
                 foreach ($data[0] as $campos => $value) {
                     $grid->column($campos, $campos);
                 }
                 $grid->build();
                 $salida = $grid->output;
                 if (stristr($mSQL, 'SELECT')) {
                     $mSQL2 = $this->encrypt->encode($mSQL);
                     $salida .= "<form action='/../../proteoerp/xlsauto/repoauto2/'; method='post'>\n \t\t\t\t\t\t<input size='100' type='hidden' name='mSQL' value='{$mSQL2}'>\n \t\t\t\t\t\t<input type='submit' value='Descargar a Excel' name='boton'/>\n \t\t\t\t\t\t</form>";
                 }
             } elseif ($afectados > 0) {
                 $salida = "Filas afectadas {$afectados}";
             } else {
                 $salida = 'Esta consulta no genero resultados';
             }
         }
     }
     $data['content'] = $filter->output . $salida;
     $data['title'] = heading('Consulta SQL');
     $data['head'] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:59,代码来源:ejecutasql.php


示例13: mensuales

 function mensuales($anio = '', $mes = '')
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if ($this->uri->segment(4)) {
         $mes = $this->uri->segment(4);
     } elseif (isset($_POST['mes'])) {
         $mes = $_POST['mes'];
     }
     if ($this->uri->segment(5)) {
         $anio = $this->uri->segment(5);
     } elseif (isset($_POST['anio'])) {
         $anio = $_POST['anio'];
     }
     if (empty($mes)) {
         $mes = date("m");
     }
     if (empty($anio)) {
         $anio = date("Y");
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $filter = new DataForm('nomina/gprestamos/mensuales');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de Prestamos mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('nomina/gprestamos/mensuales/'), array('mes', 'anio')), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array("fecha", "DAYOFMONTH(fecha)AS dia", "SUM(monto)AS grantotal", "COUNT(*) AS numfac");
     $grid->db->select($select);
     $grid->db->from("pres ");
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->groupby("fecha");
     $grid->column("Dia", "dia", "align='left'");
     $grid->column("Total", "<number_format><#grantotal#>|2|,|.</number_format>", 'align=right');
     $grid->column("Cant. Prest", "numfac", 'align=right');
     $grid->totalizar('grantotal');
     $grid->build();
     $grafico = open_flash_chart_object(680, 350, site_url("nomina/gprestamos/gmensuales/{$mes}/{$anio}"));
     $data['content'] = $grafico;
     $data['content'] .= $filter->output . $grid->output;
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = $this->rapyd->get_head() . " Prestamos Mensuales ";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:59,代码来源:gprestamos.php


示例14: index

 function index()
 {
     $this->rapyd->load('datagrid2');
     $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 DataGrid2();
     $select = array('a.caja caja', "IFNULL(b.nombre,'N/A') nombre", 'a.cajero AS cajero', 'SUM(a.gtotal) AS monto');
     $cupon = floatval($this->datasis->traevalor('FMAYCUPON'));
     if ($cupon > 0) {
         $select[] = "SUM(TRUNCATE(a.gtotal/{$cupon},0)) AS cupones";
     } else {
         $select[] = '(0) AS  cupones';
     }
     $grid->db->select($select);
     $grid->db->from('posfact AS 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');
     $link = anchor("supermercado/poscuadre/concaja/<#caja#>/<#cajero#>/{$qfechai}", '<#caja#>');
     $grid->column('Caja', $link);
     $grid->column('Nombre', 'nombre');
     $grid->column('Cajero', 'cajero', 'align="center"');
     $grid->column('Cupones', 'cupones', 'align="center"');
     $grid->column('Monto', '<nformat><#monto#></nformat>', 'align="right"');
     $grid->totalizar('monto');
     $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&eacute;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);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:59,代码来源:poscuadre.php


示例15: GetConfigurationForm

 /**
  * Must return a DataForm object that will be used to draw a configuration form for this module.
  * @return DataForm object
  */
 public static function GetConfigurationForm()
 {
     $Form = new DataForm();
     $Form->AppendField(new DataFormField("ServerHost", FORM_FIELD_TYPE::TEXT, "API hostname", 1));
     $Form->AppendField(new DataFormField("Login", FORM_FIELD_TYPE::TEXT, "Reseller Login", 1));
     $Form->AppendField(new DataFormField("Password", FORM_FIELD_TYPE::TEXT, "Reseller Password", 1));
     return $Form;
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:12,代码来源:class.RegistryModule.php


示例16: index

 function index()
 {
     $this->rapyd->load('dataform', 'datatable', 'datagrid');
     $this->load->library('table');
     $base_process_uri = $this->rapyd->uri->implode_uri("base_uri", "gfid", "orderby");
     $filter = new DataForm($this->rapyd->uri->add_clause($base_process_uri, "search"));
     $filter->title('Elija una tabla');
     $filter->attributes = array('onsubmit' => 'is_loaded()');
     $filter->tabla = new dropdownField("Tabla", "tabla");
     $filter->tabla->option("pers", "Personal");
     $filter->tabla->option("nomina", "Nomina");
     $filter->tabla->option("sprv", "Proveedores");
     $filter->tabla->option("abonotros", "Abono Otros");
     $filter->tabla->clause = "";
     //$filter->obra = new dropdownField("Obra", "depto");
     //$filter->obra->db_name='depto';
     //$filter->obra->clause="where";
     //$filter->obra->option(" ","Todos");
     //$filter->obra->options("SELECT depto, descrip FROM dpto ORDER BY depto ");
     //$filter->obra->operator="=";
     //$filter->status = new dropdownField("Status","status");
     //$filter->status->option("","Todos");
     //$filter->status->option("A","Activos");
     //$filter->status->option("I","Inactivos");
     //$filter->status->style='width:100px';
     $filter->submit('btnsubmit', 'Descargar');
     $filter->build_form();
     if ($this->rapyd->uri->is_set("search")) {
         $table = $filter->tabla->newValue;
         $mSQL = "DESCRIBE {$table}";
         $query = $this->db->query($mSQL);
         if ($query->num_rows() > 0) {
             foreach ($query->result_array() as $row) {
                 $data[] = $row;
             }
         }
         function ractivo($field)
         {
             $data2 = array('name' => 'campos[]', 'id' => 'c' . $field, 'value' => $field, 'checked' => FALSE, 'style' => 'margin:5px');
             $retorna = form_checkbox($data2);
             return $retorna;
         }
         $grid = new DataGrid("Resultados", $data);
         $grid->use_function('ractivo', 'ucwords');
         $grid->column('Campos', '<ucwords><#Field#></ucwords>');
         $grid->column('Mostrar', "<ractivo><#Field#></ractivo>", 'align="center"');
         $grid->build();
         $tabla = $grid->output;
         $filter->build_form();
         $conten = $filter->output . form_open("nomina/rpers/crear/{$table}") . $tabla . form_submit('mysubmit', 'Generar') . form_close();
     } else {
         $conten = $filter->output;
     }
     $data['content'] = $conten;
     $data['title'] = heading('Reporte');
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:58,代码来源:rpers.php


示例17: deleteAction

 public function deleteAction()
 {
     $form = new DataForm();
     if ($form->isValidForDelete()) {
         $data = Data::findOrFail(Input::get("id"));
         $data->delete();
     }
     return Redirect::route($this->routeIndex);
 }
开发者ID:alejandromorg,项目名称:Inventario,代码行数:9,代码来源:DataController.php


示例18: mensuales

 function mensuales($anio = '', $mes = '')
 {
     $this->rapyd->load("datagrid2");
     $this->rapyd->load("dataform");
     $this->load->helper('openflash');
     if (isset($_POST['anio']) and empty($anio)) {
         $anio = $_POST['anio'];
     }
     if (isset($_POST['mes']) and empty($mes)) {
         $mes = $_POST['mes'];
     }
     if (empty($mes)) {
         redirect("compras/gcompras/anuales/{$anio}");
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $filter = new DataForm('compras/gcompras/mensuales');
     $filter->attributes = array('onsubmit' => "this.action='index/'+this.form.mes.value+'/'+this.form.anio.value+'/';return FALSE;");
     $filter->title('Filtro de Compras Mensuales');
     $filter->mes = new dropdownField("Mes/A&ntilde;o", "mes");
     for ($i = 1; $i < 13; $i++) {
         $filter->mes->option(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $filter->mes->size = 2;
     $filter->mes->style = '';
     $filter->mes->insertValue = $mes;
     $filter->anio = new inputField("A&ntilde;o", "anio");
     $filter->anio->in = 'mes';
     $filter->anio->size = 4;
     $filter->anio->insertValue = $anio;
     $filter->anio->maxlength = 4;
     $filter->button("btnsubmit", "Buscar", form2uri(site_url('compras/gcompras/mensuales'), array('anio', 'mes')), $position = "BL");
     $filter->build_form();
     $grid = new DataGrid2();
     $select = array("fecha", "DAYOFMONTH(fecha) as dia", "SUM(montonet*IF(tipo_doc='D', -1, 1)) AS grantotal", "SUM(credito*IF(tipo_doc='D', -1, 1)) as contado", "SUM(inicial*IF(tipo_doc='D', -1, 1)) as credito", "SUM(montotot*IF(tipo_doc='D',-1,1))AS subtotal", "SUM(montoiva*IF(tipo_doc='D',-1,1))AS impuesto", "COUNT(*) AS numfac");
     $grid->db->select($select);
     $grid->db->from("scst");
     $grid->db->where("tipo_doc <> ", 'X');
     $grid->db->where('fecha >= ', $fechai);
     $grid->db->where('fecha <= ', $fechaf);
     $grid->db->groupby("fecha");
     $grid->column("Dia", "dia");
     $grid->column("Sub-Total", "<number_format><#subtotal#>|2</number_format>", 'align=right');
     $grid->column("Impuesto", "<number_format><#impuesto#>|2</number_format>", 'align=right');
     $grid->column("Total", "<number_format><#grantotal#>|2</number_format>", 'align=right');
     $grid->column("Contado", "<number_format><#contado#>|2</number_format>", 'align=right');
     $grid->column("Credito", "<number_format><#credito#>|2</number_format>", 'align=right');
     $grid->column("N&uacute;mero", "numfac", 'align=right');
     $grid->totalizar('im 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP DataGenerator类代码示例发布时间:2022-05-23
下一篇:
PHP DataFilter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap