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/www/descargar_archivos_libranzas.php
<?php

require_once("Conectarse.php");
include ("config.php");
global $dbi;


  



if ($_GET["libranza"]>="0" and  $_GET["libranza"]<="5000")
  {

$result = mysql_query('SELECT * FROM libranzas_5000 WHERE cedula= "'.$_GET["cedula"].'" and clase_contrato= "'.$_GET["tipo"].'" and numero_libranza="'.$_GET["libranza"].'" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
if ((mysql_num_rows($result)!=0)) 
{

			$row = mysql_fetch_row($result);
            $cedula = $row[0];
			$nombre = $row[6];
			$contenido = $row[7];
			$tipo = $row[8];
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 

}  
  }
  
  ///// PARTE 2
  
  if ($_GET["libranza"]>"5000" and  $_GET["libranza"]<="10000")
  {

$result = mysql_query('SELECT * FROM libranzas_10000 WHERE cedula= "'.$_GET["cedula"].'" and clase_contrato= "'.$_GET["tipo"].'" and numero_libranza="'.$_GET["libranza"].'" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
if ((mysql_num_rows($result)!=0)) 
{

			$row = mysql_fetch_row($result);
            $cedula = $row[0];
			$nombre = $row[6];
			$contenido = $row[7];
			$tipo = $row[8];
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 

}  
  }

 ///// PARTE 3
  
  if ($_GET["libranza"]>"10000" and  $_GET["libranza"]<="15000")
  {

$result = mysql_query('SELECT * FROM libranzas_15000 WHERE cedula= "'.$_GET["cedula"].'" and clase_contrato= "'.$_GET["tipo"].'" and numero_libranza="'.$_GET["libranza"].'" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
if ((mysql_num_rows($result)!=0)) 
{

			$row = mysql_fetch_row($result);
            $cedula = $row[0];
			$nombre = $row[6];
			$contenido = $row[7];
			$tipo = $row[8];
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 

}  
  }


 ///// PARTE 4
  
  if ($_GET["libranza"]>"15000" and  $_GET["libranza"]<="20000")
  {

$result = mysql_query('SELECT * FROM libranzas_20000 WHERE cedula= "'.$_GET["cedula"].'" and clase_contrato= "'.$_GET["tipo"].'" and numero_libranza="'.$_GET["libranza"].'" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
if ((mysql_num_rows($result)!=0)) 
{

			$row = mysql_fetch_row($result);
            $cedula = $row[0];
			$nombre = $row[6];
			$contenido = $row[7];
			$tipo = $row[8];
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 

}  
  }
  
/// PARTE 5  
  
  if ($_GET["libranza"]>="20000" and  $_GET["libranza"]<="30000")
  {

$result = mysql_query('SELECT * FROM libranzas_30000 WHERE cedula= "'.$_GET["cedula"].'" and clase_contrato= "'.$_GET["tipo"].'" and numero_libranza="'.$_GET["libranza"].'" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
if ((mysql_num_rows($result)!=0)) 
{

			$row = mysql_fetch_row($result);
            $cedula = $row[0];
			$nombre = $row[6];
			$contenido = $row[7];
			$tipo = $row[8];
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido; 

}  
  }
  

  
  

?>