File: /home/asjudine/www/consulta_evaluacion_abogados_admin.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.php");
$sql2 = mysql_query('SELECT * FROM Usuarios WHERE Cargo like "%ABOGADO" order by Nombre_Completo ');
if (!$sql2) {
die('Invalid query 12: ' . mysql_error());
}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta puntos por Director</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: 10px; 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: 12px; color: #003333;}
.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();
}
.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;}
table{border: 3px solid #AFAFAF;margin-bottom:3px;}
.enunciado{background-color:#CCFFCC; width:250px; text-align:right;}
.ausentismo{background-color:#FAA5A7; width:250px; text-align:right;}
.num{background-color:#FFFFCE; width:50px}
-->
</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">
<table width="463" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="523"><fieldset><table width="461" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td colspan="5" class="titulos"><div align="center">CONSULTA PUNTOS MENSUAL ABOGADOS</div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="22" colspan="5" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="2" bgcolor="#CCFFCC"><div align="center"><span class="Estilo51">ABOGADO : </span></div></td>
<td width="241" colspan="3" bgcolor="#CCFFCC"><label>
<select name="abogado">
<option value = "">SELECCIONE ABOGADO</option>
<?php
do {
?>
<option value="<?php echo $row_sql2['Nombre_Completo'];?>"><?php echo $row_sql2['Nombre_Completo']?></option>
<?php
} while ($row_sql2 = mysql_fetch_assoc($sql2));
$rows2 = mysql_num_rows($sql2);
if($rows2 > 0) {
mysql_data_seek($sql2, 0);
$row_sql2 = mysql_fetch_assoc($sql2);
}
?>
</select>
</label></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="2" bgcolor="#CCFFCC"><div align="center"><span class="Estilo51">Seleccione el Mes:</span></div></td>
<td width="241" colspan="3" bgcolor="#CCFFCC">
<select name="mess" required>
<option value="0" required>--SELECCIONE EL MES--</option>
<option value="1">ENERO</option>
<option value="2">FEBRERO</option>
<option value="3">MARZO</option>
<option value="4">ABRIL</option>
<option value="5">MAYO</option>
<option value="6">JUNIO</option>
<option value="7">JULIO</option>
<option value="8">AGOSTO</option>
<option value="9">SEPTIEMBRE</option>
<option value="10">OCTUBRE</option>
<option value="11">NOVIEMBRE</option>
<option value="12">DICIEMBRE</option>
</select>
</td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="5" bgcolor="#CCFFCC"><div align="center" class="Estilo51">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_evaluacion_profesional.php'" value="IR AL MENU">
<input name="consultar" type="submit" class="Estilo51" id="consultar" value="CONSULTAR" />
</div></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
<BR>
<BR>
</form>
</body>
</html>
<?php
if(isset($_POST["consultar"]))
{
$controdatos = mysql_query('SELECT cedula, nombre_completo FROM Usuarios WHERE nombre_completo = "'.$_POST["abogado"].'" ');
if (!$controdatos) {die('Invalid query datos principales: ' . mysql_error());}
list($cedula, $nombre) = mysql_fetch_row($controdatos);
//GENERENCIA GENERAL
$contro1 = mysql_query('SELECT cedula, nombre_completo, calif_1,calif_2,calif_3,calif_4,calif_5, calif_6, calif_7, calif_8, calif_9, mes, acumulado_mensual FROM eval_abog_gerencia_gen WHERE nombre_completo = "'.$_POST["abogado"] . '" and mes = "'.$_POST["mess"].'" ');
if (!$contro1) {die('Invalid query 1: ' . mysql_error());}
list($cedula_gg, $nombre_gg, $cal1_gg,$cal2_gg,$cal3_gg,$cal4_gg,$cal5_gg,$cal6_gg,$cal7_gg,$cal8_gg,$cal9_gg,$mes_gg,$acmes_geren_general) = mysql_fetch_row($contro1);
//GERENCIA ADMINISTRATIVA
$contro3 = mysql_query('SELECT cedula, nombre_completo, calif_1, mes, acumulado_mensual FROM eval_abog_gerencia_adm WHERE nombre_completo = "' . $_POST["abogado"] . '" and mes = "'.$_POST["mess"].'"');
if (!$contro3) {die('Invalid query 3: ' . mysql_error());}
list($cedula_ga, $nombre_ga,$cal1_ga,$mes_ga,$acmes_geren_admin) = mysql_fetch_row($contro3);
//ASISTENTE DE GERENICA ADMINISTRATIVA
$contro4 = mysql_query('SELECT cedula, nombre_completo, calif_1,calif_2,calif_3,calif_4,mes,acumulado_mensual FROM eval_abog_asist_gerencia_adm WHERE nombre_completo = "'.$_POST["abogado"] . '" and mes = "'.$_POST["mess"].'" ');
if (!$contro4) {die('Invalid query 4: ' . mysql_error());}
list($cedula_aga, $nombre_aga,$cal1_aga,$cal2_aga,$cal3_aga,$cal4_aga,$mes_aga,$acmes_asist_geren_admin) = mysql_fetch_row($contro4);
//ACTUACIONES JURIDICAS
$contro5 = mysql_query('SELECT cedula, nombre_completo, calif_1,calif_2,calif_3, calif_4, calif_5, mes,acumulado_mensual FROM eval_abog_juridicas WHERE nombre_completo = "'.$_POST["abogado"].'" and mes = "'.$_POST["mess"].'"');
if (!$contro5) {die('Invalid query 5: ' . mysql_error());}
list($cedula_aj, $nombre_aj,$cal1_aj,$cal2_aj,$cal3_aj,$cal4_aj,$cal5_aj,$mes_aj,$acmes_juridicas) = mysql_fetch_row($contro5);
//MONITOREO CAMARAS
$contro6 = mysql_query('SELECT cedula, nombre_completo, calif_1, calif_2, calif_3, mes,acumulado_mensual FROM eval_abog_moni_camaras WHERE nombre_completo = "'.$_POST["abogado"].'" and mes = "'.$_POST["mess"].'" ');
if (!$contro6) {die('Invalid query 6: ' . mysql_error());}
list($cedula_mc, $nombre_mc,$cal1_mc,$cal2_mc,$cal3_mc,$mes_mc,$acmes_camaras) = mysql_fetch_row($contro6);
//HISTOSER
$contro9 = mysql_query('SELECT cedula, nombre_completo, calif_1,calif_2,calif_3,calif_4,mes,acumulado_mensual FROM eval_abog_histoser WHERE nombre_completo = "'.$_POST["abogado"].'" and mes = "'.$_POST["mess"].'" ');
if (!$contro9) {die('Invalid query 9: ' . mysql_error());}
list($cedula_hi, $nombre_hi,$cal1_hi,$cal2_hi,$cal3_hi,$cal4_hi,$mes_hi,$acmes_histoser) = mysql_fetch_row($contro9);
$total = $acmes_geren_general + $acmes_geren_admin + $acmes_asist_geren_admin + $acmes_juridicas + $acmes_camaras + $acmes_histoser;
}
?>
<table width="677" align="center" border="0" cellpadding="3" cellspacing="3">
<tr bgcolor="#FFFFCC">
<td colspan="4" class="titulos"><div align="center">PUNTOS OBTENIDOS </div></td>
</tr>
<tr bgcolor="#CCFFCC">
<td width="257" align="right"><div align="right"><span class="Estilo29">Cédula, apellidos y nombres</span></div></td>
<td><input name="identi" type="text" id="identi" value="<?php echo $cedula; ?>" size="12" maxlength="12" readonly=""></td>
<td colspan="2"><input name="nombre_completo" type="text" id="nombre_completo3" value="<?php echo $nombre; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Gerencia General:</span></div></td>
<td width="72" bgcolor="#CCFFCC" ><input name="geren_gener" type="text" id="geren_gener" value="<?php echo $acmes_geren_general; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Director histoser:</span></span></div></td>
<td width="28" bgcolor="#CCFFCC">
<span class="Estilo29">
<input name="histo" type="text" id="histo" value="<?php echo $acmes_histoser; ?>" size="3" maxlength="3" readonly="">
</span></span></td>
</tr>
<tr bgcolor="#CCFFCC">
<td height="46" align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Gerencia Administrativa:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="geren_admin" type="text" id="geren_admin" value="<?php echo $acmes_geren_admin; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Asistente Gerencia Administrativa:</span></div></td>
<td bgcolor="#CCFFCC"><input name="asist_geren_admin" type="text" id="asist_geren_admin" value="<?php echo $acmes_asist_geren_admin; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Actuaciones Juridicas:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="actua_jurid" type="text" id="actua_jurid" value="<?php echo $acmes_juridicas; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Monitoreo De Camaras:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="monit_camara" type="text" id="monit_camara" value="<?php echo $acmes_camaras; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="#FFFFCC">
<td class="titulos"><div align="center">TOTAL PUNTOS </div></td>
</tr>
<tr bgcolor="#CCFFFF" align="center">
<td bgcolor="#CCFFFF"><input name="codg" type="text" id="un2" value="<?php echo $total; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
</table>
<BR>
<table width="677" align="center" border="0" cellpadding="3" cellspacing="3">
<tr bgcolor="#FFFFCC">
<td colspan="8" class="titulos"><div align="center">PUNTOS DE CADA AREA </div></td>
</tr>
<table>
<tr><td class="titulos" colspan="20">GERENCIA GENERAL</td></tr>
<tr>
<td class="enunciado">Por Revocatoria De Poder</td>
<td class="num"><input name="gg1" type="text" id="gg1" value="<?php echo $cal1_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por Terminacion Procesos</td>
<td class="num"><input name="gg2" type="text" id="gg2" value="<?php echo $cal2_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por redaccion en terminacion procesos</td>
<td class="num"><input name="gg3" type="text" id="gg3" value="<?php echo $cal3_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por falta de soportes Terminacion Procesos</td>
<td class="num"><input name="gg4" type="text" id="gg4" value="<?php echo $cal4_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por informe de diagnostico</td>
<td class="num"><input name="gg5" type="text" id="gg5" value="<?php echo $cal5_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por ingreso oportuno de audiencias</td>
<td class="num"><input name="gg6" type="text" id="gg6" value="<?php echo $cal6_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Terminacion Procesos Por Renuncia</td>
<td class="num"><input name="gg7" type="text" id="gg7" value="<?php echo $cal7_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por Quejas Afiliados</td>
<td class="num"><input name="gg8" type="text" id="gg8" value="<?php echo $cal8_gg; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por notas de agradecimiento</td>
<td class="num"><input name="gg8" type="text" id="gg8" value="<?php echo $cal9_gg; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td bgcolor="#EDF27F" colspan="20" align="center">TOTAL<input name="rgg" type="text" id="rgg" value="<?php echo $acmes_geren_general; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="titulos" colspan="2">GERENCIA ADMINISTRATIVA</td>
<td width="100px"></td>
<td class="titulos" colspan="6">MONITOREO CAMARAS</td>
</tr>
<tr>
<td class="enunciado">Requerimientos Injustificados</td>
<td class="num"><input name="ga1" type="text" id="ga1" value="<?php echo $cal1_ga; ?>" size="3" maxlength="3" readonly=""></td>
<td width="100px"></td>
<td class="enunciado">Por Puntualidad ingreso jornada</td>
<td class="num"><input name="mc1" type="text" id="mc1" value="<?php echo $cal1_mc; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por el desempeño dentro de la oficina</td>
<td class="num"><input name="mc2" type="text" id="mc2" value="<?php echo $cal2_mc; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por la excelente presentacion personal</td>
<td class="num"><input name="mc3" type="text" id="mc3" value="<?php echo $cal3_mc; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td bgcolor="#EDF27F" colspan="2" align="center">TOTAL<input name="rga" type="text" id="rga" value="<?php echo $acmes_geren_admin; ?>" size="3" maxlength="3" readonly=""></td>
<td width="100px"></td>
<td bgcolor="#EDF27F" colspan="6" align="center">TOTAL<input name="rmc" type="text" id="rmc" value="<?php echo $acmes_camaras; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>
<!--
<table>
<tr><td class="titulos" colspan="4">MONITOREO CAMARAS</td></tr>
<tr>
<td class="enunciado">Puntualidad en el ingreso a la jornada presencial</td>
<td class="num"><input name="mc1" type="text" id="mc1" value="<?php echo $cal1_mc; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td bgcolor="#EDF27F" colspan="10" align="center">TOTAL<input name="rmc" type="text" id="rmc" value="<?php echo $acmes_camaras; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>
-->
<br>
<table>
<tr><td class="titulos" colspan="5">ASISTENTE DE GERENCIA ADMINISTRATIVA</td></tr>
<tr>
<td class="enunciado">Por Cumplimiento Jornada Presencial</td>
<td class="num"><input name="aga1" type="text" id="aga1" value="<?php echo $cal1_aga; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por Cumplimiento Soporte viáticos</td>
<td class="num"><input name="aga2" type="text" id="aga2" value="<?php echo $cal2_aga; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por reembolso viaticos</td>
<td class="num"><input name="aga3" type="text" id="aga3" value="<?php echo $cal3_aga; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por la prontitud en requerimientos</td>
<td class="num"><input name="aga4" type="text" id="aga4" value="<?php echo $cal4_aga; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td bgcolor="#EDF27F" colspan="10" align="center">TOTAL<input name="raga" type="text" id="raga" value="<?php echo $acmes_asist_geren_admin; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>
<table>
<tr><td class="titulos" colspan="2">ACTUACIONES JURIDICAS</td></tr>
<tr>
<td class="enunciado">Por Ingreso oportuno de revistas</td>
<td class="num"><input name="aj1" type="text" id="aj1" value="<?php echo $cal1_aj; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por Calidad redaccion revistas</td>
<td class="num"><input name="aj2" type="text" id="aj2" value="<?php echo $cal2_aj; ?>" size="3" maxlength="3" readonly=""></td>
<!--<td class="enunciado">Por la oportuna informacion del radicado procesos</td>
<td class="num"><input name="aj3" type="text" id="aj3" value="<?php echo $cal3_aj; ?>" size="3" maxlength="3" readonly=""></td>-->
<td class="enunciado">Por la coherencia juridica en el record de actuaciones</td>
<td class="num"><input name="aj3" type="text" id="aj3" value="<?php echo $cal3_aj; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por la debida actualizacion de datos del proceso</td>
<td class="num"><input name="aj4" type="text" id="aj4" value="<?php echo $cal4_aj; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por el cumplimiento de la directiva 005</td>
<td class="num"><input name="aj5" type="text" id="aj5" value="<?php echo $cal5_aj; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td bgcolor="#EDF27F" colspan="12" align="center">TOTAL<input name="rga" type="text" id="rga" value="<?php echo $acmes_juridicas; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>
<table>
<tr><td class="titulos" colspan="4">DIRECTORA HISTOSER</td></tr>
<tr>
<td class="enunciado">Por diligenciamiento atencion al afiliado</td>
<td class="num"><input name="h1" type="text" id="h1" value="<?php echo $cal1_hi; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por Atenciones rechazadas</td>
<td class="num"><input name="h2" type="text" id="h2" value="<?php echo $cal2_hi; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por requerimiento informe de diagnostico</td>
<td class="num"><input name="h3" type="text" id="h3" value="<?php echo $cal3_hi; ?>" size="3" maxlength="3" readonly=""></td>
<td class="enunciado">Por prontitud en el inicio de procesos</td>
<td class="num"><input name="h4" type="text" id="h4" value="<?php echo $cal4_hi; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td bgcolor="#EDF27F" colspan="10" align="center">TOTAL<input name="rh" type="text" id="rh" value="<?php echo $acmes_histoser;?>" size="3" maxlength="3" readonly=""></td>
</tr>
</table>