File: /home/asjudine/www/listado_afiliaciones_control_veinte.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>LISTADO AFILIADOS CONTROL VEINTE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titulos {
font: 16px;
color: #F00;
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 );
color: #666;
}
.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">
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg"WIDTH=60% > </center>
<form name="formulario" action="" method="post">
<table width="671" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><table width="669" border="15" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td bgcolor="#CCCCFF" class="titulos"><div align="center">LISTADO AFILIADOS CONTROL VEINTE POR CIENTO</div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="22" bgcolor="#FFFFFF" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</table>
<html>
<center>
<form action="registro.php" method ="POST">
<br>
<input name="Regresar" type="button" class="Estilo51" onClick="window.location.href='menu_director_soldados.php'" value="Menu Control director">
</br>
</form>
<br>
</html>
<?php
require_once("Conectarse.php");
require_once("mainfile.php");
include ("config.php");
$sucu =$_GET["sucu"] ;
$nom =$_GET["nom"] ;
$ced =$_GET["ced"] ;
/*
$control = mysql_query('SELECT nombre,cedula,celular,email,unidad_descuento,grado,direccion,ciudad,tipo_proceso,
fecha_afiliacion FROM cartera_serviasjudinet WHERE tipo_proceso = "VEINTE POR CIENTO" AND exportado = "" order by fecha_afiliacion asc');
// if (!$control) {
// die('Invalid query 0: ' . mysql_error());
// }
//$controla = mysql_query('SELECT cedula,celular,email,unidad,grado,direccion_residencia,ciudad_residencia,tipo_proceso FROM consultorio_veinte WHERE estado= "6" and exportado = " " ');
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='1200' 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'>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 Y 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'>TIPÓ DE PROCESO </span></div></TD> <TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>INGRESO</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>FECHA AFILIACION</span></div></TD>";
//while(list($cedula,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso) = mysql_fetch_row($controla))
while( list($nombre,$cedula,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso,$fecha_afiliacion) = mysql_fetch_row($control))
{
/*$control = mysql_query('SELECT nombre,cedula,celular,email,unidad_descuento,grado,direccion,ciudad,tipo_proceso,
fecha_afiliacion FROM cartera_serviasjudinet WHERE tipo_proceso = "VEINTE POR CIENTO" and cedula = "'.$cedula.'" order by fecha_afiliacion asc');
if (!$control) {
die('Invalid query 0: ' . mysql_error());
}
list($nombre,$cedula,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso,$fecha_afiliacion) = mysql_fetch_row($control);
*/
/*
$fil = mysql_num_rows($control);
$codproce="3";
if ($fil != 0)
{
$tota = $tota + 1;
printf("<tr>
<td bgcolor='#CCCCFF'><div align='center' class='Estilo21'><input type='button' value=$cedula name='proceso' class=Estilo21 onClick = window.open('consultorio_juridico_control_veinte_menu.php?cedula=$cedula&celular=$celular&proceso=$codproce','','top=30,left=50,toolbar=yes,scrollbars=yes,width=1200,height=800,status=yes')></a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$grado."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$unidad."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$nombre."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$celular."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$email."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$proceso."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='Estilo21'><input type='button' value=INGRESO name='proceso' class=Estilo21 onClick = window.open('consultorio_juridico_control2_veinte_cartera.php?cedula=$cedula&celular=$celular&proceso=$codproce','','top=30,left=50,toolbar=yes,scrollbars=yes,width=900,height=800,status=yes')></a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$fecha_afiliacion."</a></span></div></td> ");
}
}
}
/////////////////////
$control2 = mysql_query('SELECT apellidos, nombres,cedula,celular,celular_personal,email,grado, unidad,tipo_proceso FROM consultorio_veinte WHERE estado = "6" and exportado = "" ');
while( list($apellidos,$nombre,$cedula,$celular,$cel_personal,$email,$grado,$unidad,$proceso) = mysql_fetch_row($control2))
{
$fil = mysql_num_rows($control);
$codproce="3";
if ($fil != 0)
{
$tota = $tota + 1;
printf("<tr>
<td bgcolor='#CCCCFF'><div align='center' class='Estilo21'><input type='button' value=$cedula name='proceso' class=Estilo21 onClick = window.open('consultorio_juridico_control_veinte_menu.php?cedula=$cedula&celular=$celular&proceso=$codproce','','top=30,left=50,toolbar=yes,scrollbars=yes,width=1200,height=800,status=yes')></a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$grado."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$unidad."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$nombre."".$apellidos."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$celular."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$email."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$proceso."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='Estilo21'><input type='button' value=INGRESO name='proceso' class=Estilo21 onClick = window.open('consultorio_juridico_control2_veinte.php?cedula=$cedula&celular=$celular&proceso=$codproce','','top=30,left=50,toolbar=yes,scrollbars=yes,width=900,height=800,status=yes')></a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$fecha_afiliacion."</a></span></div></td> ");
}
}
echo "<TABLE width='200' border='0' align='center' cellpadding ='0' cellspacing='1'>
<TR>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>TOTAL</span></div></TD>";
printf("<tr>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$tota."</a></span></div></td>");
echo "</form>"; */
/*$controla = 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="VEINTE POR CIENTO"');*/
$control = mysql_query('SELECT cedula,apellidos,nombres,celular,email,unidad,grado,direccion_residencia,
ciudad_residencia,tipo_proceso, carpeta FROM control_veinte WHERE tipo_proceso = "VEINTE POR CIENTO" AND exportado = "" ORDER BY carpeta ');
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='1200' 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'>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'>TIPÓ DE PROCESO </span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>INGRESO</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>FECHA AFILIACION</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>NUMERO CONTRATO</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>TIPO CONTRATO</span></div></TD>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>Nº CARPETA</span></div></TD>";
/*while(list($cedula,$nombre,$numerocotr,$tipocontr,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso,$fecha_afiliacion) = mysql_fetch_row($controla))
{ */
while(list($cedula,$apellidos,$nombres,$celular,$email,$unidadcontrol,$gradocontrol,$direccion_residencia,$ciudad_residencia,$procesocontrol, $numcarpeta) = mysql_fetch_row($control))
{
/*
$control = mysql_query('SELECT cedula,nombre,numerocontrato,tipocontrato,celular,email,unidad_descuento,
grado,direccion,ciudad,tipo_proceso,fecha_afiliacion FROM cartera_serviasjudinet WHERE tipo_proceso = "VEINTE POR CIENTO" and cedula = "'.$cedula.'" ');
if (!$control) {
die('Invalid query 0: ' . mysql_error());
}
list($cedula,$nombre,$numerocotr,$tipocontr,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso,$fecha_afiliacion) = mysql_fetch_row($control);
$fil = mysql_num_rows($control);
$codproce="1";
if ($fil != 0)
{
*/
//POR SI ACASO
/*<td bgcolor='#CCCCFF'><div align='center' class='Estilo21'><input type='button' value=$cedula name='proceso' class=Estilo21 onClick = window.open('consultorio_juridico_control.php?cedula=$cedula&celular=$celular&proceso=$codproce','','top=30,left=50,toolbar=yes,scrollbars=yes,width=1200,height=800,status=yes')></a></span></div></td> */
/*
$control = mysql_query('SELECT cedula,apellidos,nombres,celular,email,unidad,grado,direccion_residencia,
ciudad_residencia,tipo_proceso, carpeta FROM control_veinte WHERE cedula = "'.$cedula.'" AND exportado="" ORDER BY apellidos ASC');
if (!$control) {
die('Invalid query 0: ' . mysql_error());
}
*/
$controla = mysql_query('SELECT numerocontrato,tipocontrato,celular,email,unidad_descuento,
grado,direccion,ciudad,tipo_proceso,fecha_afiliacion FROM cartera_serviasjudinet WHERE estado = 1 and cedula = "'.$cedula.'"');
if (!$controla) {
die('Invalid query 0: ' . mysql_error());
}
//list($cedula,$apellidos,$nombres,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso, $numcarpeta) = mysql_fetch_row($control);
list($numerocotr,$tipocontr,$celular,$email,$unidad,$grado,$direccion_residencia,$ciudad_residencia,$proceso,$fecha_afiliacion) = mysql_fetch_row($controla);
$fil = mysql_num_rows($controla);
$codproce="1"; //VEINTE POR CIENTO
if ($fil != 0)
{
$tota = $tota + 1;
printf("<tr>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$cedula."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$grado."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$unidad."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$apellidos."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$nombres."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$celular."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$email."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$procesocontrol."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='Estilo21'><input type='button' value=INGRESO name='proceso' class=Estilo21 onClick = window.open('consultorio_juridico_control_veinte_director_ingresar.php?cedula=$cedula&celular=$celular&proceso=$codproce','','top=30,left=50,toolbar=yes,scrollbars=yes,width=900,height=800,status=yes')></a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$fecha_afiliacion."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$numerocotr."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$tipocontr."</a></span></div></td>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$numcarpeta."</a></span></div></td>
");
}
/*else{
$controlsol = mysql_query("INSERT INTO consultorio_veinte (apellidos,cedula,celular,email,grado,unidad, direccion_residencia,ciudad_residencia,estado,tipo_proceso) VALUES ('".$nombre."','".$cedula."','".$celular."','".$email."','".$grado."','".$unidad."','".$direccion_residencia."','".$ciudad_residencia."','6','VEINTE POR CIENTO')");
}*/
}
}
echo "<TABLE width='200' border='0' align='center' cellpadding ='0' cellspacing='1'>
<TR>
<TD bgcolor='#CCCCCC'><div align='center'><span class='fecha'>TOTAL</span></div></TD>";
printf("<tr>
<td bgcolor='#CCCCFF'><div align='center' class='lista'>".$tota."</a></span></div></td>");
echo "</form>";
?>