<?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');
include('../includes/functions.php');
include('../includes/esquemas.php');
include('../class/Schema.php');
include('../class/MotherCar.php');
include('../class/Expediente.php');
include('../class/Bibliotecas.php');
include('../class/Static.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');
}
$MotherCar = new MotherCar($con);

$MotherCar->set_codigo_vehiculo_tabla_vehiculos($_SESSION['CODIGO_COCHE']);
$MotherCar->set_llaves(Statics::SafeInput($con, $_POST['llaves']));
$MotherCar->set_velocidades(Statics::SafeInput($con, $_POST['velocidades']));
$MotherCar->set_motor_cc(Statics::SafeInput($con, $_POST['motor']));
$MotherCar->set_procedencia(Statics::SafeInput($con, $_POST['procedencia']));
$MotherCar->update_vehiculo();

$_SESSION['MSG_INFO'] = 'SECUNDARIO';
Statics::add_trace_history($con, $usuarioSession, $_SESSION['CODIGO_COCHE'], 2, $datos_principales_lg);
header("Location:../resultados-editar.php");

?>