File: /home/asjudine/public_html/afinanciera/consul_deb.php
<?php
global $dbi;
require_once("../Conectarse.php");
if(isset($_POST["consultar"]))
{
$credi = mysql_query('SELECT cedula,codigo_militar,nombre,grado,direccion,telefono,celular,ciudad,email,entidad_laboral FROM cartera_serviasjudinet WHERE cedula = "'.$_POST[ced].'" || codigo_militar = "'.$_POST[ced].'" and numerocontrato = "'.$_GET[numcon].'"');
if (!$credi) {
die('Invalid query 1: ' . mysql_error());
}
if ((mysql_num_rows($credi)==0))
{
$credi = mysql_query('SELECT cedula,codigo,nombre,grado,direccion,telefono,celular,ciudad,email,empresa FROM creditos_serviasjudinet WHERE cedula = "' . $_POST[ced] . '" ');
if (!$credi) {
die('Invalid query 1: ' . mysql_error());
}
}
list($cedula, $codigo, $nombre, $grado, $direccion, $telefono, $celular, $ciudad, $email,$empre) = mysql_fetch_row($credi);
$control = mysql_query('SELECT fecha_credito, valor_credito, cuotas_credito, valor_cuota , cuotas_descontadas, cuotas_pendientes, cuenta_ahorros, banco, fecha_ultimo_descuento,proveedor FROM creditos_serviasjudinet WHERE cedula = "' . $_POST[ced] . '" ');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($fechacre, $valcre, $cuocre, $valcuo, $cuodes, $cuopen, $cuenta, $banco, $fechaul,$prove) = mysql_fetch_row($control);
$control3 = mysql_query('SELECT nombre FROM entidad_laboral WHERE codigo = "' ."$empre". '" ');
if (!$control3) {
die('Invalid query 3: ' . mysql_error());
}
list($empre) = mysql_fetch_row($control3);
$control5 = mysql_query('SELECT codigo_sucursal, entidad_laboral, unidad_descuento, codigo_descuento, entidad_recaudo, fecha_nacimiento, numero_libranza, valorcontrato, numerocuotas, valorcuota, numerocontrato, tipocontrato, beneficiarios, mes_inicio, ano_inicio, mes_termino, ano_termino, cuotaspendientes, cuotasdescontadas, vendedor, fecha_ultimo_registro FROM cartera_serviasjudinet WHERE cedula = "'.$_POST[ced].'" and numerocontrato = "'.$_GET[numcon].'" ');
if (!$control5) {
die('Invalid query 5: ' . mysql_error());
}
list($sucursal, $pagaduria, $unidad_desc, $cod_desc, $entidad_recaudo, $fechanac, $libranza, $val_contrato, $cuotas, $valor_cuota, $contrato, $tipo_contrato, $beneficiarios, $mes_inicio, $aņo_inicio, $mes_termino, $aņo_termino, $cuopen1, $cuodes1, $vendedor, $fechaul) = mysql_fetch_row($control5);
$control10 = mysql_query('SELECT codigo_contrato FROM planes_contratos WHERE codigo = "' ."$tipo_contrato". '" ');
if (!$control10) {
die('Invalid query 6: ' . mysql_error());
}
$num2=mysql_num_rows($control10);
if($num2!=0)
{
list($pln) = mysql_fetch_row($control10);
}else{
$pln=$tipo_contrato;
}
}
$control6 = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "' ."$sucursal". '" ');
if (!$control6) {
die('Invalid query 7: ' . mysql_error());
}
list($sucursal2) = mysql_fetch_row($control6);
$control7 = mysql_query('SELECT nombre FROM entidad_laboral WHERE codigo = "' ."$pagaduria". '" ');
if (!$control7) {
die('Invalid query 8: ' . mysql_error());
}
list($pagaduria2) = mysql_fetch_row($control7);
$control8 = mysql_query('SELECT concepto FROM descuentos WHERE codigo = "' ."$entidad_recaudo". '" ');
if (!$control8) {
die('Invalid query 9: ' . mysql_error());
}
list($entidad_recaudo2) = mysql_fetch_row($control8);
$control9 = mysql_query('SELECT vendedor FROM vendedores WHERE codigo = "' ."$vendedor". '" ');
if (!$control9) {
die('Invalid query 10: ' . mysql_error());
}
list($vendedor2) = mysql_fetch_row($control9);
?>
<!DOCTYPE HTML>
<head>
<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">
<title>Consulta Ingreso debito</title>
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color:#EAEAEA;font-family:Geneva,Arial,Helvetica,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]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
.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;}
.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;}
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<div align="center">
<table width="694" border="3" cellpadding="3" cellspacing="3" class="datos3">
<caption>
<div align="center"><strong><span class="Estilo12"><br />
</span></strong>
<table width="330" border="3" cellpadding="3" cellspacing="3" class="recaudo">
<caption>
<!--<span class="Estilo1">SERVIASJUDINET</span>-->
</caption>
<tr>
<td colspan="2" class="titulo">Digite el Numero de Cedula</td>
</tr>
<tr>
<td class="tdder">CEDULA :</td>
<td width="135"><div align="center">
<input name="ced" type="text" id="ced" value="<?php echo $_GET[ced2] ?>" size="20" maxlength="20" />
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="consultar" type="submit" class="irmenu" id="consultar" value="Consultar" />
</div></td>
</tr>
</table>
<strong><br />
</strong>
<table width="655" border="3" cellpadding="3" cellspacing="3" class="Estilo4">
<caption>
<span class="Estilo8"><br />
<span class="titulo">DATOS BASICOS </span></span>
</caption>
<tr>
<td class="tdbono">Nombres:</td>
<td colspan="3" bgcolor="#FFFFCC"><div align="left">
<input name="apenom" type="text" id="apenom" value="<?php echo $nombre ?>" size="75" maxlength="75" readonly />
</div></td>
</tr>
<tr>
<td class="tdbono">Cedula:</td>
<td width="90" bgcolor="#FFFFCC"><input name="cedb" type="text" id="cedb" value="<?php echo $cedula ?>" size="15" maxlength="15" readonly /></td>
<td class="tdbono">Codigo :</td>
<td width="320" bgcolor="#FFFFCC" class="Estilo15"><div align="left">
<input name="cod" type="text" id="cod" value="<?php echo $codigo ?>" size="15" maxlength="15" readonly />
</div></td>
</tr>
<tr>
<td class="tdbono">Grado:</td>
<td bgcolor="#FFFFCC"><input name="gra" type="text" id="gra" value="<?php echo $grado ?>" size="15" maxlength="15" readonly /></td>
<td class="tdbono">Direccion:</td>
<td bgcolor="#FFFFCC" class="Estilo15"><input name="dir" type="text" id="dir" value="<?php echo $direccion ?>" size="45" maxlength="45" readonly /></td>
</tr>
<tr>
<td class="tdbono">Celular:</td>
<td bgcolor="#FFFFCC"><input name="cel" type="text" id="cel" value="<?php echo $celular ?>" size="15" maxlength="15" readonly /></td>
<td class="tdbono">Telefono:</td>
<td bgcolor="#FFFFCC" class="Estilo10"><div align="left">
<input name="tel" type="text" id="tel" value="<?php echo $telefono ?>" size="15" maxlength="15" readonly />
</div></td>
</tr>
<tr>
<td class="tdbono">Ciudad :</td>
<td colspan="3" bgcolor="#FFFFCC"><div align="left">
<input name="ciud" type="text" id="ciud" value="<?php echo $ciudad ?>" size="25" maxlength="25" readonly />
</div></td>
</tr>
<tr>
<td class="tdbono">Email :</td>
<td colspan="3" bgcolor="#FFFFCC"><div align="left">
<input name="email" type="text" id="email" value="<?php echo $email ?>" size="35" maxlength="35" readonly />
</div></td>
</tr>
<tr>
<td class="tdbono">Entidad Laboral:</td>
<td colspan="3" bgcolor="#FFFFCC"><div align="left">
<input name="entlab" type="text" id="entlab" value="<?php echo $empre ?>" size="35" maxlength="35" readonly />
</div></td>
</tr>
</table>
<table width="543" border="3" cellpadding="3" cellspacing="3" >
<caption>
<span class="Estilo3"><br />
<span class="titulo">DATOS CREDITO </span></span> <br />
</caption>
<tr>
<td class="tdder">Proveedor :</td>
<td class="tdizq">
<input name="proveedorcre" type="text" id="proveedor" value="<?php echo $prove ?>" size="20" maxlength="20" readonly=""/>
</td>
<td class="tdder">Fecha Credito :</td>
<td class="tdizq">
<input name="fechacre" type="text" id="fechacre" value="<?php echo $fechacre ?>" size="10" maxlength="10" readonly />
</td>
</tr>
<tr>
<td class="tdder">Valor Credito :</td>
<td class="tdizq">
<input name="valcre" type="text" id="valcre" value="<?php echo $valcre ?>" size="15" maxlength="12" readonly />
</td>
<td class="tdder">Salario :</td>
<td class="tdizq">
<input name="sala" type="text" id="sala" value="<?php echo $sal ?>" size="15" maxlength="12" readonly />
</td>
</tr>
<tr>
<td class="tdder">Numero Cuotas :</td>
<td class="tdizq">
<input name="cuocre" type="text" id="cuocre" value="<?php echo $cuocre ?>" size="5" maxlength="2" readonly />
</td>
<td class="tdder">Valor Mensual :</td>
<td class="tdizq">
<input name="valmen" type="text" id="valmen" value="<?php echo $valcuo ?>" size="15" maxlength="12" readonly />
</td>
</tr>
<tr>
<td class="tdder">Numero Cuenta :</td>
<td class="tdizq">
<input name="numcue" type="text" id="numcue" value="<?php echo $cuenta ?>" size="20" maxlength="20" readonly />
</td>
<td class="tdder">Banco Cuenta :</td>
<td class="tdizq">
<input name="bancue" type="text" id="bancue" value="<?php echo $banco ?>" size="15" maxlength="15" readonly />
</td>
</tr>
<tr>
<td class="tdder">Cuotas Pendientes:</td>
<td class="tdizq">
<input name="numcue" type="text" id="numcue" value="<?php echo $cuopen ?>" size="5" maxlength="2" readonly />
</td>
<td class="tdder">Ultimo Descuento :</td>
<td class="tdizq">
<input name="fechaul" type="text" id="fechaul" value="<?php echo $fechaul ?>" size="20" maxlength="20" readonly />
</td>
</tr>
</table>
<strong><br />
<br />
<span class="titulo">DATOS CARTERA</span><br />
<br />
</strong>
<label></label>
</div>
</caption>
<tr>
<td class="tdder">Sucursal :</td>
<td class="tdizq">
<input name="ciud2" type="text" id="ciud2" value="<?php echo $sucursal2 ?>" size="25" maxlength="25" readonly />
</td>
<td class="tdder">Pagaduria :</td>
<td class="tdizq">
<input name="ciud24" type="text" id="ciud24" value="<?php echo $pagaduria2 ?>" size="30" maxlength="30" readonly />
</td>
</tr>
<tr>
<td class="tdder">Unidad Descuento:</td>
<td class="tdizq">
<input name="ciud22" type="text" id="ciud22" value="<?php echo $unidad_desc ?>" size="25" maxlength="25" readonly />
</td>
<td class="tdder">Codigo Descuento:</td>
<td class="tdizq">
<input name="code" type="text" id="code" value="<?php echo $cod_desc ?>" size="5" maxlength="5" readonly />
</td>
</tr>
<tr>
<td class="tdder">Entidad Recaudo:</td>
<td class="tdizq">
<input name="ciud23" type="text" id="ciud23" value="<?php echo $entidad_recaudo2 ?>" size="25" maxlength="25" readonly />
</td>
<td class="tdder">Vendedor:</td>
<td class="tdizq">
<input name="ciud25" type="text" id="ciud25" value="<?php echo $vendedor2 ?>" size="45" maxlength="45" readonly />
</td>
</tr>
<tr>
<td class="tdder">Numero Libranza:</td>
<td class="tdizq">
<input name="numlib" type="text" id="numlib" value="<?php echo $libranza ?>" size="15" maxlength="15" readonly />
</td>
<td class="tdder">Valor Contrato:</td>
<td class="tdizq">
<input name="valcon" type="text" id="valcon" value="<?php echo $val_contrato ?>" size="15" maxlength="15" readonly />
</td>
</tr>
<tr>
<td class="tdder">Numero Cuotas:</td>
<td class="tdizq">
<input name="numcuo" type="text" id="numcuo" value="<?php echo $cuotas ?>" size="4" maxlength="2" readonly />
</td>
<td class="tdder">Valor Cuota:</td>
<td class="tdizq">
<input name="valcuo" type="text" id="valcuo" value="<?php echo $valor_cuota ?>" size="15" maxlength="15" readonly />
</td>
</tr>
<tr>
<td class="tdder">Numero Contrato:</td>
<td class="tdizq">
<input name="numcon" type="text" id="numcon" value="<?php echo $contrato ?>" size="15" maxlength="15" readonly /></td>
<td class="tdder">Tipo Contrato:</td>
<td class="tdizq">
<input name="numcon2" type="text" id="numcon2" value="<?php echo $pln ?>" size="8" maxlength="8" readonly /></td>
</tr>
<tr>
<td class="tdder">Inicio Pagos:</td>
<td class="tdizq">MES</span>-
<input name="mes_inicio2" type="text" id="mes_inicio2" value="<?php echo $mes_inicio ?>" size="2" maxlength="2" readonly />
-<span class="Estilo15">AÑO</span>-
<input name="año_inicio" type="text" id="año_inicio" value="<?php echo $aņo_inicio ?>" size="4" maxlength="4" readonly /></td>
<td class="tdder">Fecha Termino:</td>
<td class="tdizq">MES</span>-
<input name="mes_termino2" type="text" id="mes_termino2" value="<?php echo $mes_termino ?>" size="2" maxlength="2" readonly />
<label></label>
-<span class="Estilo15">AÑO</span>-
<input name="año_termino2" type="text" id="año_termino2" value="<?php echo $aņo_termino ?>" size="5" maxlength="4" readonly /></td>
</tr>
<tr>
<td class="tdder">Fecha Nacimiento:</td>
<td class="tdizq">
<div align="left">
<input name="fechanac" type="text" id="fechanac" value="<?php echo $fechanac ?>" size="10" maxlength="10" readonly /></td>
<td class="tdder">Numero Beneficiarios :</td>
<td class="tdizq">
<input name="numben" type="text" id="numben" value="<?php echo $beneficiarios ?>" size="4" maxlength="2" readonly /></td>
</tr>
<tr>
<td class="tdder">Cuotas Pendientes :</td>
<td class="tdizq">
<input name="cuopen1" type="text" id="cuopen1" value="<?php echo $cuopen1 ?>" size="5" maxlength="2" readonly />
</td>
<td class="tdder">Ultimo Descuento:</td>
<td class="tdizq">
<input name="bancue" type="text" id="bancue" value="<?php echo $fechaul ?>" size="20" maxlength="20" readonly />
</td>
</tr>
</table>
<p class="Estilo54"> </p>
</div>
<p align="center"> </p>
<p align="center">
<input name="grab" type="button" class="direcciona" id="grab" onclick="window.location.href='grab_deb.php?cedu=<?php echo $cedula; ?>&numcon=<?php echo $contrato; ?>'" value="GRABAR INFORMACION" />
</p>
<p align="center">
<input name="menu" type="button" class="irmenu" id="menu2" onclick="window.location.href='menu_cartera_debito.php'" value="IR A MENU" />
</p>
</form>
</body>
</html>