File: /home/asjudine/www/consulta_evaluacion_funci_admin.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.php");
$sql = mysql_query('SELECT * FROM vendedores WHERE tipo= "AE" and estado = "1" order by vendedor ');
if (!$sql) {
die('Invalid query 12: ' . mysql_error());
}
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);
$sql2 = mysql_query('SELECT * FROM Usuarios WHERE (Cargo = "DISER BARRANQUILLA" || Cargo = "DISER BOGOTA" || Cargo = "DISER BUCARAMANGA" || Cargo = "DISER CALI" || Cargo = "DISER CARTAGENA" || Cargo = "DISER FLORENCIA" || Cargo = "DISER IBAGUE" || Cargo = "DISER MEDELLIN" || Cargo = "DISER MELGAR" || Cargo = "DISER MOCOA" || Cargo = "DISER MONTERIA" || Cargo = "DISER NEIVA" || Cargo = "DISER PEREIRA" || Cargo = "DISER VALLEDUPAR" || Cargo = "DISER VILLAVICENCIO" || Cargo = "DISER CUCUTA" || Cargo = "DISER SAN ANDRES" || Cargo = "DISER TUNJA" || Cargo = "DISER PASTO" ) 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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Consulta puntos por Funcionario</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;}
-->
</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 </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">FUNCIONARIO : </span></div></td>
<td colspan="3" bgcolor="#CCFFCC"><label>
<select name="abogado">
<option value = "">SELECCIONE FUNCIONARIO</option>
<?php
do {
?>
<option value="<?php echo $row_sql2['Cedula'];?>"><?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="5" bgcolor="#CCFFCC"><div align="center" class="Estilo51">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_informe_evaluacion_fun.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"]))
{
$contro1 = mysql_query('SELECT cedula, nombre, codigo_funcionario, puntos_atencion_al_afiliado,puntos_gestion_ventas_contrato, puntos_anos_servicio, puntos_cabal_cumplimiento_directivas, puntos_notas_agradecimiento_afiliados, puntos_terminacion_procesos, atenciones_rechazadas, requerimiento_injustificado_abogados, requerimiento_injustificado, reclamo_afiliado, total_anual, estado FROM evaluacion_profesional_fun WHERE cedula = "' . $_POST["abogado"] . '" ');
if (!$contro1) {
die('Invalid query 1233: ' . mysql_error());
}
list($cedula, $nombre, $codigo, $punate, $puntven, $punser, $puntcumpli, $puntagrade, $puntermina, $atenrecha, $requeinjus, $injusti, $reclamo, $anual, $estado) = mysql_fetch_row($contro1);
$total = $punate + $puntven + $punser + $puntcumpli + $puntagrade + $puntermina + $atenrecha + $requeinjus + $injusti + $reclamo;
$contro2 = mysql_query('SELECT cedula, nombre, codigo_funcionario, puntos_atencion_al_afiliado,puntos_gestion_ventas_contrato, puntos_anos_servicio, puntos_cabal_cumplimiento_directivas, puntos_notas_agradecimiento_afiliados, puntos_terminacion_procesos, atenciones_rechazadas, requerimiento_injustificado_abogados, requerimiento_injustificado, reclamo_afiliado, total_anual, estado FROM evaluacion_profesional_fun_anual WHERE cedula = "' . $_POST["abogado"] . '"');
if (!$contro2) {
die('Invalid query ddd: ' . mysql_error());
}
list($cedula1, $nombre1, $codigo1, $punate1, $puntven1, $punser1, $puntcumpli1, $puntagrade1, $puntermina1, $atenrecha1, $requeinjus1, $requeadminjus, $reclamo1, $anual1, $estado1) = mysql_fetch_row($contro2);
$total1 = $punate1 + $puntven1 + $punser1 + $puntcumpli1 + $puntagrade1 + $puntermina1 + $atenrecha1 + $requeinjus1 + $requeadminjus + $reclamo1 ;
}
?>
<table width="800" align="center" border="0" cellpadding="3" cellspacing="3">
<tr bgcolor="#FFFFCC">
<td colspan="4" class="titulos"><div align="center">PUNTOS OBTENIDOS MENSUAL </div></td>
</tr>
<tr>
<td>
<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 Atencion al afiliado:</span></div></td>
<td width="72" bgcolor="#CCFFCC" ><input name="numero_carpeta" type="text" id="numero_carpeta" value="<?php echo $punate; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC" ><div align="right"><span class="Estilo29">Puntos Gestion Venta de Contratos:</span></div></td>
<td width="28" bgcolor="#CCFFCC" >
<input name="puntven" type="text" id="puntven" value="<?php echo $puntven; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Aņos de Servicio:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="punser" type="text" id="punser" value="<?php echo $punser; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos por Cabal Cumplimiento Directivas:</span></div></td>
<td bgcolor="#CCFFCC"><input name="puntcumpli" type="text" id="puntcumpli" value="<?php echo $puntcumpli; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Notas de Agradecimiento Afiliados:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="puntagrade" type="text" id="puntagrade" value="<?php echo $puntagrade; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminacion de Procesos:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="puntermina" type="text" id="puntermina" value="<?php echo $puntermina; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#0099FF">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Atenciones Rechazadas:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="atenrecha" type="text" id="atenrecha" value="<?php echo $atenrecha; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Requerimientos Injustificados Administrativos:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="injusti" type="text" id="injusti" value="<?php echo $injusti; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Requerimientos Insjutificados por Abogados:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><span class="Estilo29">
<input name="requeinjus" type="text" id="requeinjus" value="<?php echo $requeinjus; ?>" size="3" maxlength="3" readonly="">
</span></span></td>
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Reclamo Afiliado Escrito:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="reclamo" type="text" id="reclamo" value="<?php echo $reclamo; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="#FFFFCC">
<td class="titulos"><div align="center">TOTAL PUNTOS MENSUAL</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="800" align="center" border="0" cellpadding="3" cellspacing="3">
<tr bgcolor="#FFFFCC">
<td colspan="4" class="titulos"><div align="center">PUNTOS OBTENIDOS ANUAL </div></td>
</tr>
<tr>
<td>
<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 Atencion al afiliado:</span></div></td>
<td width="72" bgcolor="#CCFFCC" ><input name="punate1" type="text" id="punate1" value="<?php echo $punate1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC" ><div align="right"><span class="Estilo29">Puntos Gestion Venta de Contratos:</span></div></td>
<td width="28" bgcolor="#CCFFCC" >
<input name="puntven1" type="text" id="puntven1" value="<?php echo $puntven1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Aņos de Servicio:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="punser1" type="text" id="punser1" value="<?php echo $punser1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos por Cabal Cumplimiento Directivas:</span></div></td>
<td bgcolor="#CCFFCC"><input name="puntcumpli1" type="text" id="puntcumpli1" value="<?php echo $puntcumpli1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Notas de Agradecimiento Afiliados:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="puntagrade1" type="text" id="puntagrade1" value="<?php echo $puntagrade1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminacion de Procesos:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="puntermina1" type="text" id="puntepuntermina1rmina" value="<?php echo $puntermina1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#0099FF">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Atenciones Rechazadas:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="atenrecha1" type="text" id="atenrecha1" value="<?php echo $atenrecha1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Requerimiento Injustificados Administrativos:</span></span></div></td>
<td width="28" bgcolor="#CCFFCC">
<span class="Estilo29">
<input name="requeadminjus" type="text" id="requeadminjus" value="<?php echo $requeadminjus; ?>" size="3" maxlength="3" readonly="">
</span></span></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Requerimientos Insjutificados por Abogados:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><span class="Estilo29">
<input name="requeinjus1" type="text" id="requeinjus1" value="<?php echo $requeinjus1; ?>" size="3" maxlength="3" readonly="">
</span></span></td>
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Reclamo Afiliado Escrito:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="reclamo1" type="text" id="reclamo1" value="<?php echo $reclamo1; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="#FFFFCC">
<td class="titulos"><div align="center">TOTAL PUNTOS ANUAL </div></td>
</tr>
<tr bgcolor="#CCFFFF" align="center">
<td bgcolor="#CCFFFF"><input name="codg" type="text" id="un2" value="<?php echo $anual1; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
</table>