File: /home/asjudine/public_html/consulta_respuestas_revisar.php
<!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>Aprobación Correspondencia por Cedula</title>
<style type="text/css">
<!--
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.lista {font-family: Arial; font-size: 11px; color: #990000;}
.Estilo10 { font-size: 14px;
font-weight: bold;
}
.Estilo12 {
font-size: 11px
}
.Estilo15 { font-size: 12px;
color: #000000;
font-weight: bold;
}
.campo1 { background-color: #B7FFFF;
border: thin dashed #B6B6B6;
}
.campo1 { font-family: "Courier New", Courier, monospace;
font-size: 16px;
font-style: normal;
font-weight: bold;
background-color: #E1EFFD;
border: thin doble #009999;
}
.campo1 {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
color: #5151FF;
background-color: #C4E4FD;
border: thin solid #009999;
height: 20px;
width: auto;
}
.datos3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #FF3300;
background-color: #A6ECD7;
margin: 4px;
padding: 4px;
border: medium groove #CCCCFF;
}
.campo {background-color: #FFFFCC; border:1px solid #990000; font-family:Arial; font-size:11px; height: inherit}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.Estilo1 { color: #FF6633;
font-size: 24px;
font-style: italic;
}
.Estilo2 { color: #FF6633;
font-size: 16px;
}
.Estilo3 { color: #2492FF;
font-weight: bold;
}
.recaudo { font-family: "Courier New", Courier, monospace;
font-size: 12px;
font-style: normal;
font-weight: bold;
font-variant: normal;
color: #000000;
background-color: #B6CBDC;
margin: 4px;
padding: 8px;
width: auto;
border: medium outset #339966;
}
.datos2 {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #0033FF;
background-color: #FFE2C6;
margin: 2px;
padding: 3px;
border: medium doble #EEBFEB;
}
.go {
font-family: "Times New Roman", Times, serif;
font-size: 9px;
font-style: normal;
color: #FF6633;
background-color: #FBDCBD;
padding: 1px;
height: auto;
width: auto;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
}
.Estilo8 { font-size: 20px;
font-weight: bold;
}
.Estilo4 { color: #FF1A1A;
font-weight: bold;
}
.datos1 { font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
text-decoration: blink;
background-color: #CCFFCC;
margin: 5px;
padding: 7px;
height: auto;
width: auto;
border: thin solid #0099FF;
}
.datos1 { font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
background-color: #FDE0C1;
margin: 2px;
padding: 3px;
border: medium doble #DBAED7;
}
.datos1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
font-weight: normal;
background-color: #B8F5E8;
margin: 4px;
padding: 5px;
border: thin outset #009999;
}
.Estilo52 {font-size: 16px}
.Estilo54 {font-size: 14px}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" >
<div align="center">
<table width="400" border="3" cellpadding="3" cellspacing="3" class="recaudo">
<caption>
<span class="Estilo1">Consulta por Cedula </span>
</caption>
<tr>
<th colspan="2" scope="col"><label>Digite el Numero de Cedula </label></th>
</tr>
<tr>
<td width="162"><div align="center"><span class="Estilo2">CEDULA : </span></div></td>
<td width="135"><div align="center">
<input name="cedula" type="text" id="cedula" size="20" maxlength="20" />
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="consultar" type="submit" class="Estilo3" id="consultar" value="Consultar" />
</div></td>
</tr>
</table>
</div>
<p align="center">
<input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='menu_correspondencias.php'" value="IR AL MENU" />
</p>
</form>
</body>
</html>
<?php
if(isset($_POST["consultar"]))
{
require_once("Conectarse.php");
echo "<form name='form' action='' method='post'>";
require_once("mainfile.php");
include ("config.php");
global $dbi;
$control = mysql_query('SELECT Id, numradica, Identificacion, Nombre_Completo, Dia_Recibe , Mes_Recibe , Ano_Recibe, Hora_Recibe, funcinario_recibe FROM correspondencias WHERE Identificacion = "' . $_POST["cedula"] . '" and estado = "2" ');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='700' border='3' align='center' cellpadding='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>N° RADICACION</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEDULA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NOMBRE</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>FECHAR RADICACION</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>HORA RADICACION</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>FUNCIONARIO QUE RECIBE</span></div></TD>";
while(list($id, $numra, $cedula, $nombres , $dia, $mes, $ano, $hora, $funre ) = mysql_fetch_row($control))
{
$contrw = mysql_query('SELECT Nombre_Completo FROM Usuarios WHERE codigo = "' ."$funre". '" ');
if (!$contrw) {
die('Invalid query 1: ' . mysql_error());
}
list($funre) = mysql_fetch_row($contrw);
$sum = $sum +1;
printf("<tr>
<td bgcolor='#DEFEFD'><div align='center' class='lista'>".$numra."</span></div></td>
<td bgcolor='#DEFEFD'><div align='center' class='lista'><input type='button' value=$cedula name='cedu' class=Estilo51 onClick =window.open('consulta_correspondencia_pen.php?cedula=$cedula&radica=$numra&id=$id','','top=50,left=100,toolbar=no,scrollbars=yes,width=750,height=430,status=yes')></a></span></div></td>
<td bgcolor='#DEFEFD'><div align='center' class='lista'>".$nombres."</span></div></td>
<td bgcolor='#DEFEFD'><div align='center' class='lista'>".$ano.'-'.$mes.'-'.$dia."</span></div></td>
<td bgcolor='#DEFEFD'><div align='center' class='lista'>".$hora."</span></div></td>
<td bgcolor='#DEFEFD'><div align='center' class='lista'>".$funre."</span></div></td>");
}
echo "</table>";
}
echo "</form>";
}
?>