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/requerimiento_liquidacion_abogados_pago.php
<?php

require_once("mainfile.php");
include ("config.php");
require_once("Conectarse.php");

$Recordset1 = mysql_query('SELECT * FROM Usuarios WHERE Cargo like "%ABOGADO%"  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>Liquidacion Abogados</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">
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<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" bgcolor="#FFFFFF">
  <tr bgcolor="#FFFFCC">
    <td colspan="2" bgcolor="#2E7068" class="titulos" style="color:#FFFFFF"><div align="center">GENERAR LIQUIDACION ABOGADOS - CONSULTA</div></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  bgcolor="#ECE9D8" class="funcionario"><div align="center">CONSULTE FUNCIONARIO 
<td bgcolor="#ECE9D8"><SELECT NAME="funcionario">
            <OPTION value="">--Nombre Funcionario--</OPTION>
            <?php
do {  
?>
            <option value="<?php echo $row_Recordset1['Nombre_Completo']?>"><?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" class="fecha"><div align="center">
    <input name="consultar" id="consultar" type="submit" class="Estilo51" value="Consultar">
    <input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_informe_evaluacion.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;



$control3 = mysql_query("SELECT Nombre_Completo FROM Usuarios WHERE Nombre_Completo  = '".$_POST[funcionario]."' ");


							  
	if (!$control3) {     
		die('Invalid query 0: ' . mysql_error());
	}					  
	list($nomfunciona) = mysql_fetch_row($control3);

   echo "<center><h3>Pendientes Por Calificar</h3></center>";
	
	/*$control= mysql_query("SELECT id,cedula,nombre_completo,mes,acumulado_mensual,acumulado_total_mes,acumulado_anual,estado FROM eval_abog_gerencia_adm WHERE nombre_completo = '".$nomfunciona."' order by id ");	*/
	$control= mysql_query("SELECT id,cedula,nombre_completo,mes,acumulado_mensual,acumulado_total_mes,acumulado_anual,estado FROM eval_abog_asist_gerencia_adm WHERE estado = 0 order by id ");
 
	if (!$control) {     
		die('Invalid query 0: ' . mysql_error());
	}					          
	
	
	if ((mysql_num_rows($control)!=0)) 
	{	 
		
		//<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>ACUMULADO MENSUAL</span></div></TD>
    	echo "<TABLE width='700' border='3' align='center' cellpadding ='0' cellspacing='1' bgcolor='black'>
        <TR>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>CEDULA</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>NOMBRES</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>MES</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>ACUMULADO TOTAL MES</span></div></TD> 
		
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>CALIFICACION</span></div></TD> ";
		
		
		while(list($id,$cedula,$nombre,$mes,$acumuladomes,$acumuladototalmes,$acumuladoanual,$estado) = mysql_fetch_row($control)) 
      	{
			if ($mes=='1'){$mess='ENERO';}
  			if ($mes=='2'){$mess='FEBRERO';}
  			if ($mes=='3'){$mess='MARZO';}
  			if ($mes=='4'){$mess='ABRIL';}
  			if ($mes=='5'){$mess='MAYO';}
  			if ($mes=='6'){$mess='JUNIO';}
  			if ($mes=='7'){$mess='JULIO';}
  			if ($mes=='8'){$mess='AGOSTO';}
  			if ($mes=='9'){$mess='SEPTIEMBRE';}
  			if ($mes=='10'){$mess='OCTUBRE';}
  			if ($mes=='11'){$mess='NOVIEMBRE';}
  			if ($mes=='12'){$mess='DICIEMBRE';}
 
 
 			if ($estado=='0'){$estadoesta='PENDIENTE';}
	 		else {$estadoesta='CALIFICADO';}
 
 
 
 
 			
			$maximomes = mysql_query('SELECT MAX(mes) FROM eval_abog_asist_gerencia_adm WHERE cedula = "'.$cedula.'" ');
			if (!$maximomes) {
				die('Error de maximomes: ' . mysql_error());
			}
			list($elultimomes) = mysql_fetch_row($maximomes);
			
			
			$puntosasistentegerenciaadministrativa = mysql_query('SELECT acumulado_mensual FROM eval_abog_asist_gerencia_adm WHERE cedula = "'.$cedula.'" and  mes = "'.$elultimomes.'" ');
			list($pointsasistentegerenciaadministrativa)=mysql_fetch_row($puntosasistentegerenciaadministrativa);
			
			$puntosgerenciaadministrativa = mysql_query('SELECT acumulado_mensual FROM eval_abog_gerencia_adm WHERE cedula = "'.$cedula.'" and  mes = "'.$elultimomes.'" ');
			list($pointsgerenciaadministrativa)=mysql_fetch_row($puntosgerenciaadministrativa);
			
			$puntosgerenciageneral = mysql_query('SELECT acumulado_mensual FROM eval_abog_gerencia_gen WHERE cedula = "'.$cedula.'" and  mes = "'.$elultimomes.'" ');
			list($pointsgerenciageneral)=mysql_fetch_row($puntosgerenciageneral);
			
			$puntoshistoser = mysql_query('SELECT acumulado_mensual FROM eval_abog_histoser WHERE cedula = "'.$cedula.'" and  mes = "'.$elultimomes.'" ');
			list($pointshistoser)=mysql_fetch_row($puntoshistoser);
			
			$puntosjuridicas = mysql_query('SELECT acumulado_mensual FROM eval_abog_juridicas WHERE cedula = "'.$cedula.'" and  mes = "'.$elultimomes.'" ');
			list($pointsjuridicas)=mysql_fetch_row($puntosjuridicas);
			
			$puntosmonitoreocamaras = mysql_query('SELECT acumulado_mensual FROM eval_abog_moni_camaras WHERE cedula = "'.$cedula.'" and  mes = "'.$elultimomes.'" ');
			list($pointsmonitoreo)=mysql_fetch_row($puntosmonitoreocamaras);
			
			$pointstotales = $pointsasistentegerenciaadministrativa + $pointsgerenciaadministrativa + $pointsgerenciageneral + $pointshistoser + $pointsjuridicas + $pointsmonitoreo;
			
			
      
 			$tota = $tota + 1;    
			//<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$acumuladomes."</a></span></div></td>
			
			printf("<tr>
  			<td bgcolor='#ECE9D8'><div align='center' class='Estilo21'><input type='button' value=$cedula name='proceso' class=Estilo21 onClick =	window.open('liquidacion_abogados_todos.php?cedula=$cedula&id=$id&mes=$mes&e=$estadoesta','','top=30,left=50,toolbar=yes,scrollbars=yes,width=800,height=800,status=yes')></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'>".$mess."</a></span></div></td>
				
			<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$pointstotales."</a></span></div></td>
			
			<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$estadoesta."</a></span></div></td>");
		}
	}











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

   
	
	$control= mysql_query("SELECT id,cedula,nombre_completo,mes,acumulado_mensual,acumulado_total_mes,acumulado_anual,estado FROM eval_abog_gerencia_adm WHERE nombre_completo = '".$nomfunciona."' order by id ");	
 
	if (!$control) {     
		die('Invalid query 0: ' . mysql_error());
	}					          
	
	
	if ((mysql_num_rows($control)!=0)) 
	{	 
		//<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>ACUMULADO MENSUAL</span></div></TD>
    	echo "<TABLE width='700' border='3' align='center' cellpadding ='0' cellspacing='1' bgcolor='black'>
        <TR>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>CEDULA</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>NOMBRES</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>MES</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>ACUMULADO TOTAL MES</span></div></TD> 
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>ACUMULADO ANUAL</span></div></TD>
		<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>CALIFICACION</span></div></TD> ";
		
		
		while(list($id,$cedula,$nombre,$mes,$acumuladomes,$acumuladototalmes,$acumuladoanual,$estado) = mysql_fetch_row($control)) 
      	{
			if ($mes=='1'){$mess='ENERO';}
  			if ($mes=='2'){$mess='FEBRERO';}
  			if ($mes=='3'){$mess='MARZO';}
  			if ($mes=='4'){$mess='ABRIL';}
  			if ($mes=='5'){$mess='MAYO';}
  			if ($mes=='6'){$mess='JUNIO';}
  			if ($mes=='7'){$mess='JULIO';}
  			if ($mes=='8'){$mess='AGOSTO';}
  			if ($mes=='9'){$mess='SEPTIEMBRE';}
  			if ($mes=='10'){$mess='OCTUBRE';}
  			if ($mes=='11'){$mess='NOVIEMBRE';}
  			if ($mes=='12'){$mess='DICIEMBRE';}
 
 
 			if ($estado=='0'){$estadoesta='PENDIENTE';}
	 		else {$estadoesta='CALIFICADO';}
 
 
      
 			$tota = $tota + 1;    
			//<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$acumuladomes."</a></span></div></td>
			
			//<td bgcolor='#ECE9D8'><div align='center' class='Estilo21'><input type='button' value=$cedula name='proceso' class=Estilo21 onClick =	window.open('liquidacion_abogados_todos.php?cedula=$cedula&id=$id&mes=$mes&e=$estadoesta','','top=30,left=50,toolbar=yes,scrollbars=yes,width=800,height=800,status=yes')></a></span></div></td>
			printf("<tr>
  			
  			<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$cedula."</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'>".$mess."</a></span></div></td>
				
			<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$acumuladototalmes."</a></span></div></td>
			<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$acumuladoanual."</a></span></div></td>
			<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$estadoesta."</a></span></div></td>");
		}
	}
							  
}

						
						
echo "<TABLE width='200' border='0' align='center' cellpadding ='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='fecha'>TOTAL</span></div></TD>";		 		  
                              
printf("<tr>   
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$tota."</a></span></div></td>");	

echo "</form>";

  
?>