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/credito_consulta_titular_financiera_cero_pagos.php
<?php 
require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$linea = '-';

require_once("Conectarse.php");

$resul = mysql_query('SELECT  cedula , codigo, nombre, grado,  direccion, telefono, celular, ciudad, email, numero_libranza, unidad_descuento, codigo_descuento, sucursal, fecha_credito, valor_credito, cuotas_credito, valor_cuota, cuotas_descontadas, cuotas_pendientes, saldo_anterior, saldo_nuevo, cuenta_ahorros, banco, neto_consignar, interes_deducible, numero_desembolso,  mes_inicio, ano_inicio, mes_termino, ano_termino, mes_aplicado, ano_aplicado, fecha_ultimo_descuento, empresa, proveedor, causal, estado FROM creditos_serviasjudinet  WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '" and numero_libranza = "' . $HTTP_GET_VARS["numlib"] . '" ');

			if (!$resul) {
				die('Invalid query: ' . mysql_error());
			}
		list($cedula, $codigo, $nombre, $grado, $direccion, $telefono, $celular, $ciudad, $email, $numlib, $unidesc, $codidesc, $sucursal, $fecha, $monto, $numcuo, $valcuo, $cuodesc, $cuopen, $salant, $salnue, $cuenta, $banco, $neto, $interes ,$numdesem, $mesini, $anoini,$mesfin, $anofin, $mesapli, $anoapli, $fechadescuento, $empresa, $proveedor, $causal,  $estado) = mysql_fetch_row($resul);		

 $fechapago = $mesini - $anoini;


  							 if ($estado == 0)
							   {
							   $esta = "HISTORICO";
							   }   				
							   else
							   {
							   $esta = "VIGENTE";
							   }
							
							$tere = 0;   
					 $con1 = mysql_query('SELECT cedula,numerocontrato FROM  cartera_serviasjudinet  WHERE cedula = "' . "$cedula". '"  and estado =  "1" ');
			if (!$con1) {
				die('Invalid query: ' . mysql_error());
			}
while(list($cedut,$numero) = mysql_fetch_row($con1)) 
		{
				$tere = $tere + 1 ;
		} 
						
							   
							   


$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 proveedores order by nombre ');
			if (!$sql2) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);

$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); 




?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>INGRESAR SOLICITUD CARTERA</title>


