<?php
session_start();
$usuarioSession = $_SESSION['USUARIO'];
$grupo = $_SESSION['GRUPO'];
$contacto = $_SESSION['CONTACTO'];
$awa_session_id = $_SESSION['AWA_SESION_ID'];
include('../includes/conex.php');
include('../includes/eat.php');
include('../includes/historial.php');
if(!isset($usuarioSession) or $awa_session_id != $awa_id)
{
    eatCookies();
    header('Location:../index.php');
}
if(isset($_COOKIE['usuario']) AND $_COOKIE['usuario'] != $staticUsu )
{
    eatCookies();
    header('Loction:../index.php');
}
if(isset($_COOKIE['idioma']))
{
    include('../lg/LG_' . $_COOKIE['idioma'] . '.php');
}
else
{
    include('../lg/LG_SP.php');
}
$warning = htmlspecialchars(mysqli_real_escape_string($con,$_POST['warning']));
$w = 'VO_WARNING';
$danger = htmlspecialchars(mysqli_real_escape_string($con,$_POST['danger']));
$d = 'VO_DANGER';
$sql = "UPDATE VEHICULOS_PARAMETROS SET VALOR = ? WHERE PARAMETRO = ?";
$stmt = $con->prepare($sql);
$stmt->bind_param('is',$warning,$w);
$stmt->execute();
$sql = "UPDATE VEHICULOS_PARAMETROS SET VALOR = ? WHERE PARAMETRO = ?";
$stmt = $con->prepare($sql);
$stmt->bind_param('is',$danger,$d);
$stmt->execute();
$_SESSION['AJUSTES_PASS_OK'] = 2;
header("Location:../ajustes.php");
?>