} } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { $CodigoTP = get('CodigoTP'); if (get("metodo") == "FTipoProducto") { p_gf("FTipoProducto", $CN, $CodigoTP); TipoProductos("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "FTipoProducto") { p_gf("FTipoProducto", $CN, ""); TipoProductos("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); TipoProductos("Listado"); } }
} } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { $CodigoUsuario = get("CodigoUsuario"); if (get("metodo") == "FUsuario") { p_gf("FUsuario", $CN, $CodigoUsuario); Usuario("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "FUsuario") { p_gf("FUsuario", $CN, ""); Usuario("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); Productos("Listado"); } }
} } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { $CodigoTC = get('CodigoTC'); if (get("metodo") == "FCategoriaProducto") { p_gf("FCategoriaProducto", $CN, $CodigoTC); CategoriaProductos("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "FCategoriaProducto") { p_gf("FCategoriaProducto", $CN, ""); CategoriaProductos("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); Productos("Listado"); } }
return $valor; } } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { if (get("metodo") == "Entidades") { p_gf("Entidad", $CN, get('codEnt')); Productos("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "Entidades") { p_gf("Entidad", $CN, ""); Productos("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); Productos("Listado"); } }
function pro_sysform() { global $vConex; $sql = 'SELECT Codigo,Descripcion FROM sys_tabla WHERE Codigo = "' . post("Tabla") . '" '; $rg = fetch($sql); $codigo = $rg["Codigo"]; if ($codigo != "") { // WE(post("Tabla")); $vSQL = 'SELECT Codigo,Descripcion,TipoCampo,sys_tabla FROM sys_tabla_det WHERE sys_tabla = "' . post("Tabla") . '" '; $consulta = mysql_query($vSQL, $vConex); while ($r = mysql_fetch_array($consulta)) { $cod_sys_form_det = numerador("sys_form_det", 5, ""); $sql = 'INSERT INTO sys_form_det (Codigo,NombreCampo,Alias,TipoInput,TipoOuput,Form,Visible,TamanoCampo) VALUES ("' . $cod_sys_form_det . '","' . $r["Descripcion"] . '","' . $r["Descripcion"] . '","' . cmn($r["TipoCampo"]) . '","text","' . post("Codigo") . '","SI",130)'; xSQL($sql, $vConex); } p_gf("SysFomr1", $vConex, ""); } else { WE("La Tabla No existe" . post("Tabla")); } }
} } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { $CodigoAlmacen = get("CodigoAlmacen"); if (get("metodo") == "FAlmacen") { p_gf("FAlmacen", $CN, $CodigoAlmacen); IngresoProducto("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "FAlmacen") { p_gf("FAlmacen", $CN, ""); IngresoProducto("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); Productos("Listado"); } }
function pro_sysform() { global $vConex; $sql = 'SELECT Codigo,Descripcion FROM sys_tabla WHERE Codigo = "' . post("Tabla") . '" '; $rg = rGT($vConex, $sql); $codigo = $rg["Codigo"]; // WE($codigo); if ($codigo != "") { $vSQL = 'SELECT Codigo,Descripcion,TipoCampo,sys_tabla,AutoIncrement,Visible ' . 'FROM sys_tabla_det WHERE sys_tabla = "' . post("Tabla") . '" '; $consulta = mysql_query($vSQL, $vConex); while ($r = mysql_fetch_array($consulta)) { $ai = $r["AutoIncrement"]; $visible = $r["Visible"]; if ($visible == 0) { $vis = "NO"; } else { $vis = "SI"; } $cod_sys_form_det = numerador("sys_form_det", 9, "", $vConex); $sql = 'INSERT INTO sys_form_det (Codigo,NombreCampo,Alias,TipoInput,TipoOuput,Form,Visible,TamanoCampo,AutoIncrementador) VALUES ("' . $cod_sys_form_det . '",' . '"' . $r["Descripcion"] . '"' . ',"' . $r["Descripcion"] . '",' . '"' . cmn($r["TipoCampo"]) . '","text",' . '"' . post("Codigo") . '"' . ',"' . $vis . '",' . '130,' . ' "' . $ai . '")'; xSQL($sql, $vConex); } p_gf("SysFomr1", $vConex, ""); $sql = 'UPDATE sys_form set ' . 'FHCreacion = "' . date('y/m/d h:m:s') . '" ,' . 'FHActualizacion = "' . date('y/m/d h:m:s') . '" ,' . 'CtaSuscripcion =' . $_SESSION["CtaSuscripcion"]['string'] . ' ,' . 'UMiembro = ' . $_SESSION["UMiembro"]['string'] . ',' . 'UMiembro_Act = ' . $_SESSION["UMiembro"]['string'] . ',' . 'IpPublica = "' . getRealIP() . '",' . 'IpPrivada = "' . getRealIP() . '" ' . 'WHERE Codigo = "' . post("Codigo") . '"'; W(xSQL($sql, $vConex)); W("Codigo post " . post("Codigo")); detalleForm('detalle', post("Codigo")); } else { WE("La Tabla No existe" . post("Tabla")); } }
function startupload($archivos) { global $UsuarioEntidad, $entidadCreadora, $vConex; if ($UsuarioEntidad != null && $entidadCreadora != null && $vConex != null) { foreach ($archivos as $archivo) { if (protect(get("metodo")) == $archivo[1]) { switch ($archivo[0]) { case 'p_ga': p_ga($usuarioEntidad, $entidadCreadora, $vConex); break; case 'upload': $filedata = upload($usuarioEntidad, $entidadCreadora, $vConex); echo json_encode($filedata); break; case 'p_gf': p_gf($archivo[2], $archivo[3], $archivo[4]); break; default: break; } } } } else { W('Las Variables UsuarioEntidad,EntidadCreadora y vConex son requeridas'); } }
} } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { $CodigoProveedor = get("CodigoProveedor"); if (get("metodo") == "FProveedor") { p_gf("FProveedor", $CN, $CodigoProveedor); Proveedor("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "FProveedor") { p_gf("FProveedor", $CN, ""); Proveedor("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); Productos("Listado"); } }
} } function p_before($codigo) { } if (get("TipoDato") == "texto") { if (get("transaccion") == "UPDATE") { $CodigoCliente = get("CodigoCliente"); if (get("metodo") == "FCliente") { p_gf("FCliente", $CN, $CodigoCliente); Cliente("Listado"); } } if (get("transaccion") == "INSERT") { if (get("metodo") == "FCliente") { p_gf("FCliente", $CN, ""); Cliente("Listado"); } } if (get("transaccion") == "OTRO") { if (get("metodo") == "resgistra_usuario") { P_Registro(); } } } if (get("transaccion") == "DELETE") { if (get("metodo") == "Entidades") { DReg("ct_entidad", "Codigo", "'" . get("codEnt") . "'", $CN); Productos("Listado"); } }