Beispiel #1
0
<?php

session_start();
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
    $ID = $_REQUEST['id'];
    $nombre = $_REQUEST['nombre'];
    $direccion = $_REQUEST['direccion'];
    $datosG = $_REQUEST["datosG"];
    require_once '../../Clases/cProveedor.php';
    $proveedor = new Proveedor($ID, $nombre, $direccion, $datosG);
    $proveedor->modificar();
    echo "<script type=\"text/javascript\">alert(\"El proveedor ha sido modificado\");\nwindow.location.href ='../../Usuario/Inventario/Proveedor/modificarProveedor.php';</script>";
} else {
    header('Location: http://sistemaina.esy.es/no_auth_id.php');
    exit;
}
$now = time();
// checking the time now when home page starts
if ($now > $_SESSION['expire']) {
    session_destroy();
    header('Location: http://sistemaina.esy.es/sessionexpired.php');
    exit;
}
$nombreU = $_POST["nombre"];