File: /home/asjudine/public_html/requerimiento_injustificado_director_evalua.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$linea = '-';
require_once("Conectarse.php");
$sql2 = mysql_query('SELECT * FROM Usuarios WHERE (Cargo = "DISER BARRANQUILLA" || Cargo = "DISER BOGOTA" || Cargo = "DISER BUCARAMANGA" || Cargo = "DISER CALI" || Cargo = "DISER CUCUTA" || 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 TUNJA" || Cargo = "DISER PASTO"|| Cargo = "DISER VALLEDUPAR" || Cargo = "DISER VILLAVICENCIO" ) 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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Consulta Cartera por Unidad</title>
<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: #000066;}
.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(ELEMENTOS/beig.jpg);
color: #000;
}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
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;}
.Estilo54 {color: #333399; font-family: "Arial Narrow"; font-weight: bold; }
.Estilo57 {color: #006600}
.Estilo58 {
color: #000099;
font-weight: bold;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<form action="" method="post" name="form1" class="provd" id="form1">
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<br></br>
<div align="center">
<table width="629" border="5" cellpadding="3" cellspacing="3" >
<tr>
<td colspan="3" bgcolor="#CCCC99"><div align="center" class="Estilo54">CONSULTA REQUERIMIENTOS INJUSTIFICADOS POR DIRECTOR </div></td>
</tr>
<tr>
<td bgcolor="#CCCC99" ><span class="Estilo54">Seleccione "<span class="Estilo57">DIRECTOR</span>" para continuar</span></td>
<td bgcolor="#CCCC99" > <select name="funcionario">
<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> </td>
</tr>
<tr>
<td bgcolor="#CCCC99" colspan="2" align="center"><span class="Estilo58">Fecha Desde:
<input name="fecha1" type="text" class="Estilo21" id="fecha1" value="0000-00-00" size="13" maxlength="13" >
Hasta:
<input name="fecha2" type="text" class="Estilo21" id="fecha2" value="0000-00-00" size="13" maxlength="13">
</span> </td>
</tr>
</table>
<p>
<input name="menu2" type="button" class="Estilo58" id="menu2" onclick="window.location.href='menu_informe_evaluacion.php'" value="IR AL MENU" />
<input name="consultar" id="consultar" type="submit" class="Estilo58" value="CONSULTAR">
</p>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST["consultar"]))
{
$control = mysql_query('SELECT id, numradica, identificacion, nombre_completo , recalificacion , fecha_envio FROM requerimientos_directores WHERE identificacion = "' . $_POST[funcionario] . '" and fecha_envio > "' . $_POST[fecha1] . '" and fecha_envio < "' . $_POST[fecha2] . '" and recalificacion = "INJUSTIFICADO" order by fecha_calificacion ');
if (!$control) {
die('Invalid query 2: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='700' border='3' align='center' cellpadding='3' cellspacing='2' >
<TR>
<TD bgcolor='#C5D6FC'><div align='center'><span class='texto'>CEDULA</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center'><span class='texto'>NOMBRE</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center'><span class='texto'>RECALIFICACION</span></div></TD>
<TD bgcolor='#C5D6FC'><div align='center'><span class='texto'>FECHA ENVIO</span></div></TD>";
while(list($id, $numra, $cedula, $nombre, $calificacion, $fechacali) = mysql_fetch_row($control))
{
$sum = $sum + 1;
printf("<tr>
<td bgcolor='#CCCC99'><div align='center' class='lista'><input type='button' value=$cedula name='cedu' class=Estilo51 onClick =window.open('requerimiento_consulta_director.php?cedula=$cedula&radica=$numra&id=$id','','top=20,left=100,toolbar=no,scrollbars=yes,width=790,height=600,status=yes')></a></span></div></td>
<td bgcolor='#CCCC99'><div align='center' class='class'>".$nombre."</span></div></td>
<td bgcolor='#CCCC99'><div align='center' class='lista'>".$calificacion."</span></div></td>
<td bgcolor='#CCCC99'><div align='center' class='lista'>".$fechacali."</span></div></td> ");
}
echo "</table>";
echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
<TR>
<br></br>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TOTAL REGISTROS</span></div></TD></TD>";
printf("<tr>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$sum."</span></div></td></td>");
echo "</table>";
}
echo "</form>";
}
?>