File: /home/asjudine/public_html/abogados/descargar_archivos_vigi_judicial.php
<?php
require_once("../Conectarse.php");
global $dbi;
$result = mysql_query('SELECT nombre_vigi_judi, contenido_vigi_judi, tipo_vigi_judi FROM procesos WHERE cedula= "'.$_GET["cedula"].'" and numero_proceso = "'.$_GET["numpro"].'" ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($result)!=0))
{
list($nombre,$contenido,$tipo) = mysql_fetch_row($result);
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido;
}
?>