File: /home/asjudine/www/acreditos/record_cobranzas_cre.php
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta por cedula historial mora</title>
<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">
<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;}
.cerrarsesion{width: auto;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
.cerrarsesion:hover{background-color: #ffffff;color: #000;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
.subtitulos{width: 100%;text-align: left;color: #b20606;padding: 2px 0;font-size: 13px;}
table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 120px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{border: #969696 solid 1px;}
.tdizq{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 13px;font-weight: 300; text-align: left;}
.tdcen{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 13px;font-weight: 300; text-align: center;}
.tdder{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 13px;font-weight: 700; text-align: right;}
.tdroja{background-color: #EEE; padding: 1px 1px;color: #CC0005;font-size: 13px;font-weight: 600; text-align: center;}
.exp{color:#8A0000; font-size:10px;}
.boton1{width:120px;background-color: #ffffff;color: #000;padding: 4px;border:1px solid #580000;border-radius:2px;}
.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: 13px;}
.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;}
</style>
<script Language="JavaScript"><!--
function validar(formulario)
{
if (formulario.cedula.value == "")
{
alert("Ingrese número de cédula del deudor");
formulario.cedula.focus();
return (false);
}
if (formulario.dia_act.value > 31)
{
alert("El número de día no se debe exceder de 31");
formulario.dia_act.focus();
return (false);
}
if (formulario.mes_act.value > 12)
{
alert("El número del mes no se debe exceder de 12");
formulario.mes_act.focus();
return (false);
}
return (true);
}
//--></script>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<b><font face='Arial,Helvetica,sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}
</script>
</head>
<body onload="document.formulario.cedula.focus()">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">CONSULTA COBRANZAS DATOS CREDITO VIGENTES</h3>
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
<table width="699" border="0" align="center" cellpadding="3" cellspacing="3">
<!--<tr>
<td colspan="4" >CONSULTA DE DATOS PARA INGRESAR DEVOLUCION</td>
</tr>-->
<tr>
<td class="fecha" colspan="4">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</td>
</tr>
<tr>
<td class="tdcen">Cédula del Deudor:</td>
<td class="tdcen"><input name="cedula" type="text" id="cedula" value="" size="15" maxlength="15" ></td>
<td class="tdcen" colspan="2">
<input name="consultar" type="submit" id="consultar"value ="Buscar" class="boton1">
<input name="button" type="button" class="irmenu" onclick="window.location.href='menu_cobranzas_cre.php'" value="Volver al Menú">
</td>
</tr>
</table>
</form>
<table width="920" border="1" cellspacing="3" cellpadding="3" align="center">
<tr>
<td width="110" class="tdtitulo">Cédula</td>
<td width="73" class="tdtitulo"># carpeta</td>
<td width="300" class="tdtitulo">Apellidos y nombres</td>
<td width="72" class="tdtitulo">Contrato</td>
<td width="50" class="tdtitulo">Tipo</td>
<td width="105" class="tdtitulo">Codigo Juridica</td>
<td width="110" class="tdtitulo">Fecha Gestion</td>
<td width="100" class="tdtitulo">Núm.Ofic.Envio</td>
<td width="140" class="tdtitulo">Fecha ofic.envío</td>
</tr>
<?php
require_once("../Conectarse.php");
if(isset($_POST["consultar"]))
{
$result = mysql_query('SELECT cedula,estado FROM cabranzas_credito WHERE cedula = "'. $_POST[cedula].'" and estado = "0"');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
$row = mysql_fetch_row($result);
$Cedula = $row[0];
$Estado = $row[1];
if($Cedula)
{
if($Estado == '1')
{
echo "<table width='1000' border='0' align='center' cellpadding='3' cellspacing='3'>
<tr>
<td class='tdtitulo'>Cédula</td>
<td class='tdtitulo'># carpeta</td>
<td class='tdtitulo'>Apellidos y nombres </td>
<td class='tdtitulo'>Contrato</td>
<td class='tdtitulo'>Tipo</td>
<td class='tdtitulo'>Codigo Gestion </td>
<td class='tdtitulo'>Fecha Gestion </td>
<td class='tdtitulo'>Núm.Ofic.Envio </td>
<td class='tdtitulo'>Fecha ofic.envío </td>
</tr>";
$result = mysql_query('SELECT cedula,numero_carpeta,nombre_completo,numero,tipo,oficio_numero,
fecha_oficio,codigo_gestion,fecha_gestion FROM cabranzas_credito WHERE cedula = "'.$_POST[cedula].'" and estado = "0"');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
while(list($cc,$nc,$an,$con,$tip,$nof,$fecha,$cod,$fechagest) = mysql_fetch_row($result))
{
$tres=substr($fecha,0,4);$dos=substr($fecha,5,2);$uno=substr($fecha,8,2);$fecha = ($uno."-".$dos."-".$tres);
printf("<tr>
<td class='tdfull'>".$cc."</td>
<td class='tdfull'><a href=\"consultar_cobranzas_cre.php?id=$cedula&carpeta=$nc\" target='_blank'>".$nc."</td> <td class='tdfull'>".$an."</td>
<td class='tdfull'>".$con."</td>
<td class='tdfull'>".$tip."</td>
<td class='tdfull'>".$cod."</td>
<td class='tdfull'>".$fechagest."</td>
<td class='tdfull'>".$nof."</td>
<td class='tdfull'>".$fecha."</td> ");
}
echo "</tr></table>";
}
else
{
echo "<script>alert('cédula no existe en la base de datos')</script>";
}
}
}
?>
</tr></table>