MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/public_html/cartera/cartera_consulta_titu_usuario.php
<?php
global $dbi, $numpro,$numprohis,$bene, $cre,$vigente,$numben,$numbenhis,$anoapl;
$espacio = ' ';
$linea = '-';
require_once("../Conectarse.php");


$control = mysql_query('SELECT 
cs.cedula,
cs.codigo_militar,
cs.nombre,
cs.grado,
cs.numerocontrato,
tipocontrato,
numero_libranza,
cs.tipo_afiliado,
cs.codigo_sucursal,
cs.direccion,
cs.telefono,
cs.celular,
cs.ciudad,
cs.email,
cs.cuenta,
cs.banco,
cs.entidad_laboral,
cs.unidad_descuento,
cs.codigo_descuento,
cs.entidad_recaudo,
cs.fecha_nacimiento,
cs.fecha_afiliacion,
cs.fecha_validacion,
cs.valorcontrato,
cs.numerocuotas,
cs.valorcuota,
cs.fecha_inicio_contrato,
cs.fecha_termino_contrato,
cs.fecha_ultimo_registro,
cs.mes_inicio,
cs.ano_inicio,
cs.mes_termino,
cs.ano_termino,
cs.saldoanteior,
cs.cuotaspendientes,
cs.cuotasdescontadas,
cs.saldonuevo,
cs.vendedor,
cs.director,
cs.beneficiarios,
cs.renovacion,
cs.causal_terminacion,
cs.fecha_terminacion,
cs.estado,
cs.fecha_ultima_modificacion,
cs.fecha_activacion,

pr.numero_proceso,
pr.tipo_proceso,
pr.numero_contrato,
pr.tipo_contrato,
pr.codigo_sucursal,
pr.clase_negocio,
pr.despacho_judicial,
pr.ciudad_despacho,
pr.tipo_afiliado,
pr.calidad_juridica_afiliado,
pr.tipo_orden,
pr.numero_carpeta,
pr.ultimo_folio,
pr.codigo_abogado,
pr.fecha_actuacion,
pr.actividad_proceso,
pr.estado_proceso 

FROM cartera_serviasjudinet AS cs
INNER JOIN procesos as pr ON pr.cedula=cs.cedula
INNER JOIN actuaciones as ac ON cs.cedula=ac.cedula
WHERE  cs.cedula= "' . $_GET["ced2"].'" and cs.numerocontrato ="'.$_GET["numcon"].'" ');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
$num=mysql_num_rows($control); 
list($cedula,$codi,$apes,$grad,$numcont,$plan,$num_lib,$titular,$codigosu,$dire,$tele,$celul,$ciud,$email,$cue,$ban,$enti,$unides,$codides,$entre,$fecna,$fechafil,$fechaval,$valcon,$numcuo,$valcuo,$fechainicio,$fechatermino,$fechaul,$mesini,$anoini,$mesfin,$anofin,$salant,$cupen,$cudesc,$salnue,$ven,$director,  $benet,$renova,$causal,$fechater,$esta,$modificacion,$activacion,

$cedu,$numero_proceso,$tipo_proceso,$numero_contrato,$tipo_contrato,$codigo_sucursal,$clase_negocio,$despacho_judicial,$ciudad_despacho,$tipo_afiliado,$calidad_juridica_afiliado,$tipo_orden,$numero_carpeta,$ultimo_folio,$codigo_abogado,$fecha_actuacion,$actividad_proceso,$estado_proceso) = mysql_fetch_row($control);
$inipag = $anoini.'-'.$mesini; 



echo $_GET["numcon"];


if ($causal > 00)
{
$control = mysql_query('SELECT  concepto FROM descuentos WHERE codigo = "'.$causal.'" and (unidad = "'.$unides.'" || unidad = "" ) ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}

 if ((mysql_num_rows($control)== 0)) 
	                    {
						
	$control = mysql_query('SELECT concepto FROM descuentos WHERE codigo = "'.$causal.'" ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}

						}
						
	list($causal) = mysql_fetch_row($control);
}

if ($esta == 1)
{
$estado = "VIGENTE";
}
else{
$estado = "HISTORICO";
}

$control = mysql_query('SELECT * FROM  cartera_estado_contable  WHERE cedula = "' . $_GET["ced2"] . '" and contrato =  "' . $_GET["numcon"] . '" ORDER BY id ASC ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}

while(list($id,$ceduc,$nombrec,$contrato,$tipo,$cuotac,$mescuotac,$anocuotac,$valorcuotac,$fecha_registroc,$fecha_nomina,$codescc,$unidescc) = mysql_fetch_row($control)) 
		{
				if ($cudesc == $cuotac and $contrato == $numcont)
						{
						$mesapl= $mescuotac;
						$anoapl= $anocuotac;
						//$fechaul = $fecha_nomina;
						}
		}
		
		
		
		
		$controlado = mysql_query('SELECT  vendedor   FROM  vendedores    WHERE codigo  = "' . $ven. '" ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}
			$fil = mysql_num_rows($controlado);
			
			if ($fil =="0")
			{
				
			$ven =$ven;
	
			}
	else {
		
		list($ven) = mysql_fetch_row($controlado);
		
		}
		
		
//consulta PROCESOS JURIDICOS 

	
                              {
							$numpro = $numpro + 1 ; 
								}
		
$control99 = mysql_query('SELECT cedula,numero_proceso,tipo_proceso,numero_contrato,tipo_contrato,codigo_sucursal,
clase_negocio,despacho_judicial,ciudad_despacho,tipo_afiliado,calidad_juridica_afiliado,tipo_orden,numero_carpeta, ultimo_folio,codigo_abogado,fecha_actuacion,actividad_proceso,estado_proceso FROM procesos_historicos
 WHERE cedula = "' . $_GET["ced2"].'" and numero_contrato = "'.$_GET["numcon"].'"');
			if (!$control99) {
				die('Invalid query: ' . mysql_error());
			}  

while(list($cedu,$numero_proceso,$tipo_proceso,$numero_contrato,$tipo_contrato,$codigo_sucursal,$clase_negocio,$despacho_judicial,$ciudad_despacho,$tipo_afiliado,$calidad_juridica_afiliado,$tipo_orden,$numero_carpeta,$ultimo_folio,$codigo_abogado,$fecha_actuacion,$actividad_proceso,$estado_proceso) = mysql_fetch_row($control99)) 
                              {
							$numprohis = $numprohis + 1 ; 
								}
		
		
$cont = mysql_query('SELECT cedula,cedula_titular FROM beneficiarios WHERE cedula_titular = "'.$_GET["ced2"].'" and numero_contrato_titular  = "'.$_GET["numcon"].'" ');
			if (!$cont) {
				die('Invalid query: ' . mysql_error());
			}

while(list($ceduc,$cedtiu ) = mysql_fetch_row($cont)) 
		{
				$bene = $bene + 1;
				
		}	
					
					
$controlgg = mysql_query('SELECT cedula,cedula_titular FROM beneficiarios WHERE cedula_titular = "'.$_GET["ced2"].'" and numero_contrato_titular = "'.$_GET["numcon"].'"');
			if (!$controlgg) {
				die('Invalid query: ' . mysql_error());
			}

while(list($ceduc,$cedtiu ) = mysql_fetch_row($controlgg)) 
		{
			
$control88 = mysql_query('SELECT cedula,numero_proceso,tipo_proceso, numero_contrato,tipo_contrato,codigo_sucursal,
clase_negocio,despacho_judicial,ciudad_despacho,tipo_afiliado,calidad_juridica_afiliado,
tipo_orden,numero_carpeta, ultimo_folio,codigo_abogado,fecha_actuacion,actividad_proceso,estado_proceso FROM procesos WHERE cedula = "' .$ceduc. '"  and numero_contrato  =  "'.$_GET["numcon"].'" ');
			if (!$control88) {
				die('Invalid query: ' . mysql_error());
			}  
			while(list($cedu,$numero_proceso,$tipo_proceso,$numero_contrato,$tipo_contrato,$codigo_sucursal,$clase_negocio,$despacho_judicial,$ciudad_despacho,$tipo_afiliado,$calidad_juridica_afiliado,$tipo_orden,$numero_carpeta,$ultimo_folio,$codigo_abogado,$fecha_actuacion,$actividad_proceso,$estado_proceso) = mysql_fetch_row($control88)) 
                              {
				$numben = $numben + 1 ; 
								}
			
			
			 $control = mysql_query('SELECT cedula,numero_proceso,tipo_proceso,numero_contrato,tipo_contrato,codigo_sucursal,clase_negocio,despacho_judicial,ciudad_despacho,tipo_afiliado,calidad_juridica_afiliado,tipo_orden,numero_carpeta, ultimo_folio,codigo_abogado,fecha_actuacion,actividad_proceso,estado_proceso FROM procesos_historicos
 WHERE cedula = "' .$ceduc. '"  and numero_contrato  =  "' .$_GET["numcon"] . '" ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}  
			while(list($cedu,$numero_proceso,$tipo_proceso,$numero_contrato,$tipo_contrato,$codigo_sucursal,$clase_negocio,$despacho_judicial,$ciudad_despacho,$tipo_afiliado,$calidad_juridica_afiliado,$tipo_orden,$numero_carpeta,$ultimo_folio,$codigo_abogado,$fecha_actuacion,$actividad_proceso,$estado_proceso) = mysql_fetch_row($control)) 
                              {
				$numbenhis = $numbenhis + 1 ; 
								}
		}
								
			
//AQUI ACABA LA CONSUTA DE PROCESOS JURIDICOS 

//		CONSULTA SI TIENE CREDITO
		 $con = mysql_query('SELECT cedula,estado FROM creditos_serviasjudinet  WHERE cedula =  "' . $_GET["ced2"] . '" || codigo =  "' . $_GET["ced2"] . '"  ');
		  if (!$con) {
				die('Invalid query 1: ' . mysql_error());
			}
		$numcre=mysql_num_rows($con); 
		list($cedcre,$estacre) = mysql_fetch_row($con);
		
		if ($numcre == '0')
		{
		$cre = 'NO';
		}else{
		
			if ($estacre == 0)
			{
		$vigente = "H" ; 
		$cre = 'SI';
			}else
			{
			$vigente = "V"; 
			$cre = 'SI';
			}
		}
// AQUI ACABA CONSULTA CREDITOS


if(isset($_POST["proce"]))
{
 $ced2 = $_GET["ced2"];
		$numcon = $_GET["numcon"];
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='cartera_num_procesos_sus.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
}

if(isset($_POST["bene"]))
{
			 $ced2 = $_GET["ced2"];
		$numcon = $_GET["numcon"];		
$control = mysql_query('SELECT  cedula,cedula_titular FROM  beneficiarios   WHERE cedula_titular = "' . $HTTP_GET_VARS["ced2"] . '" ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}

list($ceduc,$cedtiu ) = mysql_fetch_row($control);

echo "<SCRIPT LANGUAGE='javascript'>window.location.href='consulta_titu_benefi_sus.php?ced2=$ced2&cedb=$ceduc&numcon=$numcon'</SCRIPT>";
}



 $control = mysql_query('SELECT nombre FROM sucursal  WHERE codigo = "' . "$codigosu". '" ');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
		list($codigosu) = mysql_fetch_row($control);
	
		  		$cont10 = mysql_query('SELECT nombre  FROM entidad_laboral WHERE codigo = "' . "$enti". '"');
		  if (!$cont10) {
				die('Invalid query 2: ' . mysql_error());
			}
		list($enti) = mysql_fetch_row($cont10);
		
		 		$cont10 = mysql_query('SELECT nombre  FROM director_ventas WHERE codigo = "' . "$director". '"');
		  if (!$cont10) {
				die('Invalid query 3: ' . mysql_error());
			}
		list($director) = mysql_fetch_row($cont10);
	
		$cont10 = mysql_query('SELECT concepto FROM descuentos WHERE id = "' . "$entre". '"');
		  if (!$cont10) {
				die('Invalid query 11: ' . mysql_error());
			}
		list($entre) = mysql_fetch_row($cont10);
		
		/*$cont10 = mysql_query('SELECT vendedor FROM vendedores  WHERE codigo = "' . "$ven". '" ');
		  if (!$cont10) {
				die('Invalid query 12: ' . mysql_error());
			}
		list($ven) = mysql_fetch_row($cont10);*/
		

			   if ($plan > 0)
						  {
						   $cont10 = mysql_query('SELECT codigo_contrato FROM planes_contratos WHERE codigo = "' . "$plan". '" ');
		  if (!$cont10) {
				die('Invalid query 42: ' . mysql_error());
			}
		list($plan) = mysql_fetch_row($cont10); 
						 }


$sql = mysql_query('SELECT * FROM entidad_laboral order by nombre ');
			if (!$sql) {
				die('Invalid query: ' . mysql_error());
			}	
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);  

$sql2 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql2) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);  


$sql3 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql3) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql3 = mysql_fetch_assoc($sql3);
$totalRows_sql3 = mysql_num_rows($sql3);


$sql4 = mysql_query('SELECT * FROM vendedores WHERE estado = "1" order by vendedor');
			if (!$sql4) {
				die('Invalid query: ' . mysql_error());
			}
		$row_sql4 = mysql_fetch_assoc($sql4);
		$totalRows_sql4 = mysql_num_rows($sql4);


$sql5 = mysql_query('SELECT * FROM sucursal order by nombre ');
			if (!$sql5) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql5 = mysql_fetch_assoc($sql5);
$totalRows_sql5 = mysql_num_rows($sql5); 


$sql6 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql6) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql6 = mysql_fetch_assoc($sql6);
$totalRows_sql6 = mysql_num_rows($sql6); 

$sql7 = mysql_query('SELECT * FROM director_ventas WHERE estado = "1" order by nombre');
			if (!$sql7) {
				die('Invalid query: ' . mysql_error());
			}	
		$row_sql7 = mysql_fetch_assoc($sql7);
		$totalRows_sql7 = mysql_num_rows($sql7); 
		
		
$sql8 = mysql_query('SELECT * FROM planes_contratos  WHERE codigo != "7" and codigo != "8" order by codigo ');
			if (!$sql8) {
				die('Invalid query: ' . mysql_error());
			} 
$row_sql8 = mysql_fetch_assoc($sql8);
$totalRows_sql8 = mysql_num_rows($sql8);

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Formulario Cartera</title>
    
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta charset="iso-8859-1">
    <meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    
<style>
    
*{margin: 0;padding: 0;}
.main{margin: 0;padding: 0;}
body{background-image:url(../ELEMENTOS/fondo.jpg);}
header {
    background-color: #E8E8E8;
    padding: 0 50px 0 50px;    
    width: 100%;
    margin: 0 auto;
    display: flex;
    display: -webkit-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: space-between;
}
.titulo{margin: 0 auto;text-align: center;background-color: #0b6d0f;color: #fff;padding: 4px; font-size: 18px;}
table{border: 1px solid;margin: 0 auto;}
td{background-color: #e6e6e6; border: 0.5px solid; border-color: #06801d;padding: 1px 4px; font-size: 13px;font-weight: 700;}
.roja{color: #e50000;}        
input[type=text]{padding: 2px 4px; background-color: s;font-weight: 400;}
.centrada{text-align: center;}
.botones{padding: 2px;width: 100%;text-align: center;margin: 0 auto;}
input[type=submit],input[type=button]{padding: 3px;background-color: #071e7b;color: #ffffff;}

.divirmenu{text-align: center;}  
.irmenu{width: 200px; background-color: #005f1d; color: #fff; padding: 4px; border-radius: 6px; margin-top: 5px; margin-bottom: 5px;}
.irmenu:hover{background-color: #a4ceb1; color: #000;}
    
.tdform{background-color: #FFCC66; color: #000; padding: 2px;}
    
</style>
    
</head>
<body>
  
<header>       
    <div class="banner">
        <h1><a href="http://www.asjudinet.com"><img src="../ELEMENTOS/bannerInterasjudinet.png" alt="" width="380" height="60"></a></h1>
    </div>
</header> 

  
<h3 class="titulo">Solicitud Cartera Juridica</h3>
   
<form action="" method="post">
    <table>
        <tr>
            <td>Fecha Activacion :</td>
            <td><input class="roja" type="text" name="activacion" id="activacion" value="<?php echo $activacion ?>" readonly></td>
                
            <td>Fecha De modificacion :</td>
            <td><input class="roja" type="text" name="modificacion" id="modificacion "value="<?php echo $modificacion ?>" readonly></td>
                
            <td>Fecha De Afiliacion :</td>
            <td colspan="3"><input class="roja" name="afiliafecha" id="afiliafecha" type="text" value="<?php echo $fechafil ?>" readonly></td>
        </tr>
            
        <tr>
            <td>Fecha De Validacion :</td>
            <td><input type="text" name="fechaval" id="fechaval" value="<?php echo $fechaval ?>" readonly></td>
            
            <td>Sucursal :</td>
            <td><input type="text" name="codigosu" id="codigosu" value="<?php echo $codigosu ?>" readonly></td>
            
            <td>Credito :</td>
            <td align="center">
                <input class="roja" name="cre" id="cre" type="text" size="5" value="<?php echo $cre ?>" readonly> -
                <input class="roja" name="vigente" id="vigente" type="text" size="5" value="<?php echo $vigente ?>" readonly>
            </td>
        </tr>
        
        <tr>
            <td>Apellidos y Nombres :</td>
            <td colspan="3"><input type="text" name="apenom" id="apenom" size="60px" value="<?php echo $apes  ?>" readonly></td>
            
            <td>Cedula No :</td>
            <td><input type="text" name="cedb" id="cedb" value="<?php echo $cedula ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Codigo Militar :</td>
            <td><input type="text" name="cod" id="cod" value="<?php echo $codi ?>" readonly></td>
            
            <td>Grado :</td>
            <td><input type="text" name="gra" id="gra" value="<?php echo $grad ?>" readonly></td>
            
            <td>Fecha de Nacimiento :</td>
            <td><input type="text" name="fecna" id="fecna" value="<?php echo $fecna ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Ciudad :</td>
            <td><input type="text" name="ciud" id="ciud" value="<?php echo $ciud ?>" readonly></td>
            
            <td>Direccion :</td>
            <td colspan="3"><input name="dire" id="dire" type="text" size="72" value="<?php echo $dire ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Telefono :</td>
            <td><input type="text" name="tel" id="tel" value="<?php echo $tele ?>" readonly></td>
            
            <td>Celular :</td>
            <td><input type="text" name="cel" id="cel" value="<?php echo $celul ?>" readonly></td>
            
            <td>Email :</td>
            <td><input type="text" name="email" id="email" value="<?php echo $email ?>" readonly></td>
        </tr>
        <tr>
            <td>Plan :</td>
            <td><input type="text" name="plan" id="plan" value="<?php echo $plan ?>" readonly></td>
            
            <td>Cuenta No :</td>
            <td><input type="text" name="cue" id="cue" value="<?php echo $cue ?>" readonly></td>
            
            <td>Banco :</td>
            <td><input type="text" name="ban" id="ban" value="<?php echo $ban ?>" readonly></td>
        </tr>
        <tr>
            <td>Numero Contrato :</td>
            <td><input type="text" name="numcont" id="numcont" value="<?php echo $numcont ?>" readonly></td>
            
            <td>Numero Libranza :</td>
            <td><input type="text" name="num_lib" id="num_lib" value="<?php echo $num_lib ?>" readonly></td>
            
            <td>Vendedor :</td>
            <td><input type="text" name="vendedor" id="vendedor"value="<?php echo $ven ?>" readonly></td>
        </tr>
        <tr>
            <td>Valor Contrato :</td>
            <td><input type="text" name="valcon" id="valcon" value="<?php echo $valcon ?>" readonly></td>
            
            <td>Numero De Cuotas :</td>
            <td><input type="text" name="numcuo" id="numcuo" value="<?php echo $numcuo ?>" readonly></td>
            
            <td>Valor Cuotas :</td>
            <td><input type="text" name="valcuo" id="valcuo" value="<?php echo $valcuo ?>" readonly></td>
        </tr>
        <tr>
            <td>Cuotas Pendientes :</td>
            <td><input type="text" name="cupen" id="cupen" value="<?php echo $cupen ?>" readonly></td>
            
            <td>Cuotas Descontadas :</td>
            <td><input type="text" name="cudesc" id="cudesc" value="<?php echo $cudesc ?>" readonly></td>
            
            <td>Saldo Anterior :</td>
            <td><input type="text" name="salant" id="salant" value="<?php echo $salant ?>" readonly></td>
        </tr>
        <tr>
            <td>Saldo Nuevo :</td>
            <td><input type="text" name="salnue" id="salnue" value="<?php echo $salnue ?>" readonly></td>
            
            <td>Numero de Beneficiarios :</td>
            <td><input type="text" name="bene" id="bene" value="<?php echo $bene ?>" readonly></td>
            
            <td>Fecha Inicio Pagos :</td>
            <td><input type="text" name="iniciopag" id="iniciopag" value="<?php echo $inipag ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Fecha Inicio Contrato :</td>
            <td><input type="text" name="fechainicio" id="fechainicio" value="<?php echo $fechainicio ?>" readonly></td>
            
            <td>Fecha Termino Contrato :</td>
            <td><input type="text" name="fechatermino" id="fechatermino" value="<?php echo $fechatermino ?>" readonly></td>
            
            <td>Fecha Ultimo Pago - Mes Aplicado : </td>
            <td align="center">
            <input type="text" name="fechaul" id="fechaul" value="<?php echo $fechaul ?>" size="6" readonly> - 
            <input type="text" name="fechapl" id="fechapl" value="<?php echo $anoapl ?>" size="4" readonly>
            </td>
        </tr>
        
        <tr>
            <td>Entidad Recaudo :</td>
            <td colspan="3"><input type="text" name="entre" id="entre" size="60" value="<?php echo $entre ?>" readonly></td>
            
            <td>Unidad y Codigo Descuento :</td>
            <td align="center">
            <input type="text" name="unides" id="unides" size="6" value="<?php echo $unides ?>" readonly> - 
            <input type="text" name="codides" id="codides" size="4" value="<?php echo $codides ?>" readonly>
            </td>
        </tr>
        
        <tr>
            <td>Entidad Laboral :</td>
            <td colspan="2"><input type="text" name="enti" id="enti" size="46" value="<?php echo $enti ?>" readonly></td>
            
            <td>Director :</td>
            <td colspan="2"><input type="text" name="direc" id="direc" size="46" value="<?php echo $director ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Causal Terminacion :</td>
            <td colspan="2"><input type="text" name="causal" id="causal" size="46" value="<?php echo $causal ?>" readonly></td>
            
            <td>Fecha Anulacion :</td>
            <td colspan="2"><input type="text" name="fechater" id="fechater" size="46" value="<?php echo $fechater ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Renovacion Contrato :</td>
            <td><input type="text" name="renova" id="renova" value="<?php echo $renova ?>" readonly></td>
            
            <td>Procesos Juridicos Titular Vig :</td>
            <td><input type="text" name="numpro" id="numpro" value="<?php echo $numpro ?>" readonly></td>
            
            <td>Procesos Juridicos Beneficiario Vig :</td>
            <td><input type="text" name="numben" id="numben" value="<?php echo $numben ?>" readonly></td>
        </tr>
        
        <tr>
            <td>Contrato :</td>
            <td><input type="text" name="estado" id="estado" value="<?php echo $estado ?>" readonly></td>
            
            <td>Procesos Juridicos Titular His :</td>
            <td><input type="text" name="numprohis" id="numprohis" value="<?php echo $numprohis ?>" readonly></td>
            
            <td>Procesos Juridicos Beneficiario His :</td>
            <td><input type="text" name="numbenhis" id="numbenhis" value="<?php echo $numbenhis ?>" readonly></td>
        </tr>
             
        <tr>
            <td colspan="6">
            <div class="botones">
            <?php
            $ced2 = $_GET["ced2"];
            $numcon = $_GET["numcon"];
            echo "<input type='button' value='CONSULTA CREDITO' name=boton class=Estilo50 onClick =window.open('cartera_credito_listado.php?ced2=$ced2&numcon=$numcon&tipo=$plan','','top=50,left=100,toolbar=no,scrollbars=yes,width=810,height=530,status=yes')></a>"; ?>
                  
            <input class="boton" type="submit" value="PROCESOS TITULAR">
            <input class="boton" type="submit" value="CONSULTA BENEFICFIARIOS">
        
            <?php 
            $ced2 = $_GET["ced2"];
            $numcon = $_GET["numcon"];
            echo "<input type='button' value='CONSULTAR CONTACTO' name=boton class=Estilo50 onClick =window.open('consulta_contacto.php?ced2=$ced2&numcon=$numcon&tipo=$plan','','top=50,left=100,toolbar=no,scrollbars=yes,width=810,height=530,status=yes')></a>"; ?>
            </div>
            </td>
        </tr>
        
        <!--<tr>
        <td colspan="6" align="center">
        <input name="menu2" type="button" id="menu2" class="irmenu" onClick="window.location.href='consulta_cartera.php'" value="IR AL MENU">
        </td>
        </tr>-->
    </table>
</form>
  
<div class="divirmenu">
    <input name="menu2" type="button" id="menu2" class="irmenu" onClick="window.location.href='consulta_cartera.php'" value="IR AL MENU">
</div>

</body>
</html>



<?php
/*<tr align="center"> 
    <td colspan="7"><font face="Georgia,Times New Roman,Times,serif" color="#006600"><b align = "center">PAGOS EFECTUADOS</b></font></td>
  </tr>*/
echo "<h3 class='titulo'>Pagos Efectuados</h3>";
echo'<table width="900" border="0" cellspacing="2" cellpadding="2" align = "center">
  
<tr align="center" class=tdform> 
    <td class=tdform>Valor cuota</td>
    <td class=tdform># cuotas</td>
    <td class=tdform>Mes</td>
	<td class=tdform>Año</td>
    <td class=tdform>Fecha pago</td>
    <td class=tdform>Entidad</td>
    <td class=tdform>Fecha registro</td>
</tr>';				  


$control = mysql_query('SELECT * FROM  cartera_estado_contable  WHERE cedula = "'.$_GET["ced2"].'"  and contrato =  "'.$_GET["numcon"].'" ORDER BY cuota ASC  ');
    if (!$control) {
	   die('Invalid query: ' . mysql_error());
    }

	while(list($id,$cedula,$nombre,$contrato,$tipo,$cuota,$mescuota,$anocuota,$valorcuota,$fecha_registro,$fecha_nomina,$codesc,$unidesc) = mysql_fetch_row($control)) 
    {
				   
		$control5 = mysql_query('SELECT * FROM descuentos WHERE codigo = "' ."$codesc". '" and unidad = "' ."$unidesc". '" ');
        if (!$control5) {
            die('Invalid query: ' . mysql_error());
        }	 
			list($idr,$codigo,$unidad,$concepto) = mysql_fetch_row($control5);
		
 	  printf ("<tr align='center' bgcolor='#f4f4f4'>
			<td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\">$valorcuota</a></td>
<td width='100'> <font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a  window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$cuota</a></td><td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a  window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$mescuota</a></td>
<td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a  window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$anocuota</a></td>
<td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_nomina</a></td>
<td width='750'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=250,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$concepto</a></td>
<td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_registro</a></td></tr>");
						            								   
                               }
 echo "</table>";		
?>