File: /home/asjudine/www/listado_general_control_soldado.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Listado General</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;}
.Estilo2 {font-family: Arial; font-size: 16px; color: #990000;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; width:70px; height:22px;}
body {
background-image: url(ELEMENTOS/gri06.jpg );
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
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">
<form name="formulario" action="" method="post">
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<br>
<div class="Estilo1"align="center">LISTADO GENERAL CONTROL SUBSIDIO SOLDADO</div>
<table width="300" height="36" border="5" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="300" height="36"><fieldset><table width="300" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#ECE9D8">
<td height="10" bgcolor="#306090"><div align="center">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_control_subsidio_soldado.php'" value="IR AL MENU">
</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;
$control = mysql_query('SELECT apellidos,nombres,cedula,celular,email,unidad,grado,direccion_residencia,
ciudad_residencia,carpeta FROM control_subsidio_soldado WHERE tipo_proceso="SUBSIDIO FAMILIAR SOLDADO" order by apellidos');
if (!$control) {
die('Invalid query 0: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='980' border='2' align='center' cellpadding ='0' cellspacing='1' bgcolor='#000000'>
<TR>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>CEDULA</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>CEDULA</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>GRADO</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>UNIDAD</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>APELLIDOS</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>NOMBRES</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>CELULAR</span></div></TD> <TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>CORREO ELECTRONICO</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>NUMERO CARPETA</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>TIPO PROCESO</span></div></TD>";
while(list($apellidos,$nombre,$cedula,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$carpeta) = mysql_fetch_row($control))
{
$nombre = $nombre.' '.$apellido;
/*$control2 = mysql_query('SELECT tipo_proceso FROM solicitud_credito WHERE cedula = "'.$cedula.'"');
if (!$control2) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control2);
list() = mysql_fetch_row($control2);
if ((mysql_num_rows($control2)==0))
{
$controlpro = mysql_query('SELECT tipo_proceso FROM consultorio_soldado WHERE cedula = "'.$cedula.'"');
if (!$controlpro) {
die('Invalid query 0: ' . mysql_error());
}
list($proceso) = mysql_fetch_row($controlpro);
}
*/
$controlcart = mysql_query('SELECT numerocontrato,tipocontrato,tipo_proceso FROM cartera_serviasjudinet WHERE tipo_proceso ="SUBSIDIO FAMILIAR SOLDADO" and estado = "1" ');
/*
$controlcart = mysql_query('SELECT cedula,nombre,numerocontrato,tipocontrato,celular,email,unidad_descuento,
grado,direccion,ciudad,tipo_proceso,fecha_afiliacion FROM cartera_serviasjudinet WHERE estado = "1" AND tipo_proceso="SUBSIDIO FAMILIAR SOLDADO"');
*/
if (!$controlcart) {
die('Invalid query 0: ' . mysql_error());
}
list($numctrto,$tipcontr,$proceso) = mysql_fetch_row($controlcart);
if ((mysql_num_rows($controlcart)!=0))
{
$tota = $tota + 1;
printf("<tr>
<td bgcolor='#ECE9D8'><div align='center' class='Estilo21'><input type='button' value=$cedula name='proceso' class=Estilo21 onClick = window.open('formulario_consultorio_control_sub_listado_soldado.php?cedula=$cedula&celular=$celular','','top=30,left=50,toolbar=yes,scrollbars=yes,width=900,height=800,status=yes')></a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$cedula."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$grado."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$unidad."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$apellidos."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$nombre."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$celular."</a></span></div></td> <td bgcolor='#ECE9D8'><div align='center' class='lista'>".$email."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$carpeta."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$proceso."</a></span></div></td>
");
}
}
echo "<TABLE width='200' border='3' align='center' cellpadding ='0' cellspacing='1'>
<br>
<TR>
<TD bgcolor='#306090'><div align='center'><span style='color:#FFFFFF'>TOTAL</span></div></TD>";
printf("<tr>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$tota."</a></span></div></td>");
echo "</form>"; }
?>