File: /home/asjudine/public_html/consulta_evaluacion_abogado_contro.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 asjudinet_abogados WHERE vigentes = "1" 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 abogado</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">ABOGADO : </span></div></td>
<td colspan="3" bgcolor="#CCFFCC"><label>
<select name="abogado">
<option value = "">SELECCIONE ABOGADO</option>
<?php
do {
?>
<option value="<?php echo $row_sql2['codigo_abogado'];?>"><?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_control_calidad.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"]))
{
$contro2 = mysql_query('SELECT cedula, nombre, puntos_atencion_al_afiliado, puntos_terminacion_disciplinarios, puntos_terminacion_juridico, puntos_terminacion_sustanciacion, puntos_terminacion_prejuridico, puntos_notas_agradecimiento, puntos_anos_servicio, puntos_por_especializacion, puntos_ventas, casos_exito_destacado, atenciones_rechazadas, reclamos_afiliados, requerimeinto_injustificado FROM evaluacion_profesional WHERE codigo_abogado = "' . $_POST["abogado"] . '" ');
if (!$contro2) {
die('Invalid query: ' . mysql_error());
}
list($cedula, $nombre, $punate, $terdis, $terjur, $tersus, $terpre, $punagre, $punser, $punes, $punven, $casoexi, $atenrech, $reclafil, $requegen) = mysql_fetch_row($contro2);
$total = $punate + $terdis + $terjur + $tersus + $terpre + $punagre + $punser + $punes + $atenrech + $reclafil + $requegen + $punven + $casoexi ;
$contro2 = mysql_query('SELECT cedula, nombre, puntos_atencion_al_afiliado, puntos_terminacion_disciplinarios, puntos_terminacion_juridico, puntos_terminacion_sustanciacion, puntos_terminacion_prejuridico, puntos_notas_agradecimiento, puntos_anos_servicio, puntos_por_especializacion, puntos_ventas, casos_exito_destacado, atenciones_rechazadas, reclamos_afiliados, requerimeinto_injustificado, total_anual FROM evaluacion_profesional_anual WHERE codigo_abogado = "' . $_POST["abogado"] . '" ');
if (!$contro2) {
die('Invalid query: ' . mysql_error());
}
list($cedula1, $nombre1, $punate1, $terdis1, $terjur1, $tersus1, $terpre1, $punagre1, $punser1, $punes1, $punven1, $casoexi1, $atenrech1, $reclafil1, $requegen1, $anual1) = mysql_fetch_row($contro2);
$total1 = $punate1 + $terdis1 + $terjur1 + $tersus1 + $terpre1 + $punagre1 + $punser1 + $punes1 + $atenrech1 + $reclafil1 + $requegen11 + $punven1 + $casoexi1 ;
}
?>
<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 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 width="281" bgcolor="#CCFFCC" ><div align="right"><span class="Estilo29">Puntos Terminacion Juridico:</span></div></td>
<td width="28" bgcolor="#CCFFCC" >
<input name="numero_carpeta" type="text" id="numero_carpeta" value="<?php echo $terjur; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td height="46" align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminacion Sustanciacion:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="capital_renovacion" type="text" id="capital_renovacion" value="<?php echo $tersus; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminacion Prejuridico:</span></div></td>
<td bgcolor="#CCFFCC"><input name="capital_renovacion" type="text" id="capital_renovacion" value="<?php echo $terpre; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Notas Agradecimiento:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="interes_cobroejecutivo" type="text" id="interes_cobroejecutivo" value="<?php echo $punagre; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Años Servicio:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="interes_cobroejecutivo" type="text" id="interes_cobroejecutivo" value="<?php echo $punser; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#0099FF">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Por Especializacion:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="deuda_total" type="text" id="deuda_total3" value="<?php echo $punes; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminación Disciplinarios:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="terdis" type="text" id="terdis" value="<?php echo $terdis; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Reclamos Afiliados:</span></span></div></td>
<td width="28" bgcolor="#CCFFCC">
<span class="Estilo29">
<input name="fecha_oficio" type="text" id="fecha_oficio" value="<?php echo $reclafil; ?>" size="3" maxlength="3" readonly="">
</span></span></td>
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Requerimeinto Injustificados:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="codg" type="text" id="un2" value="<?php echo $requegen; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos por Ventas:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="punven" type="text" id="un2" value="<?php echo $punven; ?>" size="3" maxlength="3" readonly="">
</td>
<td align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Casos de exito destacados:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="codg" type="text" id="un2" value="<?php echo $casoexi; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
<tr>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Atenciones Rechazadas:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="deuda_total" type="text" id="deuda_total3" value="<?php echo $atenrech; ?>" 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="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="numero_carpeta" type="text" id="numero_carpeta" value="<?php echo $punate1; ?>" size="3" maxlength="3" readonly=""></td>
<td width="281" bgcolor="#CCFFCC" ><div align="right"><span class="Estilo29">Puntos Terminacion Juridico:</span></div></td>
<td width="28" bgcolor="#CCFFCC" >
<input name="numero_carpeta" type="text" id="numero_carpeta" value="<?php echo $terjur1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td height="46" align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminacion Sustanciacion:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="capital_renovacion" type="text" id="capital_renovacion" value="<?php echo $tersus1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Terminacion Prejuridico:</span></div></td>
<td bgcolor="#CCFFCC"><input name="capital_renovacion" type="text" id="capital_renovacion" value="<?php echo $terpre1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Notas Agradecimiento:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="interes_cobroejecutivo" type="text" id="interes_cobroejecutivo" value="<?php echo $punagre1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Años Servicio:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="interes_cobroejecutivo" type="text" id="interes_cobroejecutivo" value="<?php echo $punser1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#0099FF">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Por Especializacion:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="deuda_total" type="text" id="deuda_total3" value="<?php echo $punes1; ?>" size="3" maxlength="3" readonly=""></td>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos Termianción Disciplinarios:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="terdis1" type="text" id="terdis1" value="<?php echo $terdis1; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#CCFFCC">
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Reclamos Afiliados:</span></span></div></td>
<td width="28" bgcolor="#CCFFCC">
<span class="Estilo29">
<input name="fecha_oficio" type="text" id="fecha_oficio" value="<?php echo $reclafil1; ?>" size="3" maxlength="3" readonly="">
</span></span></td>
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Requerimeinto Gerencia General:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="codg" type="text" id="un2" value="<?php echo $requegen1; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
<tr bgcolor="#CCFFCC">
<td align="right" nowrap bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Puntos por Ventas:</span></div></td>
<td width="72" bgcolor="#CCFFCC"><input name="punven" type="text" id="un2" value="<?php echo $punven1; ?>" size="3" maxlength="3" readonly="">
</td>
<td align="right" bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Casos de exito destacados:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="codg" type="text" id="un2" value="<?php echo $casoexi1; ?>" size="3" maxlength="3" readonly="">
</td>
</tr>
<tr>
<td bgcolor="#CCFFCC"><div align="right"><span class="Estilo29">Atenciones Rechazadas:</span></div></td>
<td width="28" bgcolor="#CCFFCC"><input name="deuda_total" type="text" id="deuda_total3" value="<?php echo $atenrech1; ?>" 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>