File: /home/asjudine/public_html/consulta_resputas_pendientes_fun_Copia.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$linea = '-';
require_once("Conectarse.php");
$sql = mysql_query('SELECT * FROM Usuarios order by Nombre_Completo ');
if (!$sql) {
die('Invalid query fff: ' . mysql_error());
}
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);
?>
<!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>Ventas hechas por Serviasjudinet</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: #990000;}
.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;
}
.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}
-->
</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">
<div align="center">
<table width="655" border="3" cellpadding="3" cellspacing="3" bgcolor="#CCFFFF">
<tr>
<td colspan="4"><div align="center" class="Estilo50">SERVIASJUDINET - CONSULTA POR FUNCIONARIO RESPUESTAS PENDIENTES </div></td>
</tr>
<tr>
<td colspan="2" align="center"><span class="Estilo57">Criterio De Busqueda</span></td>
<th colspan="2" width="408" scope="col">
<select name="ase" class="Estilo66" id="ase">
<option value="">--SELECCIONE FUNCIONARIO-</option>
<?php
do {
?>
<option value="<?php echo $row_sql['Nombre_Completo'];?>"><?php echo $row_sql['Nombre_Completo']?></option>
<?php
} while ($row_sql = mysql_fetch_assoc($sql));
$rows = mysql_num_rows($sql);
if($rows > 0) {
mysql_data_seek($sql, 0);
$row_sql = mysql_fetch_assoc($sql);
}
?>
</select>
</th>
</tr>
</table>
<p>
<input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='menu_admin.php'" value="IR AL MENU" />
<input name="consultar" id="consultar" type="submit" class="Estilo50" value="CONSULTAR">
</p>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST["consultar"]))
{
$control = mysql_query('SELECT Id, numradica, Identificacion, Nombre_Completo, codigo_depen , Dia_Recibe , Mes_Recibe , Ano_Recibe , fecha_recibido , funcinario_recibe , Quien_Expide FROM correspondencias WHERE Quien_Expide = "'.$_POST["ase"].'" and (estado = "0" || estado = "2")');
if (!$control ) {
die('Invalid query 3333: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='800' border='2' align='center' cellpadding='2' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'># Radicación</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Identificación</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Apellidos - Nombres del Afiliado</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Sucursal Origen</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Fecha Recibido</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Registro Bogota</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Funcionario que Recibe</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>Funcionario Quien Responde</span></div></TD>";
while(list($id, $radica, $cc, $nom, $sun, $de, $me, $ae, $recibido, $funce, $quien ) =mysql_fetch_row($control))
{
$sum = $sum +1 ;
printf("<tr>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$id."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$cc."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$nom."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$sun."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$ae."-".$me."-".$de."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$registro."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$funce."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$quien."</span></div></td>");
}
echo "</table>";
echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TOTAL REGISTROS</span></div></TD>";
printf("<tr>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$sum."</span></div></td>");
}
echo "</form>";
}
?>