MOON
Server: Apache
System: Linux kvm.asjudinet.com 5.14.0-611.54.6.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 04:23:18 EDT 2026 x86_64
User: asjudine (1001)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/asjudine/public_html/descargar_archivos_notificacion.php
<?php
require_once("mainfile.php");
require_once("Conectarse.php");
include ("config.php");
global $dbi;

$fecha_actual=date("Y/m/d");
$time=strftime( "%H-%M-%S", time() );

	
//$query_Recordset1 = "SELECT * FROM archivos where id = $Id";
//$Recordset1 = mysql_query($query_Recordset1, $dbi) or die(mysql_error());

			$result = mysql_query('SELECT * FROM notificaciones_correspondencia WHERE id = "' . $_GET["Id"]  . '"');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}



if ((mysql_num_rows($result)!=0)) 
{


//		if ((mysql_num_rows($Recordset1)!=0)) 
//		{	 

//			list($Id, $nombre, $fechar, $hora, $contenido, $tipo, $Identificacion, $registro, $registro_interno)  = mysql_fetch_row($Recordset1);
			$row = mysql_fetch_row($result);

			$id = $row[0];
			$nombre = $row[8];
			$contenido = $row[9];
			$tipo = $row[10];
			
			
			
			
//		}			
		
			
/*		$nombre = mysql_result($Recordset1, 0, "nombre");
		$tipo = mysql_result($Recordset1, 0, "tipo");
		$contenido = mysql_result($Recordset1, 0, "contenido");*/

/*
$csqle1 = mysql_query("INSERT INTO notificaciones_correspondencia (cedula,fecha,hora_descargue,radicado,id_archivo,actuaciones_de_envio) VALUES ('".$row[6]."','".$fecha_actual."','".$time."','".$row[7]."','".$_GET["Id"]."','ESTA ES LA FECHA Y HORA EN QUE EL AFILIADO SE NOTIFICO')"); */

header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 
//echo $contenido;




}



else 

{
	
				$result = mysql_query('SELECT * FROM archivos_nuevos WHERE id = "' . $_GET["Id"]  . '"');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}






//		if ((mysql_num_rows($Recordset1)!=0)) 
//		{	 

//			list($Id, $nombre, $fechar, $hora, $contenido, $tipo, $Identificacion, $registro, $registro_interno)  = mysql_fetch_row($Recordset1);
			$row = mysql_fetch_row($result);

			$id = $row[0];
			$nombre = $row[1];
			$contenido = $row[4];
			$tipo = $row[5];
			
//		}			
		
			
/*		$nombre = mysql_result($Recordset1, 0, "nombre");
		$tipo = mysql_result($Recordset1, 0, "tipo");
		$contenido = mysql_result($Recordset1, 0, "contenido");*/



header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 
//echo $contenido;


}
	


?>