File: /home/asjudine/public_html/modificar_datos_credito_ds.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
if(isset($_POST["consultar"]))
{
$mssql = mysql_query("select * from creditos where cedula = '$cedula' ",$dbi);
if($mssql)
{
$filas = mysql_num_rows($mssql);
if ($filas > 0)
{
$sql = "select ciudad, cedula, grado, nombres, direccion_envio, ciudad_envio, telefono, celular, email, monto_solicitado, valor_mensual, cuenta_ahorros, banco_cuenta, valor_jur, inicio_pagos, numero_libranza, empresa, proveedor from creditos where cedula = '$cedula' ";
$control = mysql_query($sql, $dbi) or die(mysql_error());
list($su, $ced, $gr, $nom, $dir, $ciuenv, $tel, $cel, $ema, $monsol, $vme, $cue, $ban, $vj, $fhi, $num_lib, $epr, $pv) = mysql_fetch_array($control);
$sql2 = "select nombre from empresas where codigo = '$epr' ";
$control2 = mysql_query($sql2, $dbi) or die(mysql_error());
list($nemp) = mysql_fetch_array($control2);
}
}else{
echo "<script>alert('No existe el numero de cedula en la base de datos');</script>";
}
}
?>
<html>
<head>
<title>Modificar Creditos</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.Estilo1 {
font-family: "Courier New", Courier, monospace;
font-weight: bold;
color: #3366FF;
font-size: 18px;
}
.tabla1 {
font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-weight: bold;
color: #339999;
background-color: #B7FFFF;
border: medium doble #CC9900;
}
.Estilo55 { font-family: Arial;
font-size: 16px;
color: #0066FF;
font-weight: bold;
}
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000;}
.Estilo58 {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color: #003399; display: block; }
.Estilo51 { color: #3366FF;
font-weight: bold;
}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.boton111 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<p class="Estilo1">CONSULTA DATOS CREDITO </p>
<p class="Estilo1"><span class="Estilo58">Ingrese número de identificación o codigo:</span></p>
<table width="362" border="3" cellspacing="2" cellpadding="2">
<tr>
<td width="153"><div align="center"><span class="Estilo55">Cédula o Codigo:</span></div></td>
<td width="141"><div align="center">
<input name="cedula" type="text" class="campo" id="cedula" value="" size="15" maxlength="15" />
</div></td>
</tr>
</table>
<p class="Estilo1"><span class="Estilo51">
<input name="consultar" id="consultar" type="submit" class="boton11" value="Consultar" />
</span></p>
<table width="867" height="282" border="3" cellpadding="2" cellspacing="2" class="tabla1">
<tr>
<th width="135" height="28" scope="col"><div align="center">Cedula:
</div></th>
<th width="240" scope="col"><div align="left">
<input name="cedu" type="text" id="cedu" value="<?php echo $ced ?>" size="15" maxlength="15" readonly = "" />
</div></th>
<th width="150" scope="col">Nombre: </th>
<th width="300" scope="col"><div align="left">
<input name="nomb" type="text" id="nomb" value="<?php echo $nom ?>" size="50" maxlength="50" readonly = "" />
</div></th>
</tr>
<tr>
<td height="28"><div align="center">Sucursal:
</div></td>
<td height="28"><div align="left">
<input name="sucu" type="text" id="sucu" value="<?php echo $su ?>" size="30" maxlength="30" readonly="" />
</div></td>
<td><div align="center">Numero Libranza : </div></td>
<td><input name="numero_libranza" type="text" id="numero_libranza" value="<?php echo $num_lib ?>" size="30" maxlength="30" readonly=""/></td>
</tr>
<tr>
<td height="28"><div align="center">Direccion Envio :
</div></td>
<td height="28"><div align="left">
<input name="direccion_env" type="text" id="direccion_env" value="<?php echo $dir ?>" size="40" maxlength="40" readonly=""/>
</div></td>
<td><div align="center">Ciudad Envio :
</div></td>
<td><div align="left">
<input name="ciudad_env" type="text" id="ciudad_env" value="<?php echo $ciuenv ?>" size="40" maxlength="40" />
</div></td>
</tr>
<tr>
<td height="28"><div align="center">Telefono :
</div></td>
<td height="28"><div align="left">
<input name="telefono" type="text" id="telefono" value="<?php echo $tel ?>" size="20" maxlength="20" />
</div></td>
<td><div align="center">Celular :
</div></td>
<td><div align="left">
<input name="celular" type="text" id="celular" value="<?php echo $cel ?>" size="20" maxlength="20" />
</div></td>
</tr>
<tr>
<td height="28"><div align="center">Email :
</div></td>
<td height="28"><div align="left">
<input name="email" type="text" id="email" value="<?php echo $ema ?>" size="20" maxlength="20" />
</div></td>
<td><div align="center">Cuenta Ahorros No :
</div></td>
<td><div align="left">
<input name="cuenta_aho" type="text" id="cuenta_aho" value="<?php echo $cue ?>" size="20" maxlength="20" />
</div></td>
</tr>
<tr>
<td height="28"><div align="center">Banco :
</div></td>
<td height="28"><div align="left">
<input name="banco" type="text" id="banco" value="<?php echo $ban ?>" size="30" maxlength="30" />
</div></td>
<td><div align="center">Valor Juridica :
</div></td>
<td><div align="left">
<input name="val_jur" type="text" id="val_jur" value="<?php echo $vj ?>" size="25" maxlength="20" />
</div></td>
</tr>
<tr>
<td height="28"><div align="center">Fecha Inicio : </div></td>
<td height="28"><input name="fechini" type="text" id="fechini" value="<?php echo $fhi ?>" size="12" maxlength="10" /></td>
<td><div align="center">Valor Mensual: </div></td>
<td><input name="valm" type="text" id="valm" value="<?php echo $vme ?>" size="25" maxlength="20" /></td>
</tr>
<tr>
<td height="28"><div align="center">Grado : </div></td>
<td height="28"><input name="grad" type="text" id="grad" value="<?php echo $gr ?>" size="12" maxlength="10" /></td>
<td><div align="center">Monto Soicitado: </div></td>
<td><input name="montos" type="text" id="montos" value="<?php echo $monsol ?>" size="25" maxlength="20" /></td>
</tr>
<tr>
<td height="30"><div align="center"> Empresa : </div></td>
<td height="30"><input name="emp" type="text" id="emp" value="<?php echo $nemp ?>" size="30" maxlength="30" /></td>
<td><div align="center"> Proveedor : </div></td>
<td><input name="prov" type="text" id="prov" value="<?php echo $pv ?>" size="30" maxlength="30" /></td>
</tr>
</table>
<p> </p>
<p><span class="Estilo51">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_solicitud_credito.php'" value="IR AL MENU">
</span></p>
</div>
</form>
</body>
</html>