<style type="text/css">
<!--
.est_cont5 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	font-style: normal;
	font-weight: normal;
	background-color: #EDFAF4;
	margin: 2px;
	padding: 2px;
	height: auto;
	width: auto;
	border: thin groove #E9AAF0;
	color: #C72350;
}
.color_fondo_sc {
	background-color: #DCE0E4;
}
.est_cont2 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #2B39EC;
	background-color: #F0F5CF;
	height: 18px;
	width: auto;
	border: thin solid #FABF85;
}
.est_cont6 {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #006262;
	background-color: #EDFED3;
	margin: 1px;
	padding: 1px;
	height: auto;
	width: auto;
	border: thin solid #D9B6F8;
}
.sol_cre1 {
	font-family: "Times New Roman", Times, serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #0B3495;
	background-color: #E6FAFF;
	margin: 1px;
	padding: 1px;
	height: 18px;
	width: auto;
	border: thin outset #56AD95;
}
.col_cre2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	color: #F92F0B;
	background-color: #B3D9F0;
	height: auto;
	width: auto;
	border: medium groove #FC9227;
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.recaudo {font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	font-variant: normal;
	color: #000000;
	background-color: #B6CBDC;
	margin: 4px;
	padding: 8px;
	width: auto;
	border: medium outset #339966;
}
.campo1 {background-color: #B7FFFF;
	border: thin dashed #B6B6B6;
}
.campo1 {font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	font-style: normal;
	font-weight: bold;
	background-color: #E1EFFD;
	border: thin doble #009999;
}
.campo1 {	font-family: "Courier New", Courier, monospace;
	font-size: 11px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
	height: 18px;
	width: auto;
}
.datos1 {font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-style: normal;
	text-decoration: blink;
	background-color: #CCFFCC;
	margin: 5px;
	padding: 7px;
	height: auto;
	width: auto;
	border: thin solid #0099FF;
}
.datos1 {font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 16px;
	background-color: #FDE0C1;
	margin: 2px;
	padding: 3px;
	border: medium doble #DBAED7;
}
.datos1 {	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-weight: normal;
	background-color: #B8F5E8;
	margin: 4px;
	padding: 5px;
	border: thin outset #009999;
}
.datos2 {	font-family: "Courier New", Courier, monospace;
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 2px;
	padding: 3px;
	border: medium doble #EEBFEB;
}
.datos3 {	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #FF3300;
	background-color: #A6ECD7;
	margin: 4px;
	padding: 4px;
	border: medium groove #CCCCFF;
}
.go {	font-family: "Times New Roman", Times, serif;
	font-size: 9px;
	font-style: normal;
	color: #FF6633;
	background-color: #FBDCBD;
	padding: 1px;
	height: auto;
	width: auto;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
}
.Estilo66 {
	font-size: 12px;
	font-weight: bold;
}
.label {background-color: #FFFFCC; font-size: 16px; font-family: Arial; color:#0000CC; display: block;}
.Estilo67 {font-size: 18px}
.Estilo70 {color: #000066; 
font-size: 12px;}
.Estilo71 {font-size: 10px; font-weight: bold; color: #000066; }
.Estilo73 {color: #000066}
.Estilo74 {color: #FF0000}
-->
</style>
<script Language="JavaScript">

function validarEntero(valor){ 
      //intento convertir a entero. 
     //si era un entero no le afecta, si no lo era lo intenta convertir 
     valor = parseInt(valor) 

      //Compruebo si es un valor numérico 
      if (isNaN(valor)) { 
            //entonces (no es numero) devuelvo el valor cadena vacia 
            return "" 
      }else{ 
            //En caso contrario (Si era un número) devuelvo el valor 
            return valor 
      } 
} 

function valida_envia(){
	if (document.form1.nombre.value == ""){
		alert("Falta Ingresar Apellidos y Nombres")
		document.form1.nombre.focus()
		return (false);
	}
	
		if (document.form1.cedula.value == ""){
		alert("Falta Digitar numero de Cedula")
		document.form1.cedula.focus()
		return (false);
	}

		
	if (document.form1.codigo.value == ""){
		alert("Falta Digitar el codigo militar")
		document.form1.codigo.focus()
		return (false);
	}
	
		if (document.form1.grado.value == ""){
		alert("Falta Ingresar el grado")
		document.form1.grado.focus()
		return (false);
	}
	
		if (document.form1.direccion.value == ""){
		alert("Falta Ingresar la Dirreccion")
		document.form1.direccion.focus()
		return (false);
	}
	
		if (document.form1.email.value == ""){
		alert("Falta Ingresar el  email")
		document.form1.email.focus()
		return (false);
	}
	
		if (document.form1.ciudad.value == ""){
		alert("Falta escribir ciudad ")
		document.form1.ciudad.focus()
		return (false);
	}
	
		if (document.form1.telefono.value == ""){
		alert("Falta Digitar Telefono")
		document.form1.telefono.focus()
		return (false);
	}
	
		if (document.form1.celular.value == ""){
		alert("Falta Digitar celular")
		document.form1.celular.focus()
		return (false);
	}
	
		if (document.form1.cuenta.value == ""){
		alert("Falta escribir No cuenta")
		document.form1.cuenta.focus()
		return (false);
	}
	
		if (document.form1.banco.value == ""){
		alert("Falta escribir banco ")
		document.form1.banco.focus()
		return (false);
	}
	
		if (document.form1.sucursal.value == ""){
		alert("Falta seleccionar sucursal ")
		document.form1.sucursal.focus()
		return (false);
	}
	
	if (document.form1.numlib.value == ""){
		alert("Falta escribir número de Libranza ")
		document.form1.numlib.focus()
		return (false);
	}
	
		if (document.form1.monto.value == ""){
		alert("Falta escribir monto Solicitado")
		document.form1.monto.focus()
		return (false);
	}
	
	if (document.form1.numcuo.value == ""){
		alert("Falta Digitar numero de cuotas")
		document.form1.numcuo.focus()
		return (false);
	}
	
		if (document.form1.valcuo.value == ""){
		alert("Falta Digitar valor de la cuotas")
		document.form1.valcuo.focus()
		return (false);
	}
	
	if (document.form1.neto.value == ""){
		alert("Falta Digitar valor neto a consignar")
		document.form1.neto.focus()
		return (false);
	}
	
		if (document.form1.interes.value == ""){
		alert("Falta Digitar interes deducible")
		document.form1.interes.focus()
		return (false);
	}

if (document.form1.fechainicio.value == "0000-00-00"){
		alert("Falta Digitar Fecha Inicio Contrato")
		document.form1.fechainicio.focus()
		return (false);
	}
	
	if (document.form1.fechatermino.value == "0000-00-00"){
		alert("Falta Digitar Fecha Termino Contrato")
		document.form1.fechatermino.focus()
		return (false);
	}
	
	if (document.form1.fechatermino.value == "0000-00-00"){
		alert("Falta Digitar Fecha Termino Contrato")
		document.form1.fechatermino.focus()
		return (false);
	}
	
		if (document.form1.mesapli.value == "00"){
		alert("Falta Selecionar mes aplicado")
		document.form1.mesapli.focus()
		return (false);
	}
	
	if (document.form1.anoapli.value == "0000"){
		alert("Falta Digitar año aplicado")
		document.form1.anoapli.focus()
		return (false);
	}
	
	if (document.form1.unidesc.value == ""){
		alert("Falta selecionar Unidad de descuento")
		document.form1.unidesc.focus()
		return (false);
	}
	
		if (document.form1.codidesc.value == ""){
		alert("Falta selecionar codigo de descuento")
		document.form1.codidesc.focus()
		return (false);
	}
	
		if (document.form1.empresa.value == ""){
		alert("Falta selecionar empresa")
		document.form1.empresa.focus()
		return (false);
	}
	if (document.form1.proveedor.value == ""){
		alert("Falta selecionar proveedor")
		document.form1.proveedor.focus()
		return (false);
	}



	return (true);
}
</script>
</head>
<body >

<form action=""  method="post" onsubmit="return valida_envia()" enctype="multipart/form-data" name="form1"  id="form1">
  <div align="center">
    <div class="Estilo50 Estilo67">CONSULTA  CREDITO CON CERO PAGOS</div>
	<br />
	<table width="741" border="2"  cellpadding="1" cellspacing="1" class="sol_cre1">
      <tr bgcolor="#F7FFE1" >
        <th width="108" bgcolor="#F7FFE1" scope="col"><div align="right" class="Estilo70 Estilo73">
            <div align="right"><strong>Fecha Credito :</strong></div>
        </div></th>
        <th width="122" bgcolor="#F7FFE1" scope="col"><div align="left" class="Estilo70">
            <input name="fecha" type="text" class="Estilo66" id="fecha" value="<?php echo $fecha ?>" size="10" maxlength="10" />
        </div></th>
        <td  align="right" bgcolor="#F7FFE1" ><span class="Estilo70"><strong> Nombres:</strong></span></td>
        <td colspan="3" align="left" bgcolor="#F7FFE1"><input name="nombre" type="text" class="Estilo66" id="nombre" value="<?php echo $nombre ?>" size="60" maxlength="65" />        </td>
      </tr>
      <tr>
        <td width="108" height="21" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cedula No:</strong></div></td>
        <td width="122" bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="cedula" type="text" class="Estilo66" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" />
        </div></td>
        <td width="124" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cogido Militar :</strong></div></td>
        <td width="92" bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="codigo" type="text" class="Estilo66" id="codigo" value="<?php echo $codigo ?>" size="14" maxlength="20" />
        </div></td>
        <td width="103" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Grado :</strong></div></td>
        <td width="157" bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="grado" type="text" class="Estilo66" id="grado" value="<?php echo $grado ?>" size="12" maxlength="10" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Direccion :</strong></div></td>
        <td colspan="2" bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="direccion" type="text" class="Estilo66" id="direccion" value="<?php echo $direccion ?>" size="40" maxlength="40" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>E-mail :</strong></div></td>
        <td  bgcolor="#F7FFE1" colspan="2"><div align="left" class="Estilo70">
            <input name="email" type="text" class="Estilo66" id="email" value="<?php echo $email ?>" size="35" maxlength="35" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Ciudad :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="ciudad" type="text" class="Estilo66" id="ciudad" value="<?php echo $ciudad ?>" size="14" maxlength="20" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Telefono :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="telefono" type="text" class="Estilo66" id="telefono" value="<?php echo $telefono ?>" size="10" maxlength="20" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Celular :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="celular" type="text" class="Estilo66" id="celular" value="<?php echo $celular ?>" size="20" maxlength="20" />
        </div></td>
      </tr>
      <tr >
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cuenta No :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="cuenta" type="text" class="Estilo66" id="cuenta" value="<?php echo $cuenta ?>" size="20" maxlength="20" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Banco :</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="banco" type="text" class="Estilo66" id="banco" value="<?php echo $banco ?>" size="15" maxlength="15" />
        </div></td>
        <th width="103" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Sucursal :</strong></div></th>
        <td bgcolor="#F7FFE1" scope="col"><div align="left" class="Estilo70">
            <input name="sucursal" type="text" class="Estilo66" id="sucursal" value="<?php echo $sucursal ?>" size="20" maxlength="20" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Numero libranza:</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="numlib" type="text" class="Estilo66" id="numlib" value="<?php echo $numlib ?>" size="12" maxlength="12" />
        </div></td>
        <td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Monto Solicitado  :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="monto" type="text" class="Estilo66" id="monto" value="<?php echo $monto ?>" size="12" maxlength="10" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Numero de Cuotas:</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="numcuo" type="text" class="Estilo66" id="numcuo" value="<?php echo $numcuo ?>" size="12" maxlength="12" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Valor Mensual:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="valcuo" type="text" class="Estilo66" id="valcuo" value="<?php echo $valcuo ?>" size="12" maxlength="12" />
        </div></td>
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Neto Consignar:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="neto" type="text" class="Estilo66" id="neto" value="<?php echo $neto ?>" size="12" maxlength="12" />
        </div></td>
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Interes Deducible:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left">
          <input name="interes" type="text" class="Estilo66" id="interes" value="<?php echo $interes ?>" size="12" maxlength="12" />        
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Cuotas Pendientes:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="cuopen" type="text" class="Estilo66" id="cuopen" value="<?php echo $cuopen ?>" size="12" maxlength="12"  readonly=""/>
        </div></td>
        <td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
            <div align="right"><strong>Cuotas Descontadas  :</strong></div>
        </div></td>
        <td align="left" bgcolor="#F7FFE1" ><input name="cuodesc" type="text" class="Estilo66" id="cuodesc" value="<?php echo $cuodesc ?>" size="12" maxlength="12"  readonly=""/>        </td>
         <td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Mes Aplicado:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left"><span class="Estilo71">MES</span><span class="Estilo70">-
          <input name="mesini" type="text" class="Estilo66" id="mesapli" value="<?php echo $mesapli ?>" size="2" maxlength="2" />
          <strong>-A&Ntilde;o</strong>
          <input name="anoapli" type="text" class="Estilo66" id="anoapli" value="<?php echo $anoapli ?>" size="4" maxlength="4" />
        </span></div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Saldo Nuevo:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="salnue" type="text" class="Estilo66" id="salnue" value="<?php echo $salnue ?>" size="12" maxlength="12"  readonly=""/>
        </div></td>
        <td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
            <div align="right"><strong>Saldo Anterior :</strong></div>
        </div></td>
        <td align="left" bgcolor="#F7FFE1"  ><input name="salant" type="text" class="Estilo66" id="salant" value="<?php echo $salant ?>" size="12" maxlength="12"  readonly=""/>        </td>
        <td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Ultimo Desceunto:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <div align="left">
              <input name="fechadescuento" type="text" class="Estilo66" id="fechadescuento" value="<?php echo $fechadescuento ?>" size="10" maxlength="14" />
                </div>
        </div></td>
      </tr>
      <tr>
        <td height="28" bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Fecha Inicio Pagos:</strong></div></td>
        <td bgcolor="#F7FFE1" colspan="2"><div align="left"><span class="Estilo71">MES</span><span class="Estilo70">
          <input name="mesini" type="text" class="Estilo66" id="mesini" value="<?php echo $mesini ?>" size="1" maxlength="2" />
                  <strong>-A&Ntilde;o</strong>
                  <input name="anoini" type="text" class="Estilo66" id="anoini" value="<?php echo $anoini ?>" size="4" maxlength="4" />
        </span></div></td>
        <td height="28" bgcolor="#F7FFE1" colspan="2"><div align="right" class="Estilo70"><strong>Fecha Termino Pagos:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left"><span class="Estilo71">MES</span><span class="Estilo70">-
          <input name="mesfin" type="text" class="Estilo66" id="mesfin" value="<?php echo $mesfin ?>" size="2" maxlength="2" />
                  <strong>-A&Ntilde;o</strong>
                  <input name="anofin" type="text" class="Estilo66" id="anofin" value="<?php echo $anofin ?>" size="4" maxlength="4" />
        </span></div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>No Desembolso:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="numdesem" type="text" class="Estilo66" id="numdesem" value="<?php echo $numdesem ?>" size="12" maxlength="12"  readonly=""/>
        </div></td>
        <td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
            <div align="right"><strong>Unidad Descuento  :</strong></div>
        </div></td>
        <td align="left" bgcolor="#F7FFE1" ><input name="unidesc" type="text" class="Estilo66" id="unidesc" value="<?php echo $unidesc ?>" size="12" maxlength="12"  readonly=""/>        </td>
        <td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
            <strong>Codigo Descuento  :</strong></div></td>
        <td align="left" bgcolor="#F7FFE1" ><input name="codidesc" type="text" class="Estilo66" id="codidesc" value="<?php echo $codidesc ?>" size="12" maxlength="12"  readonly=""/>        </td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="center" class="Estilo55 Estilo70 Estilo73">
            <div align="right"> <strong>Empresa: </strong></div>
        </div></td>
        <td  align="left" bgcolor="#F7FFE1" colspan="2"><input name="empresa" type="text" class="Estilo66" id="empresa" value="<?php echo $empresa ?>" size="22" maxlength="20"  readonly=""/>        </td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Proveedor :</strong></div></td>
        <td align="left" bgcolor="#F7FFE1" colspan="2"  ><input name="proveedor" type="text" class="Estilo66" id="proveedor" value="<?php echo $proveedor ?>" size="20" maxlength="20"  readonly=""/></td>
      </tr>
   <tr>
	          <td bgcolor="#F7FFE1"><div align="right" class="Estilo70 Estilo74"><strong>No  de Contratos:</strong></div></td>
        <td align="left" bgcolor="#F7FFE1"   ><input name="contrato" type="text" class="Estilo50" id="contrato" value="<?php echo $numero ?>" size="12" maxlength="12"  readonly=""/></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70 Estilo74"><strong>Estado :</strong></div></td>
        <td align="left" bgcolor="#F7FFE1"  ><input name="esta" type="text" class="Estilo50" id="esta" value="<?php echo $esta ?>" size="12" maxlength="12"  readonly=""/></td>
		    <td bgcolor="#F7FFE1"><div align="right" class="Estilo70 Estilo74"><strong>Causal :</strong></div></td>
        <td align="left" bgcolor="#F7FFE1"  ><input name="causal" type="text" class="Estilo50" id="causal" value="<?php echo $causal ?>" size="40" maxlength="40"  readonly=""/></td>

      </tr>
    </table>
	<p>
    <input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='cartera_morosos_nomina_general_financiera.php'" value="IR AL MENU">
	
	 
	 <?php 
	 $ced2 = $_GET["ced2"];
$numlib = $_GET["numlib"];
	 echo "<input type='button' value='CONSULTAR CONTRATO' name=boton class=Estilo50 onClick =window.open('credito_consulta_credi.php?ced2=$ced2&numlib=$numlib','','top=50,left=70,toolbar=no,scrollbars=yes,width=910,height=530,status=yes')></a>"; ?>
    </p>

  </div>
</form>
</body>
</html>


<?
echo'<table width="800" border="1" cellspacing="2" cellpadding="2" align = "center">
  <tr align="center"> 
    <td colspan="7"><font face="Georgia, Times New Roman, Times, serif" color="#000066"><b align = "center">PAGOS EFECTUADOS</b></font></td>
  </tr>
  <tr align="center" bgcolor="#FFFFCC"> 
    <td width="260" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066">Valor cuota</font></td>
    <td bgcolor="#FFFFCC" width="55" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066"># cuotas</font></td>
    <td width="100"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066"  align="center">Mes</font></td>
	 <td width="100"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066"  align="center">Año</font></td>
    <td width="260"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066">Fecha pago</font></td>
    <td width="400" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066">Entidad</font></td>
    <td width="260"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000066">Fecha registro</font></td>
  </tr>';				  


	$control = mysql_query('SELECT * FROM  credito_estado_contable   WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '"  and numero_libranza  =  "' . $HTTP_GET_VARS["numlib"] . '" ORDER BY numero_cuota ASC  ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}

		while(list($id, $cedula, $nombre, $numlib, $cuota, $mescuota, $anocuota, $valorcuota,  $fecha_nomina, $fecha_registro, $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='120'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=120,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=350,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$concepto</a></td>
<td width='120'><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>";		
?>