function formEntrada($action, $esModificar) { $ot = getTemplate("AltaPerfil"); if (!$ot) { return false; } $modo = $esModificar ? "modsave" : "newsave"; $titulo = $esModificar ? _("Modificando perfil") : _("Nuevo perfil"); $cambios = array("TITULO" => $titulo, "VALUENOMBRE" => $this->getNombre(), "TEXTNOMBRE" => _("Nombre perfil"), "HIDDENDATA" => Hidden("id", $this->getId()), "ACTION" => "{$action}?modo={$modo}", "CADMINISTRACION" => gCheck($this->is("Administracion")), "CINFORMELOCAL" => gCheck($this->is("InformeLocal")), "CINFORMES" => gCheck($this->is("Informes")), "CPRODUCTOS" => gCheck($this->is("Productos")), "CPROVEEDORES" => gCheck($this->is("Proveedores")), "CSTOCKS" => gCheck($this->is("Stocks")), "CCOMPRAS" => gCheck($this->is("Compras")), "CCLIENTES" => gCheck($this->is("Clientes")), "CTPV" => gCheck($this->is("TPV")), "CB2B" => gCheck($this->is("B2B")), "CPEDIDOSVENTA" => gCheck($this->is("PedidosVenta")), "CVERSTOCKS" => gCheck($this->is("VerStocks")), "CPRECIOS" => gCheck($this->is("Precios")), "CVENTAS" => gCheck($this->is("Ventas")), "CFINANZAS" => gCheck($this->is("Finanzas")), "CCOBROS" => gCheck($this->is("Cobros")), "CPAGOS" => gCheck($this->is("Pagos")), "CCAJAGENERAL" => gCheck($this->is("CajaGeneral")), "CCAJATPV" => gCheck($this->is("CajaTPV")), "CPRESUPUESTOS" => gCheck($this->is("Presupuestos")), "CCOMPROBANTESCOMPRA" => gCheck($this->is("ComprobantesCompra")), "CCOMPROBANTESVENTA" => gCheck($this->is("ComprobantesVenta")), "CPROMOCIONES" => gCheck($this->is("Promociones")), "CKARDEX" => gCheck($this->is("Kardex")), "CAJUSTES" => gCheck($this->is("Ajustes")), "CVERAJUSTES" => gCheck($this->is("VerAjustes")), "CALMACEN" => gCheck($this->is("Almacen")), "CSAT" => gCheck($this->is("SAT")), "CSUSCRIPCION" => gCheck($this->is("Suscripcion")), "CSERVICIOS" => gCheck($this->is("Servicios")), "TADMINISTRACION" => _("Administración"), "TINFORMELOCAL" => _("Informe local"), "TINFORMES" => _("Informes"), "TPRODUCTOS" => _("Productos"), "TPROVEEDORES" => _("Proveedores"), "TSTOCKS" => _("Stocks"), "TCOMPRAS" => _("Compras"), "TCLIENTES" => _("Clientes"), "TTPV" => _("TPV"), "TB2B" => _("B2B"), "TPEDIDOSVENTA" => _("Pedidos"), "TVERSTOCKS" => _("Ver Stocks"), "TPRECIOS" => _("Precios"), "TVENTAS" => _("Ventas"), "TFINANZAS" => _("Finanzas"), "TCOBROS" => _("Cobros"), "TPAGOS" => _("Pagos"), "TCAJAGENERAL" => _("Caja General"), "TCAJATPV" => _("Caja TPV"), "TPRESUPUESTOS" => _("Presupuestos"), "TCOMPROBANTESCOMPRA" => _("Comprobantes Compra"), "TCOMPROBANTESVENTA" => _("Comprobantes Venta"), "TPROMOCIONES" => _("Promociones"), "TKARDEX" => _("Kardex"), "TAJUSTES" => _("Ajustes"), "TALMACEN" => _("Almacén"), "TVERAJUSTES" => _("Ver Ajustes"), "TSERVICIOS" => _("Servicios"), "TSAT" => _("SAT"), "TSUSCRIPCION" => _("Suscripción")); return $ot->makear($cambios); }
function main() { $this->PageSubtitle = "Send a Test Email"; include_once "ddtable_adm_emails.php"; Hidden("gp_page", "x_email"); $table =& $GLOBALS["AG"]["tables"]["adm_emails"]; $em = array("email_to" => CleanBox("email_to", "", false), "email_subject" => CleanBox("email_subject", "", false), "email_message" => CleanBox("email_message", "", false)); // If this is postback, process the email before putting // the boxes back up. // if ($em["email_to"]) { X_EMAIL_SEND($em); echo "<p>The email to " . $em["email_to"] . " has been accepted " . "by the email server, please check your email system " . "to see if the server has successfully sent the email.</p>" . "You may also " . HTMLE_A_STD("View Sent Emails", 'adm_emails') . " or " . HTMLE_A_STD("Send another email", 'x_email') . "</p>"; return; } // In this little trick we set "uino" to all of the columns // except the ones we are setting. foreach ($table["flat"] as $colname => $colinfo) { if ($colname == "email_to" || $colname == "email_subject" || $colname == "email_message") { continue; } $table["flat"][$colname]["uino"] = "Y"; } ?> <?php echo HTMLX_Errors(); ?> <?php echo ElementOut("msg", true); ?> <p>This is a very minimal page that can be used to verify that this system can send emails. Enter a valid address, subject, and short message below and then click on the [SEND] button.</p> <table> <?php echo $this->HTML_INPUTS($GLOBALS["AG"]["tables"]["adm_emails"], $em, "ins", true); ?> </table> <br> <br> <?php echo HTMLE_A_JS("formSubmit()", "Send Email Now"); ?> <?php }
function formClon($action, $lang = false, $volver = false) { $ot = getTemplate("ClonProducto"); if (!$ot) { return false; } $modo = "salvaclon"; $ListadoCombinado = genListadoCruzado($this->getId(), $this->get("IdTallaje")); $tieneserie = $this->get("Serie"); $incluidons = $this->get("Serie") == 1 ? "checked" : ""; $incluidolt = $this->get("Lote") == 1 ? "checked" : ""; $incluidofv = $this->get("FechaVencimiento") == 1 ? "checked" : ""; $incluidomd = $this->get("VentaMenudeo") == 1 ? "checked" : ""; $motivomd = $this->get("VentaMenudeo") == 1 ? "visible" : "hidden"; $tienefechavencimiento = $this->get("FechaVencimiento"); $volver = $volver == "modcompras" ? "modcompras.php" : "modproductos.php"; $numreg = ObtenerNumeroProductosPorReferencia($this->getReferencia()); $readonlyUM = "readonly"; $readonly = "readonly"; $um = ""; $ounidad = ""; $ometro = ""; $olitro = ""; $okilo = ""; switch ($this->get("UnidadMedida")) { case 'und': $um = "Unidades"; $ounidad = "selected"; break; case 'mts': $um = "Metros"; $ometro = "selected"; break; case 'lts': $um = "Litros"; $olitro = "selected"; break; case 'kls': $um = "Kilos"; $okilo = "selected"; break; } $osrm = ""; $ocrm = ""; $ocrmr = ""; switch ($this->get("CondicionVenta")) { case '0': $osrm = "selected"; break; case 'CRM': $ocrm = "selected"; break; case 'CRMR': $ocrmr = "selected"; break; } $txtMoDet = getModeloDetalle2txt(); $esBTCA = $txtMoDet[0] == "BTCA"; $hidden = "style='display:none;'"; $btca = $esBTCA ? false : $hidden; $txtref = $txtMoDet[4]; $ismtposerv = $this->get("Servicio") || $this->get("MetaProducto") ? $hidden : false; $isserie = $this->get("Serie") ? $hidden : false; $txtalias = $txtMoDet[3]; $txtModelo = $txtMoDet[1]; $txtDetalle = $txtMoDet[2]; $txtTitulo = $esBTCA ? 'Nueva' : 'Nuevo'; $titulo = _("{$txtTitulo} {$txtModelo} / {$txtDetalle}"); $cambios = array("tPrecioVenta" => _("Previo Venta"), "vPrecioVenta" => $this->getPrecioVenta(), "vIdTallaje" => $this->get("IdTallaje"), "ListaCombinada" => $ListadoCombinado, "tImprimirCodigoBarras" => _("Imprimir código barras"), "vRefProvHab" => $this->get("RefProvHab"), "tRefProvHab" => $txtref, "vIdMarca" => $this->get("IdMarca"), "tMarca" => _("Marca"), "vMarca" => getIdMarca2Texto($this->get("IdMarca")), "vIdContenedor" => $this->get("IdContenedor"), "tContenedor" => _("Contenedor"), "vContenedor" => getIdContenedor2Texto($this->get("IdContenedor")), "vIdTalla" => $this->get("IdTalla"), "tModelo" => $txtModelo, "vTalla" => getIdTalla2Texto($this->get("IdTalla"), $this->get("IdIdioma")), "vIdColor" => $this->get("IdColor"), "tDetalle" => $txtDetalle, "vColor" => getIdColor2Texto($this->get("IdColor"), $this->get("IdIdioma")), "tCodigoBarras" => _("Código barras"), "vCodigoBarras" => $this->get("CodigoBarras"), "tTitulo" => $titulo, "HIDDENDATA" => Hidden("id", $this->getId()), "action" => "{$action}?modo={$modo}&idBase=", "Referencia" => _("Referencia"), "vReferencia" => $this->getReferencia(), "tCosteSinIVA" => _("Costo Ref."), "vCosteSinIVA" => $this->get("Costo") * 1, "Descripcion" => _("Nombre"), "vDescripcion" => $this->getDescripcion(), "isbtca" => $btca, "ismtposerv" => $ismtposerv, "isserie" => $isserie, "vIdProductoAlias0" => $this->get("IdProductoAlias0"), "tProductoAlias0" => $txtalias, "vProductoAlias0" => getIdProductoAlias2Texto($this->get("IdProductoAlias0"), $this->get("IdIdioma")), "vIdProductoAlias1" => $this->get("IdProductoAlias1"), "tProductoAlias1" => $txtalias, "vProductoAlias1" => getIdProductoAlias2Texto($this->get("IdProductoAlias1"), $this->get("IdIdioma")), "PrecioVenta" => _("Precio venta"), "vPrecioVenta" => $this->getPrecioVenta(), "PrecioOnline" => _("Precio online"), "vPrecioOnline" => $this->getPrecioOnline(), "tVentaMenudeo" => _("Venta al menudeo"), "cVentaMenudeo" => $incluidomd, "vMotivoMd" => $motivomd, "cNumeroSerie" => $incluidons, "cLote" => $incluidolt, "cFechaVencimiento" => $incluidofv, "tUnidadesPorContenedor" => _("Unidades Por Contenedor"), "vUnidadesPorContenedor" => $this->get("UnidadesPorContenedor"), "tUnidadMedida" => _("Unidad Medida"), "vUnidadMedida" => $this->get("UnidadMedida"), "vUM" => $um, "ounidad" => $ounidad, "ometro" => $ometro, "olitro" => $olitro, "okilo" => $okilo, "oSRM" => $osrm, "oCRM" => $ocrm, "oCRMR" => $ocrmr, "vReadOnly" => $readonly, "vReadOnlyUM" => $readonlyUM, "vSerie" => $tieneserie, "vFechaVencimiento" => $tienefechavencimiento, "tFamilia" => _("Familia..."), "tSubFamilia" => _("Sub familia..."), "TipoImpuesto" => _("Impuesto"), "tIdProvHab" => _("Proveedor hab."), "vIdProvHab" => $this->get("IdProvHab"), "vProveedorHab" => getNombreProveedor($this->get("IdProvHab")), "tIdLabHab" => _("Laboratorio hab."), "vIdLabHab" => $this->get("IdLabHab"), "vLaboratorioHab" => getNombreLaboratorio($this->get("IdLabHab")), "vTipoImpuesto" => $this->getTipoImpuesto(), "vIdFamilia" => $this->get("IdFamilia"), "vIdSubFamilia" => $this->get("IdSubFamilia"), "vFamilia" => $this->get("Familia"), "vSubFamilia" => $this->get("SubFamilia"), "vImpuesto" => $this->getImpuesto()); return $ot->makear($cambios); }
* ->class('someclass'), * for a placeholder: ->placeholder('Some text'). If the attribute doesn't * take a value just omit it, so : ->required() * * In addition to HTML attributes, each element takes meta-data such as the * submitted value. All meta-data is set in exactly the same way but is prefixed * with a single underscore. For example, you can set the form's show_submitted * flag with ->_show_submitted(true), or force an initial check on a specific * item in a radioset using ->_value('name') -- in this case you are setting up * the element to appear as if that value was already submitted to it. * * This is done to make form specification as terse and fluent as possible * -- yet still giving control where needed. * **/ $contact_form = Form('contact', './')->setRenderer($r)->onSuccess('MySuccessHandler')->novalidate()->add(Fieldset('About you...', 'about')->class('about')->add(Checkbox('control', '>Collect Personal Details', 'ok')->_ignore_parent_fields('disabled,readonly,required'))->add(Input('salutation', 'Title', 'Your title please')->autofocus()->datalist($salutations)->required())->add(Input('name', 'Your Name', 'Your name please')->autocomplete('off')->required()->validator('myNameValidator'))->add(Email('email', 'Your Email', 'Your email address')->required()->autocomplete('off'))->add(URL('url', 'Website', 'Your URL here (optional)'))->add(Hidden('secret', '123'))->add(Password('pass', 'Your Password', 'Enter a password of 10 characters or more')->required()->minlength(10, '10+ chars. please'))->add(Password('oth', 'Repeat Password', 'Enter password again')->required()->minlength(10, '10+ chars. please')->matches('pass', 'This must match what you typed in the "Your Password" field.'))->add(Tel('tel', 'Phone', 'A contact number please')->pattern('/^[\\s]*[\\+]?[0-9][-0-9]*[\\s-0-9]*[\\s]*$/', 'Enter a valid phone number. This can start with an international code like +44 if needed.'))->add(Input('human', 'Are you human?', 'No bots please')->pattern('/^yes|yep|yeah|sure am|indeed$/i', 'Some form of affirmation is needed.')->required())->add(YesNo('alive', 'Were you alive when you celebrated your last birthday?', 'Babies excluded.', 'Just yes or no please.')->required())->add(Integer('age', 'How old are you?')->value(5)->min(2)->max(10)))->add(Fieldset('Your message...')->add(TextArea('msg', 'Message', 'Your message to us')->required()->pattern('/^[^0-9]*$/', 'No numbers please!')->whitelist('great,good,fantastic,amazing')))->add(Fieldset('Legal stuff...')->add(Radios('agreement', '>Do you agree to our terms?', $conditions)->required('* Please select one of the options')->validator('myConditionValidator'))->add(Checkboxes('options', 'Additional Options...', $checkboxes)->required()->value('spam_me'))->add(MSelect('depts', 'Forward to which departments?', $departments)->required('Please choose at least one department')->value('complaints-2 , complaints-3 , sales-0')))->add(Submit('Send'))->process(); /** ==================== Custom formatters follow ==================== * * These all override, or append to, some aspect of the renderer's output * and should allow you fine enough control over your form output not to * have to resort to hand-crafted HTML. * * They are all enabled by setting values on the renderer. * Thay are also totally option. In fact, the default output of the renderer * should be fine in most cases so you can probably delete all the code in * this part of the file. **/ /** * Controls the output that goes at the head of the form when there are any * invalid elements. Use this only if the renderer's default markup isn't * what you need.
function formModificarSubfamilia($action, $mud, $muc, $dsto, $tipocosto) { $ot = getTemplate("ModificarSubFamilia"); if (!$ot) { return false; } //$comboidiomas = genComboIdiomas($this->get("IdIdioma")); //$comboperfiles = genComboPerfiles($this->get("IdPerfil")); $xcheck = $mud != 'MUD' ? 'checked="checked"' : ''; $xmutc = $mud != 'MUD' ? 'visible' : 'hidden'; $xcp = $tipocosto == 'CP' ? 'selected' : ''; $xuc = $tipocosto == 'UC' ? 'selected' : ''; $xmud = $mud != 'MUD' ? CleanFloat($mud) : $this->get("MargenUtilidadVD"); $xmuc = $muc != 'MUC' ? CleanFloat($muc) : $this->get("MargenUtilidadVC"); $xdsto = $dsto != 'DSTO' ? CleanFloat($dsto) : $this->get("Descuento"); $xlist = ListaProductosxSubFamilia($this->get("IdFamilia"), $this->get("IdSubFamilia"), $xmud, $xmuc, $xdsto, $tipocosto); $oFam = new familia(); $oFam->Load($this->get("IdFamilia")); $NomFamilia = $oFam->get("Familia"); $cambios = array("tTitulo" => _("Modificando ") . $NomFamilia . "/" . $this->get("SubFamilia"), "tSubFamilia" => _("Nombre"), "vSubFamilia" => $this->get("SubFamilia"), "vIdFamilia" => $this->get("IdFamilia"), "tMargenUtilidadVD" => _("Margen de Utilidad VP"), "vMargenUtilidadVD" => $xmud, "tMargenUtilidadVC" => _("Margen de Utilidad VC"), "vMargenUtilidadVC" => $xmuc, "tDescuento" => _("Descuento"), "vDescuento" => $xdsto, "vLista" => $xlist, "vIdBase" => $this->getId(), "vRecalcular" => $xcheck, "vCP" => $xcp, "vUC" => $xuc, "vMUTC" => $xmutc, "action" => $action, "HIDDENDATA" => Hidden("id", $this->getId()) . Hidden("IdFamilia", $this->get("IdFamilia"))); return $ot->makear($cambios); }
function main() { // ------------------------------------------------ // Branch out to ajax handling functions if (gpExists('fwajax')) { return $this->FWAjax(); } // ...early return // ------------------------------------------------ // Public sites can turn off table maintenance pages if (vgfGet('suppress_maintenance', false)) { return; } vgfset('maintenance', true); # KFD 2/17/09 Sourceforge 2546056 # If we are in default main code branch, and # there is no data dictionary, the user has # called a bad page. if (!isset($this->table['projections'])) { ?> <h1>Bad Page Request</h1> <p>There is no page <?php echo hx(gp('gp_page')); ?> <?php return; } // If a "fk jump", retrieve skey and make it look // like an edit call. if (gp('gp_pk') != '') { $pkval = gp("gp_pk"); $pkcol = $this->table["pks"]; $pktyp = $this->table['flat'][$pkcol]["type_id"]; $table_id = $this->table["table_id"]; // KFD 10/26/06, used to be $table_id $sq = "SELECT skey FROM " . $this->view_id . " WHERE " . $pkcol . " = " . SQL_Format($pktyp, $pkval); gpSet('gp_skey', SQL_OneValue('skey', $sq)); gpSet('gp_mode', 'upd'); } // If we were invoked by a child table, don't do this if (is_null($this->table_obj_child)) { // KFD 10/26/06, keep as $table_id Hidden('gp_page', $this->table_id); // always return to same page Hidden('gp_mode', ''); Hidden('gp_skey', ''); Hidden('gp_action', ''); Hidden('gp_save', ''); hidden('gp_copy', ''); } // Work out what to do if mode is blank. Might mean // upd, might mean browse. $mode = gp('gp_mode'); $skey = gp('gp_skey'); if ($mode == '') { $mode = $this->MainCheckForMover(); if ($mode == '') { $mode = $skey == '' ? 'browse' : 'upd'; gpSet('gp_mode', $mode); } } $this->mode = $mode; // KFD 8/13/07, Experimental COPY ability if (gp('gp_action') == 'copy') { $mode = 'ins'; gpSet('gp_mode', 'ins'); } switch ($mode) { case 'search': $this->PageSubtitle .= " (Lookup Mode)"; break; case 'ins': $this->PageSubtitle .= " (New Entry)"; break; } // ---------------------------------------------- // Generate the main HTML elements if ($mode == 'browse') { $this->hBrowse(); } elseif ($mode == 'mover') { $this->hMover(); } else { $this->hBoxes($mode); } if ($mode != "mover") { $this->hButtonBar($mode); } $this->hLinks($mode); $this->hExtra($mode); // Now if this is a child table in a 1:M, it will not actually // output its own stuff, it will invoke its parent, so let's // buffer the output if ($this->table_id_parent != '') { ob_start(); } // Echo out the HTML $this->ehMain(); // Put this out at end, after all HTML has been output if ($mode == "search") { //$controls=vgfGet('gpControls'); $controls = ContextGet('OldRow'); $hScript = ''; foreach ($controls as $key => $info) { $hScript .= "\nob('x2t_{$key}').value='';"; } jqDocReady("function clearBoxes() { \n" . $hScript . "}\n\n"); } // Again, if this is a child table in a 1:M, capture the output and // make it the responsibility of the parent if ($this->table_id_parent != '') { $this->h['Complete'] = ob_get_clean(); // Wipe out and replace all gp variables, fool the parent object $OldRow = ContextGet('OldRow', array()); $gpsave = aFromGP('gp_'); gpUnsetPrefix('gp_'); $dd = ContextGet('drilldown', array()); $dd1 = array_pop($dd); gpSet('gp_skey', $dd1['skey']); // Now invoke the parent object, tell it about us $object = objPage($this->table_id_parent); $object->table_obj_child = $this; $object->main(); // Replace the wiped out gp variables gpUnsetPrefix('gp_'); gpSetFromArray('gp_', $gpsave); ContextSet('OldRow', $OldRow); // Force the menu to come from the parent vgaSet('menu_selected', $this->table_id_parent); } }
function formExtra($action) { $out = gas("titulo", _("Datos extra")); $cambiarnombre = "<input SIZE=80 name='Comentario' value='" . $this->get("Comentario") . "'>"; $cambiarpaginas = "<input name='Paginas' value='" . $this->get("Paginas") . "'>"; $out .= "<table><tr><td>" . Enviar(_("Guardar")) . "</td></tr>" . "<tr><td>{$cambiarnombre} - Comentario</td></tr>" . "<tr><td>{$cambiarpaginas} - Paginas</td></tr>" . "<tr><td>" . Enviar(_("Guardar")) . "</td></tr>" . "</table>"; $modo = "newsave"; $extra = Hidden("id", $this->getId()); return "<form action='{$action}?modo=salvarextra' method=post>{$out} {$extra}</form>"; }
function formEntrada($action, $esModificar) { $ot = $esModificar ? getTemplate("ModLocal") : getTemplate("AltaLocal"); if (!$ot) { return false; } $modo = $esModificar ? "modsave" : "newsave"; $titulo = $esModificar ? _("Modificando local") : _("Nuevo local"); $idlocal = $this->get("IdLocal"); $combonumeracion = getComboFormatoComprobante($this->get("IdTipoNumeracionFactura")); $comboidiomas = genComboIdiomas($this->get("IdIdioma")); $incluido = $this->is("ImpuestoIncluido") ? "checked" : ""; $esCentral = $this->is("AlmacenCentral") ? "checked" : ""; $esCOPImpuesto = $this->is("COPImpuesto") ? "checked" : ""; $esMoneda = $this->is("AlmacenCentral") ? "" : "style='display:none'"; $Moneda = getMoneda(); $esConPass = $this->is("AdmitePassword") ? "checked" : ""; $mostrarpass = $this->is("AdmitePassword") ? "style='visibility:visible'" : "style='visibility:hidden'"; $cambios = array("tMensajeMes" => _("Mensaje Ticket"), "vMensajeMes" => $this->get("MensajeMes"), "tMensajePromo" => _("Mensaje Promoción"), "vMensajePromo" => $this->get("MensajePromocion"), "tVigenciaPresupuesto" => _("Vigencia Presupuesto"), "vVigenciaPresupuesto" => $this->get("VigenciaPresupuesto"), "tGarantiaComercial" => _("Garantía Comercial"), "vGarantiaComercial" => $this->get("GarantiaComercial"), "tMargenUtilidad" => _("Margen Utilidad "), "vMargenUtilidad" => $this->get("MargenUtilidad"), "vTipoMargenUtilidad" => $this->get("TipoMargenUtilidad"), "vIGV" => $this->get("Impuesto"), "vIPC" => $this->get("Percepcion"), "vDescuento" => $this->get("Descuento"), "vMetodoRedondeo" => genComboMetodoRedondeo($this->get("MetodoRedondeo")), "tIdIdioma" => _("Idioma"), "comboIdiomas" => $comboidiomas, "tIdPais" => _("País"), "vIdPais" => $this->get("IdPais"), "comboIdPais" => genComboPaises($this->get("IdPais")), "TITULO" => $titulo, "tImpuestoIncluido" => _("Impuesto incluido"), "cImpuestoIncluido" => $incluido, "tTipoNumeracionFactura" => _("Tipo numeración fact."), "comboTipoNumeracionFactura" => $combonumeracion, "vNombreComercial" => $this->get("NombreComercial"), "vNombreLegal" => $this->get("NombreLegal"), "vAlmacenCentral" => $esCentral, "vCOPImpuesto" => $esCOPImpuesto, "vMoneda0" => $Moneda[1]['T'], "vMonedaPlural0" => $Moneda[1]['TP'], "vMonedaSimbolo0" => $Moneda[1]['S'], "vMoneda1" => $Moneda[2]['T'], "vMonedaPlural1" => $Moneda[2]['TP'], "vMonedaSimbolo1" => $Moneda[2]['S'], "vMoneda" => $esMoneda, "vConContrasenia" => $esConPass, "vPoblacion" => $this->get("Poblacion"), "vCodigoPostal" => $this->get("CodigoPostal"), "vDireccionFactura" => $this->get("DireccionFactura"), "DireccionFactura" => _("Dirección Factura"), "vNFiscal" => $this->get("NFiscal"), "NFiscal" => _("Número Fiscal"), "vFax" => $this->get("Fax"), "vEmail" => $this->get("Email"), "vMovil" => $this->get("Movil"), "vTelefono" => $this->get("Telefono"), "vPaginaWeb" => $this->get("PaginaWeb"), "vCuentaBancaria" => $this->get("CuentaBancaria"), "vCuentaBancaria2" => $this->get("CuentaBancaria2"), "Password" => _("Contraseña"), "vPassword" => _("localess"), "sPassword" => $mostrarpass, "Identificacion" => _("Identificación"), "vIdentificacion" => $this->get("Identificacion"), "NombreComercial" => _("Nombre comercial"), "NombreLegal" => _("Nombre legal"), "Poblacion" => _("Población"), "CodigoPostal" => _("Codigo Postal"), "Fax" => _("Fax"), "Email" => _("Email"), "Movil" => _("Móvil"), "Telefono" => _("Teléfono"), "PaginaWeb" => _("Pagina web"), "CuentaBancaria" => _("CTA Moneda Principal"), "CuentaBancaria2" => _("CTA Moneda Secundaria"), "tAlmacenCentral" => _("El almacén central"), "HIDDENDATA" => Hidden("id", $this->getId()), "ACTION" => "{$action}?modo={$modo}"); return $ot->makear($cambios); }
function mainMD5() { if (gpexists('md5') && !gpExists('gpp')) { gpSet('gpp', '2'); } $gpp = gp('gpp'); if (gp('gpp') == '3') { $this->MD5_ForgotPage3(); } // process new pw if (gp('gpp') == '2') { $this->MD5_ForgotPage2(); } // link back if (gp('gpp') == '1') { $this->MD5_ForgotPage1(); } // send email if (Errors() || $gpp == '') { $this->MD5_ForgotPage0(); } // get info Hidden("gp_page", "x_password"); }
function index_hidden_page() { global $AG; $sessok = !LoggedIn() ? false : true; // KFD 3/6/08, moved here from the main stream of index_hidden // because these are relevant only to page processing if (gpExists('x_module')) { SessionSet('AGMENU_MODULE', gp('x_module')); } elseif (vgaGet('nomodule') != '' && SessionGet('AGMENU_MODULE') == '') { SessionSet('AGMENU_MODULE', vgaGet('nomodule')); } // If the search flag is set, we need to know what class for this // application handles searchs if (gpExists('gp_search')) { gpSet('gp_page', vgaGet('SEARCH_CLASS')); } // Load up a list of pages that public users are allowed to see, // with home and password always there. global $MPPages; // allows it to be in applib $MP = array(); //$MPPages= array(); // This is the old method, load $MPPages from its own file if (file_exists_incpath('appPublicMenu.php')) { include_once 'appPublicMenu.php'; } if (!is_array($MPPages)) { $MPPages = array(); } $MPPages['x_home'] = 'Home Page'; $MPPages['x_login'] = '******'; $MPPages['x_noauth'] = 'Authorization Required'; $MPPages['x_password'] = "******"; $MPPages['x_mpassword'] = "******"; $MPPages['x_paypalipn'] = 'Paypal IPN'; // If the install page exists, it will be used, no getting // around it. $install = $GLOBALS['AG']['dirs']['application'] . 'install.php'; $instal2 = $GLOBALS['AG']['dirs']['application'] . 'install.done.php'; if (file_exists($install)) { if (gp('gp_install') == 'finish') { rename($install, $instal2); } else { $MPPages['install'] = 'install'; gpSet('gp_page', 'install'); } } // First pass is to look for the "flaglogin" flag. This says save all // current page settings and go to login screen. They will be restored // on a successful login. Very useful for links that say "Login to // see nifty stuff..." if (gp('gp_flaglogin') == '1') { gpSet('gp_flaglogin', ''); gpToSession(); gpSet('gp_page', 'x_login'); } // Second pass redirection, pick default page if there // is none, and verify public pages. // $gp_page = gp('gp_page'); if ($gp_page == '') { if (vgfGet('LoginAttemptOK') === true && vgfGet('x4') === true) { $gp_page = 'x4init'; gpSet('gp_page', 'x4init'); SessionSet('TEMPLATE', 'x4'); } else { if (function_exists('appNoPage')) { $gp_page = appNoPage(); } else { if (!LoggedIn()) { $gp_page = FILE_EXISTS_INCPATH('x_home.php') ? 'x_home' : 'x_login'; } else { // KFD 3/2/07, pull vga stuff to figure defaults if (vgaGet('nopage') != '') { $gp_page = vgaGet('nopage'); } else { $gp_page = 'x_welcome'; } } } } } // If they are trying to access a restricted page and are not // logged in, cache their request and redirect to login page if (!$sessok && !isset($MPPages[$gp_page])) { if (vgfGet('loglogins', false)) { fwLogEntry('1014', 'Page access w/o login', $gp_page); } gpToSession(); $gp_page = 'x_login'; } // If pos is activated and the current requested page does not // match what they are cleared for, redirect to login if (vgaGet('POS_SECURITY', false) == true && SessionGet('ADMIN') == false) { if (SessionGet('POS_PAGE', '', 'FW') != $gp_page) { gpToSession(); $gp_page = 'x_login'; } } gpSet('gp_page', $gp_page); // Make any database saves. Do this universally, even if save // was not selected. If errors, reset to previous request. //if(gp('gp_save')=='1') processPost(); processPost(); if (Errors()) { gpSetFromArray('gp_', aFromGp('gpx_')); } // Put Userid where HTML forms can find it //vgfSet("UID",SessionGet("UID")); //if (vgfSet("UID")=="") { vgfSet("UID","Not Logged In"); } // THIS IS NEWER X_TABLE2 version of drilldown commands, // considerably simpler than the older ones. It makes use of // three gp_dd variables. // // Notice how we process drillbacks FIRST, allowing a link // to contain both drillback and drilldown, for the super-nifty // effect of a "drill-across" hidden('gp_dd_page'); hidden('gp_dd_skey'); hidden('gp_dd_back'); if (intval(gp('gp_dd_back')) > 0 && $sessok) { // this is drillback $dd = ContextGet('drilldown', array()); $back = intval(gp('gp_dd_back')); if (count($dd) >= $back) { $spot = count($dd) - $back; $aback = $dd[$spot]; gpSet('gp_skey', $aback['skey']); gpSet('gp_page', $aback['page']); $gp_page = $aback['page']; gpSet('gpx_skey', $aback['skey']); gpSet('gpx_page', $aback['page']); gpSetFromArray('parent_', $aback['parent']); if (!gpExists('gp_mode')) { gpSet('gp_mode', 'upd'); } $dd = $spot == 0 ? array() : array_slice($dd, 0, $spot); ContextSet('drilldown', $dd); ContextSet('drilldown_top', $aback['page']); //ContextSet('drilldown_level',count($dd)); } } if (gp('gp_dd_page') != '' && $sessok) { // this is drilldown... $matches = DrillDownMatches(); $matches = array_merge($matches, aFromGP('parent_')); $dd = ContextGet('drilldown', array()); $newdd = array('matches' => $matches, 'parent' => aFromGP('parent_'), 'skey' => gp('gpx_skey'), 'page' => gp('gpx_page')); $dd[] = $newdd; ContextSet('drilldown', $dd); ContextSet('drilldown_top', gp('gp_dd_page')); //ContextSet('drilldown_level',count($dd)); // having saved the stack, redirect to new page. $tnew = gp('gp_dd_page'); $gp_page = $tnew; gpSet('gp_page', $tnew); if (gp('gp_dd_skey') != '') { gpSet('gp_skey', gp('gp_dd_skey')); gpSet('gp_mode', 'upd'); } // Clear search of new page, set filters to blank processPost_TableSearchResultsClear($tnew); ConSet('table', $tnew, 'search', array()); } // If no drilldown commands were received, and we are not on // the page that is the top, user must have picked a new page // altogether, wipe out the drilldown stack if (gp('gp_page') != ContextGet('drilldown_top', '')) { ContextSet('drilldown', array()); ContextSet('drilldown_top', ''); } // Must always have these on the user's form. These can // be retired with x_Table, they are for old drilldown // hidden("dd_page", ""); hidden("dd_ddc", ""); hidden("dd_ddv", ""); hidden("dd_ddback", ""); hidden("dd_action", "searchexecute"); hidden("dd_skey", ""); // Load user preferences just before display UserPrefsLoad(); $dir = $GLOBALS['AG']['dirs']['root'] . 'application/'; if (file_exists($dir . $gp_page . ".page.yaml")) { include 'androPage.php'; $obj_page = new androPage(); if ($obj_page->flag_buffer) { ob_start(); } $obj_page->main($gp_page); if ($obj_page->flag_buffer) { vgfSet("HTML", ob_get_clean()); //ob_end_clean(); } vgfSet("PageSubtitle", $obj_page->PageSubtitle); } else { $obj_page = DispatchObject($gp_page); if ($obj_page->flag_buffer) { ob_start(); } $obj_page->main(); if ($obj_page->flag_buffer && vgfGet('HTML') == '') { vgfSet("HTML", ob_get_contents()); ob_end_clean(); } vgfSet("PageSubtitle", $obj_page->PageSubtitle); } // Save context onto the page. Note that it is not really // protected by these methods, just compressed and obscured. // $t2 = serialize($GLOBALS['AG']['clean']['gpContext']); $t2 = gzcompress($t2); $t2 = base64_encode($t2); Hidden('gpContext', $t2); // KFD 3/7/07, give the app the final opportunity to process // things before the display, while logged in. if (function_exists('appdisplaypre')) { appDisplayPre(); } // ...and write output and we are done. Assume if there was // no buffering that the output is already done. if ($obj_page->flag_buffer != false) { // Work out what template we are using index_hidden_template('x2'); // KFD 5/30/07, send back only main content if asked if (gp('ajxBUFFER') == 1) { echo "andromeda_main_content|"; ehStandardContent(); echo "|-|_focus|" . vgfGet('HTML_focus'); $ajax = ElementReturn('ajax', array()); echo '|-|' . implode('|-|', $ajax); echo '|-|_title|' . vgfGet('PageTitle'); } elseif (defined('_VALID_MOS')) { // This is the default branch, using a Joomla template // DUPLICATE ALERT: This code copied into // index_hidden_x4Dispatch() above global $J; $mainframe = $J['mainframe']; $my = $J['my']; $mosConfig_absolute_path = $J['mC_absolute_path']; $mosConfig_live_site = $J['mC_live_site']; $template_color = $J['template_color']; $template_color = 'red'; $file = $GLOBALS['AG']['dirs']['root'] . '/templates/' . $mainframe->GetTemplate() . "/index.php"; include $file; } elseif ($obj_page->html_template !== '') { // This is newer style, let the class specify the template. include $obj_page->html_template . '.php'; } else { // This is old style, defaults to "html_main.php", can be // set also by vgaSet() or by gp(gp_out) $html_main = vgaGet('html_main') == '' ? 'html_main' : vgaGet('html_main'); switch (CleanGet("gp_out", "", false)) { case "print": include "html_print.php"; break; case "info": include "html_info.php"; break; case "": include $html_main . ".php"; break; default: } } } }
function formEntrada($action, $esModificar) { $ot = getTemplate("ModificarCliente"); if (!$ot) { return false; } $comboidiomas = genComboIdiomas($this->get("IdIdioma")); $comboperfiles = genComboPerfiles($this->get("IdPerfil")); $cambios = array("tIdPais" => _("País"), "vIdPais" => $this->get("IdPais"), "comboIdPais" => genComboPaises($this->get("IdPais")), "TITULO" => _("Modificando cliente"), "Direccion" => _("Dirección"), "Comision" => _("Comisión"), "Ver" => _("Ver"), "Telefono" => _("Teléfono"), "Nombre" => _("Nombre"), "Idioma" => _("Idioma"), "comboIdiomas" => $comboidiomas, "Perfil" => _("Perfil"), "comboPerfiles" => $comboperfiles, "vNombre" => $this->getNombre(), "vDireccion" => $this->get("Direccion"), "vComision" => $this->get("Comision"), "vTelefono" => $this->get("Telefono"), "ACTION" => "{$action}?modo=modsave", "HIDDENDATA" => Hidden("id", $this->getId())); return $ot->makear($cambios); }
function formEntrada($action, $esModificar) { $ot = getTemplate("ModificarUsuario"); if (!$ot) { return false; } $comboidiomas = genComboIdiomas($this->get("IdIdioma")); $comboperfiles = genComboPerfiles($this->get("IdPerfil")); $combolocales = genComboLocales($this->get("IdLocal")); $esTodos = $this->get("IdLocal") == 0 ? "style='visibility:hidden'" : "style='visibility:visible'"; $locales = ""; $idglocales = $this->get("GrupoLocales"); if ($idglocales) { $locales = obtnerGrupoLocales($idglocales); } $locales = $esModificar ? $locales : ''; $cambios = array("tFechaNacim" => _("Fecha nacim."), "vFechaNacim" => $this->get("FechaNacim"), "tCuentaBanco" => _("Cuenta banco"), "vCuentaBanco" => $this->get("CuentaBanco"), "TITULO" => _("Modificando usuario"), "Identificacion" => _("Identificación"), "Password" => _("Contraseña"), "Direccion" => _("Dirección"), "Comision" => _("Comisión"), "Telefono" => _("Teléfono"), "Nombre" => _("Nombre"), "Idioma" => _("Idioma"), "comboIdiomas" => $comboidiomas, "Local" => _("Local"), "comboLocales" => $combolocales, "Perfil" => _("Perfil"), "comboPerfiles" => $comboperfiles, "vNombre" => $this->getNombre(), "vIdentificacion" => $this->get("Identificacion"), "vPassword" => _("usuarios"), "vDireccion" => $this->get("Direccion"), "vComision" => $this->get("Comision"), "vTelefono" => $this->get("Telefono"), "ACTION" => "{$action}?modo=modsave", "tGrupoLocales" => _("Grupo Locales"), "sGrupoLocales" => $esTodos, "vGrupoLocales" => $locales, "HIDDENDATA" => Hidden("id", $this->getId())); return $ot->makear($cambios); }