MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/public_html/comercial/envio_contrato_por_afiliado_creditos_soldados.php
<?
require_once("../Conectarse.php");
/*
$Recordset1 = mysql_query('SELECT * FROM Usuarios WHERE (Cargo!="ABOGADO" and Cargo!="ABOGADA" and Cargo!= "MANTENIMIENTO ELECTRONICO" and Cargo!= "SECRETARIA TESORERIA" and Cargo!="Ingeniero de sistemas" and Cargo!="ARCHIVO Y CORRESPONDENCIA" and Cargo!="ASISTENTE COBRANZAS" and Cargo!="ASISTENTE COBRANZAS DOS" and Cargo!="ASISTENTE DE PRESIDENCIA" and Cargo!="ASISTENTE DIRECTOR DE SERVICIOS" and Cargo!="BANCOS" and Cargo!="CARTERA NOMINAS" and Cargo!="COBRANZAS" and Cargo!="CONSULTORIO JURIDICO" and Cargo!="CONTADOR" and Cargo!="CONTROL INTERNO" and Cargo!="DIRECTOR COMERCIAL" and Cargo!="DIRECTORA ACTUACIONES JURIDICAS" and Cargo!= "GERENTE ADMINISTRATIVA" and Cargo!= "Gerente Control de Calidad" and Cargo!= "GERENTE GENERAL" and Cargo!= "HISTOSER" and Cargo!= "JEFE COBRANZAS" and Cargo!="FINANCIERA" and Cargo!="JEFE MANTENIMIENTO LOCATIVO" and Cargo!="MENSAJES DE TEXTO" and Cargo!="POSTVENTA" and Cargo!="PRESIDENTE SERVIASJUDINET" and Cargo!="ASISTENTE COBRANZAS" and Cargo!="ASESOR COMERCIAL" and Cargo!="RECEPCION" and Cargo!= "DIRECTOR REGIONAL" and codigo!="472" and codigo!="547"  and codigo!="555"  and codigo!="570"  and codigo!="499"  and codigo!="564" || codigo="655" || codigo="703") order by Nombre_Completo'); 
*/


/*
$Recordset1 = mysql_query('SELECT * FROM Usuarios WHERE (codigo = "472" || codigo="662" || codigo="744" || codigo="745" ) order by Nombre_Completo');*/

$Recordset1 = mysql_query('SELECT * FROM Usuarios WHERE (
Cargo!="ABOGADO" and 
Cargo!="ABOGADA" and 
Cargo!="ARCHIVO Y CORRESPONDENCIA" and
Cargo!="ASISTENTE ADMINISTRATIVO" and
Cargo!="ASISTENTE COBRANZAS" and 
Cargo!="ASISTENTE COBRANZAS DOS" and
Cargo!="ASISTENTE DE PRESIDENCIA" and
Cargo!="ASISTENTE DEL DIRECTOR" and
Cargo!="ASISTENTE DESAFILIACIONES" and
Cargo!="ATTORNEY" and
Cargo!="CARTERA NOMINAS" and
Cargo!="COBRANZAS" and
Cargo!="CONTADOR" and
Cargo!="CONTROL INTERNO" and
Cargo!="CONTROL IPC" and
Cargo!="CONTROL JUDICIAL" and
Cargo!="CONTROL SUBSIDIO" and
Cargo!="CONTROL SUBSIDIO SOLDADO" and
Cargo!="CONTROL VEINTE" and
Cargo!="DIRECTOR COMERCIAL" and
Cargo!="DIRECTOR CONTROL IPC" and
Cargo!="DIRECTOR CONTROL SUBSIDIO" and
Cargo!="DIRECTOR CONTROL SUBSIDIO SOLDADO" and
Cargo!="DIRECTOR CONTROL VEINTE" and
Cargo!="DIRECTOR JURIDICO" and
Cargo!="DIRECTOR REGIONAL" and
Cargo!="FINANCIERA"  and
Cargo!="GERENTE ADMINISTRATIVA" and 
Cargo!="GERENTE GENERAL" and
Cargo!="HISTOSER" and
Cargo!="Ingeniero de sistemas" and
Cargo!="JEFE COBRANZAS" and
Cargo!="JEFE MANTENIMIENTO LOCATIVO"  and
Cargo!="MANTENIMIENTO ELECTRONICO" and
Cargo!="NINGUNO"  and
Cargo!="POSTVENTA" and
Cargo!="PRESIDENTE SERVIASJUDINET" and 
Cargo!="RECEPCION" and
Cargo!= "SECRETARIA TESORERIA" and 
 

Cargo!="ASISTENTE DIRECTOR DE SERVICIOS" and 
Cargo!="BANCOS" 
and Cargo!="CARTERA NOMINAS" and 
Cargo!="CONSULTORIO JURIDICO" and 
Cargo!="DIRECTORA ACTUACIONES JURIDICAS" and 
Cargo!= "Gerente Control de Calidad" and 

codigo!="472" and 
codigo!="547"  and 
codigo!="570"  and 
codigo!="499"  and 
codigo!="564")  order by Nombre_Completo');

			     
			if (!$Recordset1)
			{
				die('Invalid query: ' . mysql_error());
			}
			 
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);


