File: /home/asjudine/www/credito_rotativo_formulario_anticipo4.php
<?php
global $dbi;
$espacio = ' ';
$linea = '-';
require_once("Conectarse.php");
/////////////////////////////////////
// INFORMACION DE CREDITO ROTATIVO //
/////////////////////////////////////
/*$consultaconsultorio = mysql_query('SELECT unidad, promocion FROM consultorio_creditos_policia WHERE cedula = "' . $_GET["ced2"] . '"');
list($unidad, $promocion) = mysql_fetch_row($consultaconsultorio);*/
$consultacredito = mysql_query('SELECT unidad, promocion FROM credito_rotativo WHERE cedula = "' . $_GET["ced2"] . '" and libranza_credito = "'.$_GET["cred"].'" ');
list($unidad, $promocion) = mysql_fetch_row($consultacredito);
$control = mysql_query('SELECT cedula, apellidos, nombres, grado, rango, libranza_credito, direccion , telefono, celular, ciudad , email, cuenta, banco, entidad, escuela, numerosolicitud, fecha_solicitud, nombre_padre, nombre_madre, direccion_padres, ciudad_padres, telefono_padres, celular_padres, referencia_compa, celular_compa, fecha_anticipo, valor_anticipo, fecha_anticipo2, valor_anticipo2, fecha_anticipo3, valor_anticipo3, fecha_anticipo4, valor_anticipo4, saldo_pendiente, monto_solicitado, permanencia, cedula_codeudor, nombre_codeudor, celular_codeudor, telefono_codeudor, direccion_codeudor, ciudad_codeudor, email_codeudor FROM credito_rotativo WHERE cedula = "' . $_GET["ced2"] . '" and libranza_credito = "'.$_GET["cred"].'" ');
if (!$control) {
die('Invalid query prin: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($cedula, $apellidos, $nombres, $grado, $rango, $cred, $direccion, $telefono, $celular, $ciudad, $email, $cuenta, $banco, $entidad, $escuela, $numerosolicitud, $fecha_solicitud, $nompadre, $nommadre, $direcpadres, $ciudadpadres, $telpadres, $celpadres, $refcompa, $celcompa, $fecha_anticipo, $valor_anticipo, $fecha_anticipo2, $valor_anticipo2, $fecha_anticipo3, $valor_anticipo3, $fecha_anticipo4, $valor_anticipo4, $saldo_pendiente, $montosolicitado, $numcuotas, $cedula_codeudor, $nombre_codeudor, $celular_codeudor, $telefono_codeudor, $direccion_codeudor, $ciudad_codeudor, $email_codeudor ) = mysql_fetch_row($control);
$fullnombre = $apellidos ." ".$nombres;
$total_valor_anticipo4 = $saldo_pendiente; //muestra el valor del desembolso final
$permanencia = 24;
$control_int = mysql_query('SELECT fecha_credito, valor_credito, cuotas_credito, valor_cuota, fecha_ultimo_descuento, mes_inicio, ano_inicio, saldo_anterior , cuotas_pendientes, cuotas_descontadas, saldo_nuevo FROM credito_rotativo_inter WHERE cedula = "' . $_GET["ced2"] . '" and credito_libranza = "' . $_GET["cred"] . '"');
if (!$control_int) {
die('Invalid query 188: ' . mysql_error());
}
$num=mysql_num_rows($control_int);
list($fechafil, $valcon, $numcuo, $valcuo, $fechaul, $mesini, $anoini, $salant, $cupen, $cudesc, $salnue) = mysql_fetch_row($control_int);
?>
<!DOCTYPE html>
<html>
<head>
<title>APROBACION CREDITO ROTATIVO</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color:#EAEAEA;font-family:Verdana, Geneva, sans-serif;}
header {background-color: #B7271F; text-align: center;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.direcciona{width: 200px;background-color: #D4090C;color: #fff; padding: 4px;border-radius: 3px;}
.direcciona:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{padding: 1px; border: 1px solid #a0a0a0;}
.td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
.boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
input[type=text],select{border-radius: 5px; padding: 3px;background-color: #FFF;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
.botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;border-radius:5px;}
.botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
.tdizq{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.tdcen{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdder{background-color: #e5e5e5; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.tddered{background-color: #e5e5e5; padding: 1px 2px;color: #D40609;font-size: 12px;font-weight: 600; text-align: right;}
.tdbono{background-color: #FFFFCC; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
/*Estilo Complementario*/
.tdi{background-color: #F9FBC8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.tdc{background-color: #F9FBC8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdd{background-color: #F9FBC8; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.tdrojad{background-color: #EEE; color: #8A0002; padding: 1px 4px;font-size: 12px;font-weight: 600; text-align: right;}
.tdrojai{background-color: #EEE; color: #8A0002; padding: 1px 4px;font-size: 12px;font-weight: 600; text-align: left;}
.rojo{color:#C60000;}
.aprobado{background-color:#2CA316; color:#FFF; padding:4px; cursor:pointer;}
.aprobado:hover{background-color:#296411; color:#FFF; padding:4px;}
.denegado{background-color:#BE161B; color:#FFF; padding:4px; cursor:pointer;}
.denegado:hover{background-color:#A42023; color:#FFF; padding:4px;}
.pendiente{background-color:#5170EC; color:#FFF; padding:4px;}
.pendiente:hover{background-color:#1B3A8D; color:#FFF; padding:4px;}
.valida{background-color:#A41518; color:#FFF;}
.hit{background-color: #47547C; color: #fff; padding: 2px; text-align: center; font-size: 12px; font-weight: 900;}
</style>
<script>
function Verificar() {
if (document.form1.entidad.value == ""){
alert("Seleccione Entidad")
document.form1.entidad.focus()
return (false);
}
if (document.form1.escuela.value == ""){
alert("Seleccione Escuela")
document.form1.escuela.focus()
return (false);
}
/*if (document.form1.fechareporte.value == "0000-00-00")
{
alert("Verifique FECHA A REPORTAR");
document.form1.fechareporte.focus()
return (false);
}
if (document.form1.fechareporte.value == "")
{
alert("Verifique FECHA A REPORTAR");
document.form1.fechareporte.focus()
return (false);
}
*/
if (document.form1.creditolibranza.value == "")
{
alert("Digite El Credito Libranza");
document.form1.creditolibranza.focus()
return (false);
}
if (document.form1.estadoanticipo.value == "")
{
alert("¿ TIENE ANTICIPO ?");
document.form1.estadoanticipo.focus()
return (false);
}
if (document.form1.valor_anticipo2.value == "")
{
alert("¿ Cual es el valor de Anticipo ?");
document.form1.valor_anticipo2.focus()
return (false);
}
if (document.form1.mess.value == "00")
{
alert("¿ Complete el mes ?");
document.form1.mess.focus()
return (false);
}
if (document.form1.diass.value == "00")
{
alert("¿ Complete el dia ?");
document.form1.diass.focus()
return (false);
}
/*var dt = new Date();
if (document.form1.fechareporte.value < dt)
{
alert("Verifique Fecha De Reporte");
document.form1.fechareporte.focus()
return (false);
}
if (document.form1.actuacion.value == "")
{
alert("Escriba Una Gestion");
document.form1.actuacion.focus()
return (false);
}*/
return(true);
}
</script>
</head>
<body>
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">CONSULTA CREDITO ROTATIVO</h3>
<form action="" method="post" name="form1" onSubmit="return Verificar()">
<table width="900" border="2" cellpadding="1" cellspacing="1" class="sol_cre1">
<tr>
<td class="tdder">Fecha Solicitud :</td>
<!--<td class="tdizq"><input name="fecha" type="text" class="Estilo66" id="fecha" value="<?php echo date("Y-m-d"); ?>" size="10" maxlength="10" /></td>-->
<td class="tdizq"><input name="fecha" type="text" class="Estilo66" id="fecha" value="<?php echo $fecha_solicitud; ?>" size="10" maxlength="10" /></td>
<td class="tdder">Credito Numero :</td>
<td class="tdizq"><input name="credito_numero" type="text" class="rojo" id="credito_numero" value="<?php echo $numerosolicitud ?>" size="4" maxlength="4" readonly/>
<input name="rango" type="text" class="rojo" id="rango" value="<?php echo $rango ?>" size="8" maxlength="8" readonly/>
</td>
</tr>
<tr>
<td class="tdder">Cedula No:</td>
<td class="tdizq"><input name="cedula" type="text" class="Estilo66" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly/></td>
<td class="tdder">Grado :</td>
<td class="tdizq"><input name="grado" type="text" class="Estilo66" id="grado" value="<?php echo $grado; ?>" size="12" maxlength="10"/></td>
</tr>
<tr>
<td class="tdder">Apellidos:</td>
<td class="tdizq"><input name="apellidos" type="text" class="Estilo66" id="apellidos" value="<?php echo $apellidos ?>" size="45" maxlength="45"/></td>
<td class="tdder">Nombres:</td>
<td class="tdizq"><input name="nombres" type="text" class="Estilo66" id="nombres" value="<?php echo $nombres ?>" size="45" maxlength="45"/></td>
</tr>
<tr>
<td class="tdder">Direccion</td>
<td class="tdizq"><input name="direccion" type="text" class="Estilo66" id="direccion" value="<?php echo $direccion ?>" size="55" maxlength="55" /></td>
<td class="tdder">E-mail :</td>
<td class="tdizq" colspan="2"><input name="email" type="text" class="Estilo66" id="email" value="<?php echo $email ?>" size="45" maxlength="45"/></td>
</tr>
<tr>
<td class="tdder">Ciudad :</td>
<td class="tdizq"><input name="ciudad" type="text" class="Estilo66" id="ciudad" value="<?php echo $ciudad ?>" size="30" maxlength="30"/></td>
<td class="tdder"><h3>Telefono :</h3></td>
<td class="tdizq"><input name="telefono" type="text" class="Estilo66" id="telefono" value="<?php echo $telefono ?>" size="10" maxlength="20" /></td>
</tr>
<tr>
<td class="tdrojad">MONTO SOLICITADO:</td>
<td class="tdizq"><input name="montosolicitado" type="text" class="rojo" id="montosolicitado" value="<?php echo $montosolicitado ?>" size="14" maxlength="20" readonly/></td>
<td class="tdder">Celular :</td>
<td class="tdizq"><input name="celular" type="text" class="Estilo66" id="celular" value="<?php echo $celular ?>" size="20" maxlength="20" /></td>
<!--<td class="tdder">Nº SOLICITUD:</td>
<td class="tdizq"><input name="numero_solicitud" type="text" class="rojo" id="numero_solicitud" value="<?php echo $numero_solicitud ?>" size="14" maxlength="20" readonly/></td>-->
</tr>
<tr>
<td class="tdder">Unidad :</td>
<td class="tdizq"><input name="unidad" type="text" class="Estilo66" id="unidad" value="<?php echo $unidad ?>" size="20" maxlength="20" /></td>
</tr>
<tr>
<td class="tdder" >Nº CUENTA</td>
<td class="tdizq"><input name="num_cuenta" type="text" id="num_cuenta" value="<?php echo $cuenta ?>" size="45" maxlength="45" /></td>
<td class="tdder">BANCO</td>
<td class="tdizq" colspan="2"><input name="banco" type="text" id="banco" value="<?php echo $banco ?>" size="45" maxlength="45" /></td>
</tr>
<tr>
<td class="tdrojad">Libranza Credito:</td>
<td class="tdizq"><input name="creditolibranza" type="text" class="rojo" id="creditolibranza" value="<?php echo $cred ?>" size="14" maxlength="20"/></td>
<td class="tdrojad">N° Cuotas:</td>
<td class="tdizq" colspan="2"><input name="numcuotas" type="text" class="rojo" id="numcuotas" value="<?php echo $numcuotas ?>" size="14" maxlength="20"/></td>
</tr>
<tr>
<td class="tdder">Cuotas Pendientes:</td>
<td class="tdizq"><input name="cuotas_pendientes" type="text" class="rojo" id="cuotas_pendientes" value="<?php echo $cupen ?>" size="14" maxlength="20"/></td>
<td class="tdder">Cuotas Descontadas:</td>
<td class="tdizq" colspan="2"><input name="cuotas_descontadas" type="text" class="rojo" id="cuotas_descontadas" value="<?php echo $cudesc ?>" size="14" maxlength="20"/></td>
</tr>
<tr>
<td class="tdder">Saldo Anterior:</td>
<td class="tdizq"><input name="saldo_anterior" type="text" id="saldo_anterior" value="<?php echo $salant ?>" size="14" maxlength="20"/></td>
<td class="tdrojad">Nuevo Saldo:</td>
<td class="tdizq" colspan="2"><input name="saldo_nuevo" type="text" class="rojo" id="saldo_nuevo" value="<?php echo $salnue ?>" size="14" maxlength="20"/></td>
</tr>
<tr>
<td class="tdder" >Valor Cuota</td>
<td class="tdizq"><input name="cuomes" type="text" id="cuomes" value="<?php echo $valcuo ?>" size="45" maxlength="45" /></td>
<td class="tdder" >PROMOCIÓN</td>
<td class="tdizq"><input name="promocion" type="text" id="promocion" value="<?php echo $promocion ?>" size="45" maxlength="45" /></td>
</tr>
<tr>
<td class="tdder" >ENTIDAD</td>
<td class="tdizq"><input name="entidad" type="text" id="entidad" value="<?php echo $entidad ?>" size="45" maxlength="45" /></td>
<td class="tdder">ESCUELA</td>
<td class="tdizq" colspan="2"><input name="escuela" type="text" id="escuela" value="<?php echo $escuela ?>" size="45" maxlength="45" /></td>
</tr>
<tr>
<td class="tdder" >Valor Anticipo 1</td>
<td class="tdizq"><input name="valor_anticipo" type="text" id="valor_anticipo" value="<?php echo $valor_anticipo ?>" size="45" maxlength="45" /></td>
<td class="tdder">Fecha Anticipo 1</td>
<td class="tdizq" colspan="2"><input name="fecha_anticipo" type="text" id="fecha_anticipo" value="<?php echo $fecha_anticipo ?>" size="45" maxlength="45" /></td>
</tr>
<tr>
<td class="tdder" >Valor Anticipo 2</td>
<td class="tdizq"><input name="valor_anticipo2" type="text" id="valor_anticipo2" value="<?php echo $valor_anticipo2 ?>" size="45" maxlength="45" /></td>
<td class="tdder">Fecha Anticipo 2</td>
<td class="tdizq" colspan="2"><input name="fecha_anticipo2" type="text" id="fecha_anticipo2" value="<?php echo $fecha_anticipo2 ?>" size="45" maxlength="45" /></td>
</tr>
<tr>
<td class="tdder" >Valor Anticipo 3</td>
<td class="tdizq"><input name="valor_anticipo3" type="text" id="valor_anticipo3" value="<?php echo $valor_anticipo3 ?>" size="45" maxlength="45" /></td>
<td class="tdder">Fecha Anticipo 3</td>
<td class="tdizq" colspan="2"><input name="fecha_anticipo3" type="text" id="fecha_anticipo3" value="<?php echo $fecha_anticipo3 ?>" size="45" maxlength="45" /></td>
</tr>
<tr>
<td class="tdder" >Valor Anticipo 4</td>
<td class="tdizq">
<input name="valor_anticipo4" type="text" id="valor_anticipo4" class="rojo" value="<?php echo $total_valor_anticipo4 ?>" size="45" maxlength="45" />
</td>
<td class="tdder">Fecha Anticipo 4</td>
<td class="tdizq" colspan="2">
<input name="anoss" type="text" value="<?php echo date("Y") ?>" size="4" maxlength="4">-<select name="mess" class="sel3">
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>-<select name="diass" class="sel3">
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</td>
</tr>
<!--<tr>
<td class="tdder">SALDO PENDIENTE</td>
<td class="tdizq"><input name="saldo_pendiente" type="text" class="rojo" id="saldo_pendiente" value="<?php echo $saldo_pendiente ?>" size="12" maxlength="10" readonly/>
<td class="tdder">DESEMBOLSO</td>
<td class="tdizq"><input name="valor_desembolso" type="text" class="rojo" id="valor_desembolso" value="<?php echo $desembolso1 ?>" size="30" maxlength="30" readonly/></td>
</tr>
-->
<!--<tr >
<td class="tdroja">Cuenta No :</td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<input name="cuenta" type="text" class="Estilo66" id="cuenta" value="<?php echo $cuenta ?>" size="25" maxlength="25" />
</div></td>
<td class="tdroja">Banco :</td>
<td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
<input name="banco" type="text" class="Estilo66" id="banco" value="<?php echo $banco ?>" size="20" maxlength="20" />
</div></td>
</tr>
</tr>-->
</table>
<div align="center">
<input name="guardar" type="submit" class="aprobado" id="guardar" value="GUARDAR" />
<br><br><br>
<input name="sacar" type="submit" class="irmenu" id="sacar" value="Ya no tiene anticipo" />
</div>
</form>
</body>
</html>
<?php
if (isset($_POST["guardar"]))
{
if($_POST["valor_anticipo4"] != "")
{
$control_verificar = mysql_query('SELECT cedula, fecha_anticipo4, valor_anticipo4 FROM credito_rotativo WHERE cedula="'.$_GET["ced2"].'" and libranza_credito = "'.$_GET["cred"].'" ');
list($cedula_resul, $resul_fecha_anticipo4, $resul_valor_anticipo4) = mysql_fetch_row($control_verificar);
if($resul_fecha_anticipo4 == "" and $resul_valor_anticipo4 == "")
{
$fechas_anticipo4 = $_POST["anoss"].'-'.$_POST["mess"].'-'.$_POST["diass"];
$valor_anticipo4 = $_POST["valor_anticipo4"];
$saldo_pendiente = $saldo_pendiente - $valor_anticipo4;
$update_anticipo4 = mysql_query('UPDATE credito_rotativo SET fecha_anticipo4 = "'.$fechas_anticipo4.'", valor_anticipo4 = "'.$_POST["valor_anticipo4"].'", saldo_pendiente = "'.$saldo_pendiente.'" WHERE cedula = "'.$_GET["ced2"].'" and libranza_credito = "'.$_GET["cred"].'" ');
echo "<script>alert('Datos Guardados!');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.location.href = 'credito_rotativo_listado_anticipo4.php';</script>";
}
else{
echo "<script>alert('YA TIENE REGISTRADO ANTICIPO 4!');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.location.href = 'credito_rotativo_listado_anticipo4.php';</script>";
}
}
else{
echo "<script>alert('Complete los campos!');</script>";
}
}
?>
<?php
if (isset($_POST["sacar"]))
{
$update_estado = mysql_query('UPDATE credito_rotativo SET estado = "5" WHERE cedula = "'.$_GET["ced2"].'" and libranza_credito = "'.$_GET["cred"].'" ');
echo "<script>alert('Ya no se le pueden agregar anticipo!');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.location.href = 'credito_rotativo_listado_anticipo4.php';</script>";
}
?>
<?php
$sqlrevisionno = mysql_query("SELECT reportado FROM credito_rotativo WHERE cedula = '".$cedula."' and reportado != '' ");
if (!$sqlrevisionno) {
die('Invalid query: ' . mysql_error());
}
list($reportado) = mysql_fetch_row($sqlrevisionno);
if($reportado != "")
{
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 id, cedula, nombre, numero_libranza, credito_libranza, numero_cuota, mes_cuota, ano_cuota, valor_cuota, fecha_nomina, fecha_registro, codigo_descuento, unidad_descuento FROM credito_rotativo_estado_contable WHERE cedula = "' . $_GET["ced2"] . '" and credito_libranza = "' . $_GET["cred"] . '" ORDER BY numero_cuota ASC ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
while(list($id, $cedula, $nombre, $numlib, $libranza_credito, $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=250,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>";
}
else{
die();
}
?>