public static function request($param, $filtrar = true) { $v = Leer::get($param, $filtrar); if ($v == null) { $v = Leer::post($param, $filtrar); } return $v; }
/** * * @param type $param * @return type */ public static function request($param, $filtrar = true) { $v = Leer::get($param); if ($v == null) { $v = leer::limpiar($_POST[$param]); } else { } return $v; }
<?php require '../require/comun.php'; $idventa = Leer::get("id"); if (Leer::get("id") == null) { header("Location: gestion.php?e=5"); exit; } $bd = new BaseDatos(); $modeloventas = new ModeloVenta($bd); $venta = $modeloventas->get($idventa); $venta->setPago("si"); $r = $modeloventas->edit($venta); header("Location: gestion.php?e={$r}");
<?php /** * PHP delete de inmueble es el encargado de borrar el inmueble de la base dedatos, ademas al haber una * clave foranea en la imagen tambien borrará las tuplas de las imaagenes en la tabla foto * pero OJO no del disco, del disco la borraremos ocn unlink. */ require '../require/comun.php'; //este metodo comprueba que estas atuentificado en la sesion como ROOT $sesion->administrador("../index.php"); //Creamos la base de datos $bd = new BaseDatos(); //creamos el usuario y su modelo $modelo = new modeloInmueble($bd); $id = Leer::get("id"); // $r = $modelo->delete($id); $modeloFoto = new modeloFoto($bd); $condicion = "idinmueble={$id}"; $filas = $modeloFoto->getList(0, 5, $condicion); foreach ($filas as $indice => $objeto) { $un = $objeto->deleteArchivo(); } header("Location: ../adminpanel.php?completado={$r}{$un}");
<?php require './require/comun.php'; $usuario = $sesion->getUsuario(); // creamos base de datos y modelos $bd = new BaseDatos(); $modelo = new modeloInmueble($bd); $modeloFoto = new modeloFoto($bd); if (Leer::get("p")) { $inicio = Leer::get("p"); } else { $inicio = 0; } if (Leer::post("rpp")) { $rpp = Leer::post("rpp"); } else { $rpp = 10; } $ids = array(); if (Leer::post("token")) { $tipo = strtolower(Leer::post("tipo")); $estado = strtolower(Leer::post("estado")); $voa = strtolower(Leer::post("voa")); $orden = "precio " . Leer::post("orden"); if ($voa != "") { $condicion = "tipo = '{$tipo}' AND estado= '{$estado}' AND objetivo= '{$voa}'"; $filas = $modelo->getList($inicio, $rpp, $condicion); } else { $condicion = "tipo = '{$tipo}' AND estado= '{$estado}'"; $filas = $modelo->getList($inicio, $rpp, $condicion); }
function insertViewPaypal() { $idventa = Leer::get("idventa"); $bd = new BaseDatos(); $modeloventa = new ModeloVenta($bd); $venta = $modeloventa->get($idventa); $datos = array("correo-vendedor" => Configuracion::CORREO_PAYPAL, "idventa" => $venta->getId(), "precio-total" => $venta->getPrecio()); $v = new Vista("plantillaConfirmarPago", $datos); $contenido = $v->renderData(); $datos = array("contenido-general" => $contenido, "enlace" => Entorno::getEnlaceCarpeta()); $v = new Vista("plantillaPrincipal", $datos); $v->render(); exit; }
<?php include_once '../require/comun.php'; $err = 0; $err = Leer::get("er"); include '../includes/admin-head.php'; ?> <body> <header id="cabecera" class="padded"> <div class="container"> <section id="logo"> <img src="../img/logo.png" alt="logo" /> </section> <nav id="menu"> <ul> <li><a href="../">Home</a> </li> <li><a href="buscador.php">Buscador</a> </li> </ul> </nav> </div> <div class="separador"></div> </header> <div id="container"> <?php if ($err != 0) { ?> <p class="message dismissible red">La contraseña introducida no es correcta</p> <?php
<?php require '../require/comun.php'; $pagina = Leer::get("pagina"); if (Leer::get("pagina") == null) { $pagina = 0; } $bd = new BaseDatos(); $modeloventas = new ModeloVenta($bd); $ventas = $modeloventas->getList($pagina, Configuracion::RPP); ?> <!DOCTYPE html> <html> <head> <title>Gestión tienda</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="../css/estilos-front.css"> </head> <body> <header> <img class="logo" src="../img/logo.png"> <ul class="menu-principal"> <li><a href="../do/?">INICIO</a></li> <li><a href="../backend/gestion.php">GESTIÓN-PRINCIPAL</a></li> </ul> </header> <section> <div class="tabla-tienda" style="width: 80%"> <h1>Lista de ventas</h1>
<?php require '../require/comun.php'; $bd = new BaseDatos(); $modelodetalle = new ModeloDetalleVenta($bd); $idventa = Leer::get("id"); $parametro['idventa'] = $idventa; $detalles = $modelodetalle->getList(0, 30, "idventa=:idventa", $parametro); $modeloventas = new ModeloVenta($bd); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="../css/estilos-front.css"> <title>Venta <?php echo $idventa; ?> - Gestión tienda</title> </head> <body> <header> <img class="logo" src="../img/logo.png"> <ul class="menu-principal"> <li><a href="../do/?">INICIO</a></li> <li><a href="../backend/gestion.php">GESTIÓN-PRINCIPAL</a></li> </ul> </header> <section> <h1>Detalles de la venta: <?php