File: /home/asjudine/public_html/cartera_modi_datos_estado_credito_rotativo.php
<?php
require_once("Conectarse.php");
require_once("mainfile.php");
include ("config.php");
global $dbi;
if(isset($_POST["guardar"]))
{
$mssql3 = mysql_query("UPDATE credito_rotativo_inter set cuenta_ahorros = '" . $_POST[nocuen] . "', banco = '" . $_POST[ban] . "', valor_credito = '" . $_POST[val] . "', cuotas_credito = '" . $_POST[cuo] . "' , valor_cuota = '" . $_POST[cuomes] . "', fecha_ultimo_descuento = '" . $_POST[fecult] . "', mes_inicio = '" . $_POST[mesini] . "', ano_inicio = '" . $_POST[anoini] . "', saldo_anterior = '" . $_POST[sal] . "' , cuotas_pendientes = '" . $_POST[cuotap] . "' , cuotas_descontadas = '" . $_POST[cuotad] . "' , saldo_nuevo = '" . $_POST[nue] . "' WHERE cedula = '" . $_GET["cedu"] . "' and credito_libranza = '" . $_GET["cred"] . "'");
if (!$mssql3) {
die('Invalid query credito_rotativo_inter MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron modificados correctamente');</script>";
}
$control = mysql_query('SELECT cedula, codigo, nombre, grado, direccion, telefono, celular, ciudad, email, cuenta_ahorros, banco, entidad_laboral, unidad_descuento, codigo_descuento, fecha_credito, valor_credito, cuotas_credito, valor_cuota, fecha_ultimo_descuento, mes_inicio, ano_inicio, mes_termino, ano_termino, saldo_anterior, cuotas_pendientes, cuotas_descontadas, saldo_nuevo FROM credito_rotativo_inter WHERE cedula = "' . $_GET["cedu"] . '" and numerocontrato = "' . $_GET["numcon"] . '"');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($cedula, $codi, $apes, $grad, $dire, $tele, $celul, $ciud, $email, $cue, $ban, $enti, $unides, $codides, $fechafil, $valcon, $numcuo, $valcuo, $fechaul, $mesini, $anoini, $mesfin, $anofin, $salant, $cupen, $cudesc, $salnue) = mysql_fetch_row($control);
$inipag = $anoini.'-'.$mesini;
?>
<!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>Documento sin título</title>
<style type="text/css">
<!--
.est_cont1 { font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #FFFFFF;
background-color: #E6FFF1;
margin: 1px;
padding: 1px;
height: auto;
width: auto;
border: thin double #33CC66;
}
.est_cont2 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #000000;
background-color: #FFFFFF;
height: 18px;
width: auto;
border: thin solid #FABF85;
}
.Estilo3 {color: #2492FF;
font-weight: bold;
}
.Estilo4 {
color: #CC3300;
font-weight: bold;
}
.est_cont21 {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;
}
.Estilo13 {color: #0000CC; font-size: 14; font-weight: bold; }
.Estilo15 {color: #0000CC; font-weight: bold; }
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<p class="Estilo4">INFORMACION ESTADO CONTABLE</p>
<table width="648" border="2" cellpadding="1" cellspacing="1" class="est_cont1">
<tr>
<td width="89" height="23" bgcolor="#CCFFCC"><span class="Estilo13">Cedula :</span></td>
<td width="95" bgcolor="#CCFFCC"><div align="left">
<input name="ced" type="text" class="est_cont2" id="ced" value="<?php echo $cedula ?>" size="18" maxlength="18" readonly="" />
</div></td>
<td width="115" bgcolor="#CCFFCC"><span class="Estilo15">Apellidos y Nombres :</span></td>
<td colspan="3" bgcolor="#CCFFCC"><div align="left">
<input name="ape" type="text" class="est_cont2" id="ape" value="<?php echo $apes ?>" size="60" maxlength="60"/>
</div></td>
</tr>
<tr>
<td bgcolor="#CCFFCC"><span class="Estilo13">Banco :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="ban" type="text" class="est_cont2" id="ban" value="<?php echo $ban ?>" size="18" maxlength="18" />
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">No Cuenta :</span></td>
<td width="72" bgcolor="#CCFFCC"><div align="left">
<input name="nocuen" type="text" class="est_cont2" id="nocuen" value="<?php echo $cue ?>" size="13" maxlength="13" />
</div></td>
<td width="139" bgcolor="#CCFFCC"><span class="Estilo15">Fecha Afiliacion :</span></td>
<td width="103" bgcolor="#CCFFCC"><div align="left">
<input name="fec" type="text" class="est_cont2" id="fec" value="<?php echo $fechafil ?>" size="10" maxlength="10" />
</div></td>
</tr>
<tr>
<td bgcolor="#CCFFCC"><span class="Estilo13">Valor Contrato:</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="val" type="text" class="est_cont2" id="val" value="<?php echo $valcon ?>" size="18" maxlength="18"/>
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">No Cuotas :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="cuo" type="text" class="est_cont2" id="cuo" value="<?php echo $numcuo ?>" size="3" maxlength="3" />
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">Valor Cuota a descontar:</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="cuomes" type="text" class="est_cont2" id="cuomes" value="<?php echo $valcuo ?>" size="18" maxlength="18"/>
</div></td>
</tr>
<tr>
<td bgcolor="#CCFFCC"><span class="Estilo13">Saldo Anterior :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="sal" type="text" class="est_cont2" id="sal" value="<?php echo $salant ?>" size="18" maxlength="18" />
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">Cuotas Pendientes :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="cuotap" type="text" class="est_cont2" id="cuotap" value="<?php echo $cupen ?>" size="3" maxlength="3"/>
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">Nuevo Saldo :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="nue" type="text" class="est_cont2" id="nue" value="<?php echo $salnue ?>" size="18" maxlength="18" />
</div></td>
</tr>
<tr>
<td bgcolor="#CCFFCC"><span class="Estilo13">Fecha Inicio :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="mesini" type="text" class="est_cont2" id="mesini" value="<?php echo $mesini ?>" size="2" maxlength="2" />
-
<input name="anoini" type="text" class="est_cont2" id="anoini" value="<?php echo $anoini ?>" size="4" maxlength="4" />
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">Cuotas Descontadas :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="cuotad" type="text" class="est_cont2" id="cuotad" value="<?php echo $cudesc ?>" size="3" maxlength="3" />
</div></td>
<td bgcolor="#CCFFCC"><span class="Estilo15">Fecha Ultimo Descuento :</span></td>
<td bgcolor="#CCFFCC"><div align="left">
<input name="fecult" type="text" class="est_cont2" id="fecult" value="<?php echo $fechaul ?>" size="10" maxlength="10" />
</div></td>
</tr>
</table>
<p>
<input name="guardar" type="submit" class="Estilo3" id="guardar" value="Guardar" />
</p>
</div>
</form>
</body>
</html>