File: /home/asjudine/www/listado_envio_mensajes.php
.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Listado Sin Pagos Ultimo Mes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titulos {
font: 16px;
color: #00F;
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:90px;
height:22px;
}
body {
background-image: url(ELEMENTOS/gri06.jpg );
}
.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;}
-->
</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 bgColor=papayawhip text="maroon" topmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<br>
<CENTER>
<script languaje="JavaScript">
mesarray=new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio","Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
diaarray=new Array( "Domingo","Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
hoy = new Date();
dias = hoy.getDate();
dia = hoy.getDay();
mes = hoy.getMonth();
mes=mesarray[mes];
dia =diaarray[dia];
anno = hoy.getYear();
if (anno <200)
anno = anno+1900;
document.write('<TABLE WIDTH="60" height="60" BORDER="2" BGCOLOR="#FFFFFF"><TR><TD><CENTER>');
document.write('<FONT SIZE="2" COLOR="#000000"> <B>'+mes+'</B></FONT><br>');
document.write('<FONT SIZE="1" COLOR="#000000">'+anno+'</FONT><br>');
document.write('<FONT SIZE="4" COLOR="#000000" FACE="Arial"><B>'+dias+'</B></FONT><br>');
document.write('<FONT SIZE="1" COLOR="#000000">'+dia+'</FONT><br>');
document.write('</CENTER></TR></TD></TABLE>');
<!--
var from = 2;
var to = 12;
var delay = 55;
var glowColor = "#0000ff";
var i = to;
var j = 0;
textPulseDown();
function textPulseUp()
{
if (!document.all)
return
if (i < to)
{
TexteBat.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i++;
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}
if (i = to)
{
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}
}
function textPulseDown()
{
if (!document.all)
return
if (i > from)
{
TexteBat.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";
i--;
theTimeout = setTimeout('textPulseDown()',delay);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('textPulseUp()',delay);
return 0;
}
}
//--></CENTER>
</script>
</CENTER>
<form name="formulario" action="" method="post">
<table width="671" border="2" cellspacing="2" cellpadding="2" align="center" bgcolor="black">
<tr>
<td colspan="4" bgcolor="#CCCCCC" class="titulos"><div align="center"> LISTADO PARA ENVIO MENSAJES DE TEXTO</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td bgcolor="#FFFFFF"><div align="center" class="Estilo51">
<input name="menu2" type="button" class="Estilo51" id="menu2" onClick="window.location.href='menu_admin.php'" value="IR AL MENU">
<input name="consultar" id="consultar" type="submit" class="Estilo51" value="CONSULTAR">
</div></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</form>
</body>
</html>
<?php
require_once("Conectarse.php");
echo "<form name='form' action='' method='post'>";
require_once("mainfile.php");
include ("config.php");
global $dbi;
if(isset($_POST["consultar"]))
{
$control = mysql_query('SELECT cedula, nombre, numerocontrato, tipocontrato, numero_libranza,tipo_afiliado, unidad_descuento , valorcuota,saldonuevo,estado FROM actuaciones WHERE estado = "1" and (tipocontrato= "COA01" || tipocontrato= "COA02") order by cedula ');
if (!$control) {
die('Invalid query 2: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='900' 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'>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'>NUMERO CONTRATO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TIPO CONTRATO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NUMERO DE LIBRANZA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TIPO AFILIADO</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'>SALDO NUEVO </span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VALOR CUOTA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VIGENTE/HISTORICO </span></div></TD>";
while(list($cedula, $nombres , $numcon, $tipo,$numero_libranza, $afili, $unidad,$valorcuota,$cuotaspendientes, $estado) = mysql_fetch_row($control))
{
if ($tipo > 0)
{
$cont10 = mysql_query('SELECT codigo_contrato FROM planes_contratos WHERE codigo = "' . "$tipo". '" ');
if (!$cont10) {
die('Invalid query 42: ' . mysql_error());
}
list($tipo) = mysql_fetch_row($cont10);
}
if ($estado == 0)
{
$esta = "HISTORICO";
}
else
{
$esta = "VIGENTE";
}
$sum = $sum + 1;
$valtotal = $valtotal + $cuotaspendientes;
printf("<tr>
<TD bgcolor='#ECE9D8'><div align='center' class='lista'><input type='button' value=$cedula name='cedu' class=est_cont1 onClick =window.open('mensajes_elibom.php?ced2=$cedula&numcon=$numcon','','top=50,left=100,toolbar=no,scrollbars=yes,width=850,height=550,status=yes')></a></span></div></TD>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$cedula."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$nombres."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$numcon."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$tipo."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$numero_libranza."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$afili."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$unidad."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$cuotaspendientes."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$valorcuota."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$estado."</span></div></td> ");
}
echo "</table>";
echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TOTAL REGISTROS</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VALOR TOTAL </span></div></TD>";
printf("<tr>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$sum."
</span></div></td> <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$valtotal."</span></div></td>");
echo "</table>";
}
echo "</form>";
}
?>