File: /home/asjudine/www/acorreos/acobranzas/credito_rotativo_modificar_gestion_cobranza.php
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta Cobranzas Vigente </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);
}
return (true);
}
*/
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">MODIFICAR GESTION COBRANZAS</h3>
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
<table width="697" border="0" align="center" cellpadding="3" cellspacing="3">
<!--<tr>
<td colspan="4" align="right" nowrap><div align="center"><span class="Estilo2">MODIFICAR GESTION COBRANZAS</td>
</tr>-->
<tr>
<td class="fecha" colspan="4">
<script languaje="JavaScript">Mostrar_Fecha()</script></div></td>
</tr>
<tr>
<td class="tdcen" width="141">Cédula del Deudor:</td>
<td width="90"><input name="cedula" type="text" id="cedula" value="" size="15" maxlength="15" ></td>
<td width="436" colspan="2"><input name="consultar" class="boton1" type="submit" id="consultar"value ="Buscar" >
<input name="button" type="button" class="irmenu" onclick="window.location.href='menu_cobranzas_credito_rotativo.php'" value="Volver al Menú">
<!--<input name="button" type="button" onclick="window.location.reload()" value="Actualizar">
<input name="button" type="button" onclick="history.forward()" value="Adelante">-->
</td>
</tr>
</table>
</form>
</body>
</html>
<?php
if(isset($_POST["consultar"]))
{
global $dbi;
require_once("../Conectarse.php");
$result = mysql_query('SELECT cedula, estado FROM cobranzas_credito_rotativo WHERE cedula = "' . $_POST[cedula] . '" ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
$row = mysql_fetch_row($result);
$Cedula = $row[0];
$Estado = $row[1];
if($Cedula)
{
if($Estado == '0' || $Estado == '1' || $Estado == '2'|| $Estado == '3' )
{
echo "<table width='1000' border='0' align='center' cellpadding='3' cellspacing='3'>
<tr>
<td width='100' class='tdtitulo'>Cédula</td>
<td width='70' class='tdtitulo'># carpeta</td>
<td width='290' class='tdtitulo'>Apellidos y nombres </td>
</tr>";
$result = mysql_query('SELECT cedula, numero_carpeta, nombre_completo, numero, tipo, oficio_numero, fecha_oficio, codigo_gestion, fecha_gestion FROM cobranzas_credito_rotativo WHERE cedula = "' . $_POST["cedula"] . '"');
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=\"credito_rotativo_consultar_cobranzas_vigentes_modificar.php?id=$Cedula&carpeta=$nc\" target='_blank'>".$nc."</td>
<td class='tdfull'>".$an."</td>
</td> ");
}
//}
echo "</tr></table>";
}
else
{
echo "<script>alert('Ya fue ingresada una devolución para esa cédula')</script>";
}
}
else
{
echo "<script>alert('Afiliado no esta en cobranzas ó no Pertenece a su Gestión ');</script>";
}
//}
}
?>
</tr>
</table>