File: /home/asjudine/www/datos_serviasjudinet.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
function Conectarse()
{
if (!($link=@mysql_connect("localhost","asjudine","as2006")))
{
echo "Error conectando con el servidor.";
exit();
}
$dbname = "asjudinet";
if (!@mysql_select_db($dbname,$link))
{
echo "Error seleccionando la base de datos.";
exit();
}
return $link;
}
Conectarse();
//$sqlnom = "select fecha, nombres, cedula, codigo, grado, direccion_envio, ciudad_envio, telefono , celular, email, monto_solicitado, salario, numero_cuotas, valor_mensual , cuenta_ahorros, banco_cuenta, empresa, proveedor from creditos where cedula = '$ced'";
//$control = mysql_query($sqlnom, $dbi) or die(mysql_error());
$control = mysql_query('SELECT fecha, nombres, cedula, codigo, grado, direccion_envio, ciudad_envio, telefono , celular, email, monto_solicitado, salario, numero_cuotas, valor_mensual , cuenta_ahorros, banco_cuenta, empresa, proveedor FROM creditos WHERE cedula = "' . $HTTP_GET_VARS["ced"] . '" ');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($fecha, $apeno, $cedu, $codi, $grad, $dire, $ciue, $tele, $celul, $em, $ms, $sal, $nc, $vm, $cah, $bcu, $el, $pro) = mysql_fetch_row($control);
//$sqlnom3 = "select nombre from empresas where codigo = '$el'";
//$control3 = mysql_query($sqlnom3, $dbi) or die(mysql_error());
$control3 = mysql_query('SELECT nombre FROM entidad_laboral WHERE codigo = "' ."$el". '" ');
if (!$control3) {
die('Invalid query 3: ' . mysql_error());
}
list($el) = mysql_fetch_row($control3);
// $sqlnom4 = "select cedula, apellidos_noms, codigo, grado, direccion, celular, telefono, ciudad, email, entidad_laboral, fecha_nacimiento from datos_basicos_rc where cedula = '$ced'";
//$control4 = mysql_query($sqlnom4, $dbi) or die(mysql_error());
$control4 = mysql_query('SELECT cedula, apellidos_noms, codigo, grado, direccion, celular, telefono, ciudad, email, entidad_laboral, fecha_nacimiento FROM datos_basicos_rc WHERE cedula = "' . $HTTP_GET_VARS["ced"] . '" ');
if (!$control4) {
die('Invalid query 4: ' . mysql_error());
}
list($cedulab, $apellidos_nomsb, $codigob, $gradob, $direccionb, $celularb, $telefonob, $ciudadb, $emailb, $entidad_laboralb, $nacimiento) = mysql_fetch_row($control4);
//$sqlnom5 = "select sucursal, pagaduria, unidad_desc, cod_desc, entidad_recaudo, libranza, val_contrato, cuotas, valor_cuota, contrato, tipo_contrato, beneficiarios, mes_inicio, ano_inicio, mes_termino, ano_termino, vendedor from info_asjudinet where cedula = '$ced'";
//$control5 = mysql_query($sqlnom5, $dbi) or die(mysql_error());
$control5 = mysql_query('SELECT sucursal, pagaduria, unidad_desc, cod_desc, entidad_recaudo, libranza, val_contrato, cuotas, valor_cuota, contrato, tipo_contrato, beneficiarios, mes_inicio, ano_inicio, mes_termino, ano_termino, vendedor FROM info_asjudinet WHERE cedula = "' . $HTTP_GET_VARS["ced"] . '" ');
if (!$control5) {
die('Invalid query 5: ' . mysql_error());
}
list($sucursal, $pagaduria, $unidad_desc, $cod_desc, $entidad_recaudo, $libranza, $val_contrato, $cuotas, $valor_cuota, $contrato, $tipo_contrato, $beneficiarios, $mes_inicio, $aņo_inicio, $mes_termino, $aņo_termino, $vendedor) = mysql_fetch_row($control5);
//$sqlnom10 = "select plan from planes_ventas where codigo = '$tipo_contrato'";
//$control10 = mysql_query($sqlnom10, $dbi) or die(mysql_error());
$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;
}
// $sqlnom6 = "select nombre from sucursal where codigo = '$sucursal'";
// $control6 = mysql_query($sqlnom6, $dbi) or die(mysql_error());
$control6 = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "' ."$sucursal". '" ');
if (!$control6) {
die('Invalid query 7: ' . mysql_error());
}
list($sucursal2) = mysql_fetch_row($control6);
//$sqlnom7 = "select nombre from empresas where codigo = '$pagaduria'";
//$control7 = mysql_query($sqlnom7, $dbi) or die(mysql_error());
$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);
//$sqlnom8 = "select nombre from entidades_recaudo where codigo = '$entidad_recaudo'";
//$control8 = mysql_query($sqlnom8, $dbi) or die(mysql_error());
$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);
//$sqlnom9 = "select vendedor from vendedores where codigo = '$vendedor'";
//$control9 = mysql_query($sqlnom9, $dbi) or die(mysql_error());
$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 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=iso-8859-1" />
<title>Documento sin título</title>
<style type="text/css">
<!--
.Estilo10 { font-size: 14px;
font-weight: bold;
}
.Estilo12 {
font-size: 10px;
font-family: Georgia, "Times New Roman", Times, serif;
}
.Estilo15 { font-size: 12px;
color: #000000;
font-weight: bold;
}
.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: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #5151FF;
background-color: #C4E4FD;
border: thin solid #009999;
height: 15px;
width: auto;
}
.datos3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #FF3300;
background-color: #A6ECD7;
margin: 4px;
padding: 4px;
border: medium groove #CCCCFF;
}
body {
background-color: #DCFAF3;
}
.campo {background-color: #FFFFCC; border:1px solid #990000; font-family:Arial; font-size:11px; height: inherit}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.Estilo1 { color: #FF6633;
font-size: 24px;
font-style: italic;
}
.Estilo2 { color: #FF6633;
font-size: 16px;
}
.Estilo3 { color: #2492FF;
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;
}
.datos2 {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #0033FF;
background-color: #FFE2C6;
margin: 1px;
padding: 1px;
border-top-width: thin;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin;
}
.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;
}
.Estilo8 { font-size: 20px;
font-weight: bold;
}
.Estilo4 { color: #FF1A1A;
font-weight: bold;
}
.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: 12px;
font-weight: normal;
background-color: #B8F5E8;
margin: 4px;
padding: 5px;
border: thin outset #009999;
}
.Estilo52 {font-size: 16px}
.Estilo54 {font-size: 14px}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<table width="632" border="3" cellpadding="3" cellspacing="3" class="datos3">
<caption>
<div align="center"><strong><span class="Estilo12"><br />
</span></strong><strong><br />
</strong>
<table width="543" border="3" cellpadding="3" cellspacing="3" class="datos1">
<caption>
<span class="Estilo3"><br />
<span class="Estilo52">DATOS CREDITO </span></span> <br />
</caption>
<tr>
<th scope="col"><div align="right"><span class="Estilo4">Proveedor : </span></div></th>
<th scope="col">
<div align="left">
<input name="proveedorcre" type="text" class="campo1" id="proveedorcre" value="<?php echo $pro ?>" size="20" maxlength="20" readonly=""/>
</div></th>
<th scope="col"><div align="right"><span class="Estilo4">Fecha Credito : </span></div></th>
<th scope="col"><div align="left">
<input name="fechcre" type="text" class="campo1" id="fechcre" value="<?php echo $fecha ?>" size="10" maxlength="10" readonly="" />
</div></th>
</tr>
<tr>
<th width="125" height="32" scope="col"><div align="right"><span class="Estilo4">Monto solicitado : </span></div></th>
<th width="144" scope="col"><div align="left">
<input name="mon_sol" type="text" class="campo1" id="mon_sol" value="<?php echo $ms ?>" size="15" maxlength="12" readonly="" />
<label> </label>
</div></th>
<th width="112" scope="col"><div align="right"><span class="Estilo4">Salario :</span></div></th>
<th width="111" scope="col"><div align="left">
<input name="sala" type="text" class="campo1" id="sala" value="<?php echo $sal ?>" size="15" maxlength="12" readonly="" />
</div></th>
</tr>
<tr>
<td><div align="right"><span class="Estilo4">Numero Cuotas : </span></div></td>
<td><div align="left">
<input name="numerocuo" type="text" class="campo1" id="numerocuo" value="<?php echo $nc ?>" size="5" maxlength="2" readonly="" />
</div></td>
<td><div align="right"><span class="Estilo4">Valor Mensual :</span></div></td>
<td><div align="left">
<input name="valmen" type="text" class="campo1" id="valmen" value="<?php echo $vm ?>" size="15" maxlength="12" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="right"><span class="Estilo4">Numero Cuenta :</span></div></td>
<td><div align="left">
<input name="numcue" type="text" class="campo1" id="numcue" value="<?php echo $cah ?>" size="20" maxlength="20" readonly="" />
</div></td>
<td><div align="right"><span class="Estilo4">Banco Cuenta :</span></div></td>
<td><div align="left">
<input name="bancue" type="text" class="campo1" id="bancue" value="<?php echo $bcu ?>" size="15" maxlength="15" readonly="" />
</div></td>
</tr>
</table>
<table width="655" border="3" cellpadding="3" cellspacing="3" class="datos2">
<caption>
<span class="Estilo8"><br />
<span class="Estilo52">DATOS BASICOS </span></span>
</caption>
<tr>
<td width="88"><span class="Estilo12"><strong>Apellidos y Nombres </strong></span></td>
<td colspan="3"><div align="left">
<input name="apenom" type="text" class="campo1" id="apenom" value="<?php echo $apellidos_nomsb ?>" size="75" maxlength="75" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12"><strong>Cedula : </strong></div></td>
<td width="109"><input name="cedb" type="text" class="campo1" id="cedb" value="<?php echo $cedulab ?>" size="15" maxlength="15" readonly="" /></td>
<td width="84"><div align="center" class="Estilo12"><strong>Codigo : </strong></div></td>
<td width="319"><div align="left">
<input name="cod" type="text" class="campo1" id="cod" value="<?php echo $codigob ?>" size="15" maxlength="15" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12"><strong>Grado : </strong></div></td>
<td><input name="gra" type="text" class="campo1" id="gra" value="<?php echo $gradob ?>" size="15" maxlength="15" readonly="" /></td>
<td><div align="center" class="Estilo12"><strong>Direccion : </strong></div></td>
<td><input name="dir" type="text" class="campo1" id="dir" value="<?php echo $direccionb ?>" size="45" maxlength="45" readonly="" /></td>
</tr>
<tr>
<td><div align="center" class="Estilo12"><strong>Celular : </strong></div></td>
<td><input name="cel" type="text" class="campo1" id="cel" value="<?php echo $celularb ?>" size="15" maxlength="15" readonly="" /></td>
<td><div align="center" class="Estilo12"><strong>Telefono : </strong></div></td>
<td><div align="left">
<input name="tel" type="text" class="campo1" id="tel" value="<?php echo $telefonob ?>" size="15" maxlength="15" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12"><strong>Ciudad : </strong></div></td>
<td colspan="3"><div align="left">
<input name="ciud" type="text" class="campo1" id="ciud" value="<?php echo $ciudadb ?>" size="25" maxlength="25" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12"><strong>Email : </strong></div></td>
<td colspan="3"><div align="left">
<input name="email" type="text" class="campo1" id="email" value="<?php echo $emailb ?>" size="35" maxlength="35" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12"><strong>Entidad Laboral: </strong></div></td>
<td colspan="3"><div align="left">
<input name="entlab" type="text" class="campo1" id="entlab" value="<?php echo $entidad_laboralb ?>" size="35" maxlength="35" readonly="" />
</div></td>
</tr>
</table>
<strong><br />
<br />
<span class="Estilo54">INFORMACION SERVIASJUDINET </span><br />
<br />
</strong>
<label></label>
</div>
</caption>
<tr>
<th width="127" scope="col"><div align="right"><span class="Estilo12">Sucursal : </span></div></th>
<th width="154" scope="col"><div align="left">
<input name="ciud2" type="text" class="campo1" id="ciud2" value="<?php echo $sucursal2 ?>" size="25" maxlength="25" readonly="" />
</div></th>
<th width="108" scope="col"><div align="right"><span class="Estilo12">Pagaduria : </span></div></th>
<th width="188" scope="col"><div align="left">
<input name="ciud24" type="text" class="campo1" id="ciud24" value="<?php echo $pagaduria2 ?>" size="30" maxlength="30" readonly="" />
</div></th>
</tr>
<tr>
<td height="27"><div align="center" class="Estilo12">
<div align="right"><strong>Unidad Descuento :</strong></div>
</div></td>
<td><label>
<input name="ciud22" type="text" class="campo1" id="ciud22" value="<?php echo $unidad_desc ?>" size="25" maxlength="25" readonly="" />
</label></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Codigo Descuento : </strong></div>
</div></td>
<td><label>
</label>
<div align="left">
<input name="code" type="text" class="campo1" id="code" value="<?php echo $cod_desc ?>" size="5" maxlength="5" readonly="" />
</div></td>
</tr>
<tr>
<td height="27"><div align="center" class="Estilo12">
<div align="right"><strong>Entidad Recaudo :</strong></div>
</div></td>
<td><label>
<input name="ciud23" type="text" class="campo1" id="ciud23" value="<?php echo $entidad_recaudo2 ?>" size="25" maxlength="25" readonly="" />
</label></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Vendedor :</strong></div>
</div></td>
<td><div align="left">
<input name="ciud25" type="text" class="campo1" id="ciud25" value="<?php echo $vendedor2 ?>" size="30" maxlength="30" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Numero Libranza : </strong></div>
</div></td>
<td><div align="left">
<input name="numlib" type="text" class="campo1" id="numlib" value="<?php echo $libranza ?>" size="15" maxlength="15" readonly="" />
</div></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Valor Contrato : </strong></div>
</div></td>
<td><div align="left">
<input name="valcon" type="text" class="campo1" id="valcon" value="<?php echo $val_contrato ?>" size="15" maxlength="15" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Numero Cuotas : </strong></div>
</div></td>
<td><div align="left">
<input name="numcuo" type="text" class="campo1" id="numcuo" value="<?php echo $cuotas ?>" size="4" maxlength="2" readonly="" />
</div></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Valor Cuota: </strong></div>
</div></td>
<td><div align="left">
<input name="valcuo" type="text" class="campo1" id="valcuo" value="<?php echo $valor_cuota ?>" size="15" maxlength="15" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Numero Contrato : </strong></div>
</div></td>
<td><div align="left">
<input name="numcon" type="text" class="campo1" id="numcon" value="<?php echo $contrato ?>" size="15" maxlength="15" readonly="" />
</div></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Tipo Contrato : </strong></div>
</div></td>
<td><div align="left">
<input name="numcon2" type="text" class="campo1" id="numcon2" value="<?php echo $pln ?>" size="8" maxlength="8" readonly="" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Inicio Pagos :</strong></div>
</div></td>
<td><span class="Estilo15">MES</span>-
<input name="mes_inicio2" type="text" class="campo1" id="mes_inicio2" value="<?php echo $mes_inicio ?>" size="5" maxlength="4" readonly="" />
<label></label>
-<span class="Estilo15">AÑO</span>-
<input name="año_inicio" type="text" class="campo1" id="año_inicio" value="<?php echo $aņo_inicio ?>" size="5" maxlength="4" readonly="" /></td>
<td><div align="center" class="Estilo10">
<div align="right"><span class="Estilo12">Fecha Termino</span> :</div>
</div></td>
<td><span class="Estilo15">MES</span>-
<input name="mes_termino2" type="text" class="campo1" id="mes_termino2" value="<?php echo $mes_termino ?>" size="5" maxlength="4" readonly="" />
<label></label>
-<span class="Estilo15">AÑO</span>-
<input name="año_termino2" type="text" class="campo1" id="año_termino2" value="<?php echo $aņo_termino ?>" size="5" maxlength="4" readonly="" /></td>
</tr>
<tr>
<td height="34"><div align="center" class="Estilo12">
<div align="right"><strong>Fecha Nacimiento :</strong></div>
</div></td>
<td bordercolor="#1941A5"><label>
</label>
<div align="left">
<input name="fecha_nac" type="text" class="campo1" id="fecha_nac" value="<?php echo $nacimiento ?>" size="10" maxlength="10" readonly="" />
</div></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Numero Beneficiarios : </strong></div>
</div></td>
<td><div align="left">
<input name="numben" type="text" class="campo1" id="numben" value="<?php echo $beneficiarios ?>" size="4" maxlength="2" readonly="" />
</div></td>
</tr>
</table>
</div>
<p align="center"> </p>
</form>
</body>
</html>
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
$mssql = mysql_query('SELECT * FROM asjudinet_consignaciones ');
if (!$mssql) {
die('Invalid query 2: ' . mysql_error());
}
if($mssql)
{
$filas = mysql_num_rows($mssql);
if ($filas > 0)
{
$control = mysql_query('SELECT valorconsignacion, cuota, mescuota , formapago , diaconsignacion, mesconsignacion , anoconsignacion FROM asjudinet_consignaciones WHERE cedula = "' . $HTTP_GET_VARS["ced"] . '" order by cuota ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<table width='450' border='2' align='center' cellpadding='1' cellspacing='1' class='Estilo15'>
<tr>
<td width='103'><div align='center'><strong>VALOR</strong></div></td>
<td width='47'><div align='center'><strong>CUOTA</strong></div></td>
<td width='59'><div align='center'><strong>MES</strong></div></td>
<td width='344'><div align='center'><strong>ENTIDAD DESCUENTO</strong></div></td>
<td width='133'><div align='center'><strong>FECHA REGISTRO</strong></div></td>
</tr>";
while(list($valor, $cuota, $mes_inicio, $cod_descuento, $dir, $mer, $anr) = mysql_fetch_row($control))
{
printf("<TR>
<TD bgcolor='#C5D6FC'><div align='center' class='lista'>".$valor."</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center' class='lista'>".$cuota."</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center' class='lista'>".$mes_inicio."</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center' class='lista'>".$cod_descuento."</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center' class='lista'>".$dir.' - '.$mer.' - '.$anr ."</span></div></TD> </TR>");
}
echo "</table>";
}
}
}
echo "</form>";
?>