<?php

include "../../../../../lib/mysql/dbconnector.php";
include "../../../../../lib/mysql/conexion01.php";
include "../../../../../lib/mysql/utilidades.php";
include "../../../modelo/ModeloVenta.php";
session_start();
$venta = new ModeloVenta();
// -------------------------------------------------------- INPUT
$in['campania'] = Utilidades::clear_input(Utilidades::sanear_string($_POST['campania']));
$in['venta_id'] = Utilidades::clear_input_id($_POST['venta_id']);
// -------------------------------------------------------- DATA
$listado = $venta->getTransparenciaByVentaId($in);
// -------------------------------------------------------- TEST
// Utilidades::printr($in);
// Utilidades::printr($listado);
// ------------------------------------------------------- OUPUT
echo '<table style="width:100%">';
echo '<thead>';
echo '<tr>';
echo '<td width="100px">Fecha</td>';
echo '<td width="150px">Usuario</td>';
echo '<td width="200px">Campos</td>';
echo '<td>Detalles</td>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
if (is_array($listado)) {
    foreach ($listado as $row) {
        $json = json_decode($row['json'], true);
        // Utilidades::printr($json);