<?php
include('../../validadores/validarSession.php');
include('../StoGlobal/include/conexion.php');
include('../StoGlobal/include/conexion1.php');
include('../StoGlobal/include/conexion3.php');
error_reporting(0);


if(isset($_GET['idCotiz'])){
    
    $id_cotizacion=$_GET['idCotiz'];
    
    
    $query = "
        UPDATE sto_cotizacion SET estado1 = '3' WHERE id_cotizacion = '".$id_cotizacion."' ";
        $statement = $conexion->prepare($query);
        $statement->execute($data);
        echo json_encode($_POST);

}

if(isset($_GET['idCotiz1'])){
    
    $id_cotizacion1=$_GET['idCotiz1'];
    
    
    $query = "
        UPDATE sto_cotizacion SET estado1 = '2' WHERE id_cotizacion = '".$id_cotizacion1."' ";
        $statement = $conexion->prepare($query);
        $statement->execute($data);
        echo json_encode($_POST);

}

if(isset($_GET['idCotiz0'])){
    $id_cotizacion1=$_GET['idCotiz0'];
    
    
    $query = "
        UPDATE sto_cotizacion SET estado1 = '0' WHERE id_cotizacion = '".$id_cotizacion1."' ";
        $statement = $conexion->prepare($query);
        $statement->execute($data);
        echo json_encode($_POST);
}

    echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";

?>