?>
<!DOCTYPE HTML>
<html>
<head>
<title>Envio Contratos Por Funcionario</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;}
    
    .titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
    table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
    .divirmenu{text-align: center;}
    .irmenu{width: 200px;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{padding: 1px; border: 1px solid #a0a0a0;}
    .td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
    .boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text], select{border-radius: 5px; padding: 3px;background-color: #FFFFF4;}
	
	.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: 12px;}
    .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;}
.Estilo2 {font-family: Arial;	font-size: 14px;	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 onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<form name="formulario" action="" method="post">

  <tr>
    <td>
   

<form name="formulario" action="" method="post">
<table width="480" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td><fieldset><table width="541" border="6" align="center" cellpadding="2" cellspacing="2" >
  <tr>
    <td colspan="2"class="titulo"><span class="Estilo2">CONSULTA ENVIO CONTRATOS  POR FUNCIONARIO</span></td>
  </tr>
  <tr bgcolor="#ECE9D8">
    <td height="22" colspan="2" bgcolor="#FFFFFF" class="fecha"><div align="center">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
    </div></td>
  </tr>
  
  
  <td class="td">FUNCIONARIO 
  <td class="tdizq"><SELECT NAME="funcionario">
            <OPTION value="">--Nombre Funcionario--</OPTION>
            <?php
do {  
?>
            <option value="<?php echo $row_Recordset1['codigo']?>"><?php echo $row_Recordset1['Nombre_Completo']?></option>
            <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
  $rows = mysql_num_rows($Recordset1);
  if($rows > 0) {
      mysql_data_seek($Recordset1, 0);
	  $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  }
?>
          </SELECT>
        </td>

  
 <tr bgcolor="#ECE9D8">
    <td colspan="2" height="22">
    
    <input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='menu_consultorio_creditos_soldados.php'" value="IR AL MENU">
    <input name="consultar" id="consultar" type="submit" class="boton1" value="Consultar">
    </td>
  </tr>

</table>
</fieldset></td>
  </tr>
</table>
</form>
</body>
</html>

<?php
require_once("../Conectarse.php");

if(isset($_POST["consultar"]))
{

$control3 = mysql_query("SELECT Nombre_Completo FROM Usuarios WHERE codigo  = '".$_POST[funcionario]."' ");
							  
							   if (!$control3) {     
				die('Invalid query 0: ' . mysql_error());
			}					  
			
			list($nomfunciona) = mysql_fetch_row($control3);

   
	
$control= mysql_query("SELECT apellidos,nombres,cedula,celular,email,unidad,grado FROM consultorio_creditos_soldados WHERE estado = '5' ");	
 
		 if (!$control) {     
				die('Invalid query 0: ' . mysql_error());
			}					          
					  if ((mysql_num_rows($control)!=0)) 
	                    {	 
   echo "<TABLE width='700' border='3' align='center' cellpadding ='0' cellspacing='1' bgcolor='black'>
                              <TR>
					  <TD class='tdtitulo'>CEDULA</TD>                      
					  <TD class='tdtitulo'>APELLIDOS</TD>
					  <TD class='tdtitulo'>NOMBRES</TD>
					  <TD class='tdtitulo'>CELULAR</TD> 
				      <TD class='tdtitulo'>CORREO</TD>
					  <TD class='tdtitulo'>GRADO</TD> 
				      <TD class='tdtitulo'>UNIDAD</TD>";		 		  
while(list($apellidos,$nombres,$cedula,$celular,$email,$unidad,$grado) = mysql_fetch_row($control)) 
                              {     

$godr = mysql_query('SELECT MAX(fecha) FROM actuaciones_consultorio_creditos_soldados WHERE cedula = "'.$cedula.'"');
			if (!$godr) {
				die('Error de godr: ' . mysql_error());
			}
			
     list($maxfecha) = mysql_fetch_row($godr);

							
$control2 = mysql_query("SELECT fecha,funcionario FROM actuaciones_consultorio_creditos_soldados WHERE cedula = '".$cedula."' and codigo_funcionario  = '".$_POST[funcionario]."' and fecha = '".$maxfecha."' ");
							  
							  
							  
							  
							   if (!$control2) {     
				die('Invalid query 0: ' . mysql_error());
			}					  
			
			list($fecha) = mysql_fetch_row($control2);
			        
					  if ((mysql_num_rows($control2)!=0)) 
							  
							 { 
     
$tota = $tota + 1;    
		
				printf("<tr>
		        <td class='tdfull'><input type='button' value=$cedula name='proceso' class=botonnew onClick =	window.open('formulario_consultorio_juridico2_creditos_soldados2.php?cedula=$cedula&celular=$celular','','top=30,left=50,toolbar=yes,scrollbars=yes,width=1000,height=900,status=yes')></td>
  				<td class='tdfull'>".$apellidos."</td>
				<td class='tdfull'>".$nombres."</td>		
				<td class='tdfull'>".$celular."</td>
				<td class='tdfull'>".$email."</td>
				<td class='tdfull'>".$grado."</td>
				<td class='tdfull'>".$unidad."</td>");
							  		}
							  }
			mysql_free_result($control);				  
						}
						
					
						
						echo "<TABLE width='200' border='0' align='center' cellpadding ='0' cellspacing='1'>
                          <TR>
                          <TD class='tdtitulo'>TOTAL</TD>";		 		  

					 printf("<tr>   
								   
					 <td class='tdfull'>".$tota."</td>");	

echo "</form>"; }
?>