File: /home/asjudine/www/cuotas_pend_deb.php
.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ESTADO CONTABLE-CUOTAS PENDIENTES</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block; }
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000;}
.lista {font-family: Arial; font-size: 11px; color: #990000;}
.lista2 {font-family: Arial; font-size: 16px; color: #FF6600;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; width:70px; height:22px;}
body {
background-image: url();
}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.Estilo51 {
color: #3366FF;
font-weight: bold;
}
.boton1 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.Estilo54 {
color: #0033FF;
font-weight: bold;
}
-->
</style>
<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>
<script language="javascript">
function AbreGral()
{
var menu;
menu=window.open("mostrar_ingreso.php","","toolbar=no,scrollbars=no,width=800,height=500,status=yes");
menu.focus();
var ventana = window.self;
ventana.opener = window.self;
ventana.close();
}
</script>
</head>
<body onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="formulario" action="" method="post">
<table width="671" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><fieldset><table width="669" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td colspan="2" class="titulos"><div align="center">LISTADO POR CUOTAS PENDIENTES DEBITOS</div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="22" colspan="2" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
Seleccione No. Cuotas</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td width="328">
<div align="right" class="Estilo54">No Cuotas:</div></td>
<td width="327"><div align="left">
<select name="ncuo" id="ncuo">
<option value="0" selected>0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="2"><div align="center"><span class="Estilo51">
<input name="consultar" id="consultar" type="submit" class="boton11" value="Consultar">
</span></div></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="2"><div align="center" class="Estilo51">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_cartera_debito.php'" value="IR AL MENU">
</div></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</form>
</body>
</html>
<?php
require_once("Conectarse.php");
if(isset($_POST["consultar"]))
{
echo "<form name='form' action='' method='post'>";
require_once("mainfile.php");
include ("config.php");
global $dbi;
$mssql = mysql_query('SELECT * FROM debitos WHERE cuotas_pend = "' . $_POST["ncuo"] . '" ');
if (!$mssql) {
die('Invalid query: ' . mysql_error());
}
if($mssql)
{
$filas = mysql_num_rows($mssql);
if ($filas > 0)
{
$control = mysql_query('SELECT cedula, nombres, unidad_desc,codigo_desc,valor_credito,valor_juridica,valor_debitar,cuotas_pend,situacion,estado FROM debitos WHERE cuotas_pend = "' . $_POST["ncuo"] . '" order by nombres');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='1000' border='0' align='center' cellpadding='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEDULA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NOMBRE</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VALOR CREDITO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VALOR JURIDICA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VALOR DEBITAR</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CUOTAS PENDIENTES</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CODIGO DESCUENTO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>UNIDAD</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>FECHA DE REGISTRO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>SITUACION</span></div></TD>";
while(list($cedula, $nomb, $unidad , $codigo, $valor_credito, $valor_juridica, $valor_debitar,$cuotas_pend,$situacion, $esta) = mysql_fetch_row($control))
{
if ($esta == 1)
{
$vige = "VIGENTE";
}else
{
$vige = "HISTORICO";
}
printf("<tr>
<td bgcolor='#ECE9D8'><div align='center' class='lista'><input type='button' value=$cedula name='cedula' class=Estilo51 onClick =window.open('consultar_debito.php?ced=$cedula','','top=50,left=100,toolbar=yes,scrollbars=yes,width=820,height=800,status=yes')></a></span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$nomb."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$valor_credito."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$valor_juridica."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$valor_debitar."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$cuotas_pend."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$codigo."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$unidad."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$vige."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$situacion."</span></div></td>");
}
}
}
}
echo "</form>";
}
?>