File: /home/asjudine/public_html/credito_rotativo_modificar.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, credito_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_aplicado, ano_aplicado, mes_termino, ano_termino, fecha_ultimo_descuento, empresa, proveedor, causal, estado FROM credito_rotativo_inter WHERE cedula = "' . $_GET["ced2"] . '" and numero_libranza = "'.$_GET["numlib"].'" and credito_libranza = "' . $_GET["cred"] . '" ');
if (!$resul) {
die('Invalid query: ' . mysql_error());
}
list($cedula, $codigo, $nombre, $grado, $direccion, $telefono, $celular, $ciudad, $email, $numlib, $libranza_credito, $unidesc, $codidesc, $sucursal, $fecha, $monto, $numcuo, $valcuo, $cuodesc, $cuopen, $salant, $salnue, $cuenta, $banco, $neto, $interes ,$numdesem, $mesini, $anoini, $mesapli, $anoapli,$mesfin, $anofin, $fechadescuento, $empresa, $proveedor, $causal1, $estado) = mysql_fetch_row($resul);
if ($estado == 0)
{
$esta = "HISTORICO";
}
else
{
$esta = "VIGENTE";
}
//NUEVO
/*$redi = mysql_query('SELECT grado, entidad, bono1, bono2, bono3, bono4, bono5, bono6, bono7, bono8, bono9, bono10, bono11, bono12, bono13, bono14, bono15, bono16, bono17, bono18, bono19, bono20 FROM redimir_bonos WHERE cedula = "' . $_GET[ced2] . '" and numero_libranza = "'.$_GET[numlib].'" and libranza_credito = "' . $_GET[cred] . '" ' );
if (!$redi) {
die('Invalid query 1: ' . mysql_error());
}
list($grado, $entidad, $bono1, $bono2, $bono3, $bono4, $bono5, $bono6, $bono7, $bono8, $bono9, $bono10, $bono11, $bono12, $bono13, $bono14, $bono15, $bono16, $bono17, $bono18, $bono19, $bono20 ) = mysql_fetch_row($redi);
*/
$consultaaa = mysql_query("SELECT entidad, escuela, nombre_padre, celular_padres, referencia_compa, celular_compa FROM credito_rotativo WHERE cedula = '".$cedula ."' " );
list($entidad,$escuela,$Nom_padre, $Cel_padres, $Nom_compa, $Cel_compa)=mysql_fetch_row($consultaaa);
if($grado == "SLP")
{
$montosolicitado = "500000";
?>
<script languaje="javascript">
function proba(){
var bono6 = document.getElementById("bono6").disabled = true;
var bono7 = document.getElementById("bono7").disabled = true;
var bono8 = document.getElementById("bono8").disabled = true;
var bono9 = document.getElementById("bono9").disabled = true;
var bono10 = document.getElementById("bono10").disabled = true;
var bono11 = document.getElementById("bono11").disabled = true;
var bono12 = document.getElementById("bono12").disabled = true;
var bono13 = document.getElementById("bono13").disabled = true;
var bono14 = document.getElementById("bono14").disabled = true;
var bono15 = document.getElementById("bono15").disabled = true;
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "AL" || $grado == "PT")
{
$montosolicitado = "1000000";
?>
<script languaje="javascript">
function proba(){
var bono11 = document.getElementById("bono11").disabled = true;
var bono12 = document.getElementById("bono12").disabled = true;
var bono13 = document.getElementById("bono13").disabled = true;
var bono14 = document.getElementById("bono14").disabled = true;
var bono15 = document.getElementById("bono15").disabled = true;
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "C3" || $grado == "SC" || $grado == "CS" || $grado == "CP" || $grado == "SS" || $grado == "SV" || $grado == "SB" || $grado == "SP" || $grado == "SM" || $grado == "IJ")
{
$montosolicitado = "1500000";
?>
<script languaje="javascript">
function proba(){
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "ST" || $grado == "TE" || $grado == "CP")
{
$montosolicitado = "2000000";
?>
<script languaje="javascript">
function proba(){
}
</script><?php
}
/*
$tere = 0;
$con1 = mysql_query('SELECT cedula FROM cartera_serviasjudinet WHERE cedula = "' . "$cedula". '" and estado = "1" ');
if (!$con1) {
die('Invalid query: ' . mysql_error());
}
while(list($cedut) = mysql_fetch_row($con1))
{
$tere = $tere + 1 ;
}
*/
if(isset($_POST["guardar"]))
{
/*
if ($_POST[sucursal1] == ""){
$control = mysql_query('SELECT nombre FROM sucursal WHERE nombre = "' . $_POST[sucursal] . '"');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
list($sucursal) = mysql_fetch_row($control);
}else{
$control = mysql_query('SELECT nombre FROM sucursal WHERE nombre = "' . $_POST[sucursal1] . '"');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
list($sucursal) = mysql_fetch_row($control);
}
if ($_POST[unidesc1] == ""){
}else{
$unidesc = $_POST[unidesc1];
}
if ($_POST[codidesc1] == ""){
}else{
$codidesc = $_POST[codidesc1];
}
if ($_POST[empresa1] == ""){
}else{
$empresa = $_POST[empresa1];
}
if ($_POST[proveedor1] == ""){
}else{
$proveedor = $_POST[proveedor1];
}
if ($_POST[causal] == ""){
$causal = $_POST[causal];
}else{
$causal = $_POST[causa];
}
*/
$dis = date("d");
$mes = date("m");
$anos = date("Y");
/* unidad_descuento = '" ."$unidesc". "', codigo_descuento= '" ."$codidesc". "', sucursal = '" ."$sucursal". "' , fecha_credito = '" . $_POST["fecha"] . "', valor_credito = '" . $_POST["monto"] . "' , cuotas_credito = '" . $_POST["numcuo"] . "', valor_cuota= '" . $_POST["valcuo"] . "', cuotas_descontadas = '" . $_POST["cuodesc"] . "', cuotas_pendientes = '" . $_POST["cuopen"] . "', saldo_anterior = '" . $_POST["salant"] . "', saldo_nuevo = '" . $_POST["salnue"] . "', cuenta_ahorros = '" . $_POST["cuenta"] . "', banco= '" . $_POST["banco"] . "', neto_consignar = '" . $_POST["neto"] . "', interes_deducible = '" . $_POST["interes"] . "', numero_desembolso= '" . $_POST["numdesem"] . "' , mes_inicio = '" . $_POST["mesini"] . "', ano_inicio = '" . $_POST["anoini"] . "', mes_termino = '" . $_POST["mesfin"] . "', ano_termino = '" . $_POST["anofin"] . "', mes_aplicado = '" . $_POST["mesapli"] . "', ano_aplicado = '" . $_POST["anoapli"] . "', fecha_ultimo_descuento= '" . $_POST["fechadescuento"] . "', empresa = '" ."$empresa". "', proveedor = '" ."$proveedor". "' , causal = '" ."$causal". "'*/
$re = mysql_query("UPDATE credito_rotativo_inter set cedula ='" . $_POST["cedula"] . "', codigo = '" . $_POST["codigo"] . "', nombre= '" . $_POST["nombre"] . "', grado = '" . $_POST["grado"] . "', direccion = '" . $_POST["direccion"] . "', telefono = '" . $_POST["telefono"] . "', celular = '" . $_POST["celular"] . "', ciudad = '" . $_POST["ciudad"] . "', email = '" . $_POST["email"] . "', credito_libranza='".$_POST["libranza_credito"]."', numero_libranza = '" . $_POST["numlib"] . "',cuenta_ahorros ='".$_POST["cuenta"]."' WHERE cedula = '" . $_GET[ced2] . "' and numero_libranza = '".$_GET[numlib]."' and credito_libranza = '" . $_GET[cred] . "' ");
if (!$re) {
die('No se credito_rotativo_inter : ' . mysql_error());
}
$Credito = mysql_query("UPDATE credito_rotativo set cedula ='" . $_POST["cedula"] . "', codigo_militar = '" . $_POST["codigo"] . "', grado = '" . $_POST["grado"] . "', direccion = '" . $_POST["direccion"] . "', telefono = '" . $_POST["telefono"] . "', celular = '" . $_POST["celular"] . "', ciudad = '" . $_POST["ciudad"] . "', email = '" . $_POST["email"] . "', libranza_credito ='".$_POST["libranza_credito"]."', nombre_padre = '" . $_POST["Nom_padre"] . "', celular_padres = '" . $_POST["Cel_padres"] . "', referencia_compa = '" . $_POST["Nom_compa"] . "', celular_compa = '" . $_POST["Cel_compa"] . "',cuenta ='".$_POST["cuenta"]."' WHERE cedula = '" . $_GET[ced2] . "' and libranza_credito = '".$_GET[cred]."' ");
if (!$Credito) {
die('No se credito_rotativo : ' . mysql_error());
}
$re1 = mysql_query("UPDATE redimir_bonos set libranza_credito='".$_POST["libranza_credito"]."', numero_libranza = '" . $_POST["numlib"] . "' WHERE cedula = '" . $_GET[ced2] . "' and numero_libranza = '".$_GET[numlib]."' and libranza_credito = '" . $_GET[cred] . "' ");
if (!$re1) {
die('No se redimir_bonos : ' . mysql_error());
}
$re2 = mysql_query("UPDATE credito_rotativo_estado_contable set credito_libranza='".$_POST["libranza_credito"]."', numero_libranza = '" . $_POST["numlib"] . "' WHERE cedula = '" . $_GET[ced2] . "' and numero_libranza = '".$_GET[numlib]."' and credito_libranza = '" . $_GET[cred] . "' ");
if (!$re1) {
die('No se credito_rotativo_estado : ' . mysql_error());
}
$up_bonos = mysql_query('UPDATE redimir_bonos set entidad = "'.$_POST["entidad"].'", bono1 = "'.$_POST["bono1"].'", bono2 = "'.$_POST["bono2"].'", bono3 = "'.$_POST["bono3"].'", bono4 = "'.$_POST["bono4"].'", bono5 = "'.$_POST["bono5"].'", bono6 = "'.$_POST["bono6"].'", bono7 = "'.$_POST["bono7"].'", bono8 = "'.$_POST["bono8"].'", bono9 = "'.$_POST["bono9"].'", bono10 = "'.$_POST["bono10"].'", bono11 = "'.$_POST["bono11"].'", bono12 = "'.$_POST["bono12"].'", bono13 = "'.$_POST["bono13"].'", bono14 = "'.$_POST["bono14"].'", bono15 = "'.$_POST["bono15"].'", bono16 = "'.$_POST["bono16"].'", bono17 = "'.$_POST["bono17"].'", bono18 = "'.$_POST["bono18"].'", bono19 = "'.$_POST["bono19"].'", bono20 = "'.$_POST["bono20"].'" WHERE cedula = "'.$_GET[ced2].'" and numero_libranza = "'.$_GET[numlib].'" and libranza_credito = "'.$_GET[cred].'" ');
if (!$up_bonos) {
die('Bonos invalid query : ' . mysql_error());
}
/*$mssqjjj = mysql_query("UPDATE cabranzas_credito set unidad = '" .$unidesc. "' WHERE cedula = '" . $_GET[ced2] . "' ");
if (!$mssqjjj) {
die('Invalid query mssqjjj mssqjjj: ' . mysql_error());
}
*/
echo "<script>alert('La informacion fue modificada correctamente');</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='credito_rotativo_consulta_modificar_mc.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
}
$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
}
}
</script>
</head>
<body onLoad="proba()">
<form action="" method="post" onSubmit="return valida_envia()" enctype="multipart/form-data" name="form1" id="form1">
<div align="center">
<div class="Estilo50 Estilo67">MODIFICAR CREDITO </div>
<br />
<table width="885" border="2" cellpadding="1" cellspacing="1" class="sol_cre1">
<tr bgcolor="#F7FFE1" >
<th width="78" bgcolor="#F7FFE1" scope="col"><div align="right" class="Estilo70 Estilo73">
<div align="right"><strong>Fecha Credito :</strong></div>
</div></th>
<th width="120" 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="78" height="21" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cedula No:</strong></div></td>
<td width="120" bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
<input name="cedula" type="text" class="Estilo66" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly=""/>
</div></td>
<td width="112" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cogido Militar :</strong></div></td>
<td width="179" 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="258" 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>
<td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Credito Libranza :</strong></div></td>
<td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
<input name="libranza_credito" type="text" class="Estilo66" id="libranza_credito" value="<?php echo $libranza_credito ?>" 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" />
<select name="sucursal1" class="Estilo66">
<option value="">--SELECCIONE SUCURSAL--</option>
<?php
do {
?>
<option value="<?php echo $row_sql5['nombre'];?>"><?php echo $row_sql5['nombre']?></option>
<?php
} while ($row_sql5 = mysql_fetch_assoc($sql5));
$rows5 = mysql_num_rows($sql5);
if($rows5 > 0) {
mysql_data_seek($sql5, 0);
$row_sql5 = mysql_fetch_assoc($sql5);
}
?>
</select>
</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" colspan="4"><div align="left" class="Estilo70"></td>
</tr>
<tr>
<td height="28" bgcolor="#F7FFE1" >
<div align="left" class="" style="width: 100px">
<strong>Nombre Padre o Madre :</strong>
</div>
</td>
<td height="28" bgcolor="#F7FFE1" colspan="2">
<input autocomplete="New-Datto" width="250px" name="Nom_padre" type="text" class="Estilo66" id="Nom_padre" value="<?php echo $Nom_padre ?>" size="60"/>
</td>
<td height="28" bgcolor="#F7FFE1" >
<div align="left" class="" style="width: 100px">
<strong>Celular Padres:</strong>
</div>
</td>
<td bgcolor="#F7FFE1">
<div align="left" class="Estilo70">
<input autocomplete="New-Datto" name="Cel_padres" type="text" class="Estilo66" id="Cel_padres" value="<?php echo $Cel_padres ?>" size="20" maxlength="20" />
</div>
</td>
<td bgcolor="#F7FFE1"></td>
</tr>
<tr>
<td height="28" bgcolor="#F7FFE1" >
<div align="left" class="" style="width: 100px">
<strong>Referencia De Compañero :</strong>
</div>
</td>
<td height="28" bgcolor="#F7FFE1" colspan="2">
<input autocomplete="New-Datto" width="250px" name="Nom_compa" type="text" class="Estilo66" id="Nom_compa" value="<?php echo $Nom_compa ?>" size="60"/>
</td>
<td height="28" bgcolor="#F7FFE1" >
<div align="left" class="" style="width: 100px">
<strong>Celular De Compañero:</strong>
</div>
</td>
<td bgcolor="#F7FFE1">
<div align="left" class="Estilo70">
<input autocomplete="New-Datto" name="Cel_compa" type="text" class="Estilo66" id="Cel_compa" value="<?php echo $Cel_compa ?>" size="20" maxlength="20" />
</div>
</td>
<td bgcolor="#F7FFE1"></td>
</tr>
</table>
<p>
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_creditos_serviasjudinet.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>"; ?>
<input name="guardar" type="submit" class="Estilo50" id="guardar" value="MODIFICAR" />
</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 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>";
?>