File: /home/asjudine/public_html/abogados/requerimiento_dar_respuesta.php
<?php
global $dbi;
require_once("../Conectarse.php");
error_reporting(E_ALL ^ E_NOTICE);
$result = mysql_query('SELECT id, numradica, identificacion, numero_proceso , nombre_completo, codigo_dep_envio, funcionario_requiere, referencia , fecha_envio, hora_envio, asunto, mensaje, funcionario_requiere FROM requerimientos WHERE Id = "' . $_GET["id"] . '" ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if($result)
{
if (mysql_num_rows($result)==0)
{
echo "<script>alert('Nºmero de Identificación no encontrado');</script>";
exit;
}
list($Id, $numradica, $Identificacion, $numpro, $Nombre_Completo, $nombre_dep, $Nombre_Elaboro, $Referencia, $fechaen, $Hora_Envio, $Asunto, $Mensaje, $Quien_Expide) = mysql_fetch_row($result);
?>
<!DOCTYPE html>
<html>
<head>
<title>Requerimineto Dar Respuesta</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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>
<style>
*{margin: 0;padding: 0;}
body{background-image:url(../ELEMENTS/fondo.jpg);font-family:Geneva, Arial, Helvetica, sans-serif;}
header {background-color: #B7271F; text-align: center;}
.cerrarsesion{width: auto;height: 20px;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
.cerrarsesion:hover{background-color: #ffffff;color: #000;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
table{margin: 0 auto;border: 8px solid #bebebe;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;margin-top: 5px;margin-bottom: 5px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{padding: 1px; border: 1px solid #a0a0a0;}
.tdizq{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 14px;font-weight: 600; text-align: left;}
.tdcen{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
.tdder{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 14px;font-weight: 600; text-align: right;}
.diff{color: #af2323; font-size: 11px;}
.boton1{width:400px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
input[type=text]{border-radius: 5px; padding: 3px;background-color: #fffde8;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
.botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;border-radius:5px;}
.botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
</style>
</head>
<body>
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">REQUERIMIENTOS ENVIADOS</h3>
<form method="post" name="formulario" action="Mostrar_Texto.php">
<table width="662">
<tr>
<td colspan="3" class="fecha"><script languaje="JavaScript">Mostrar_Fecha()</script></td>
</tr>
<tr>
<td class="tdder">Número del Radicación:</td>
<td colspan="2" class="tdizq">
<input name="numradica" type="text" size="5" maxlength="5" value="<?php echo "$numradica"; ?>" readonly="">
<input name="Contador" type="hidden" size="5" maxlength="5" value="<?php echo $Id; ?>" readonly="">
<span class="tdizq">Número de Proceso:</span>
<input name="numpro" type="text" size="5" maxlength="5" value="<?php echo "$numpro"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Digitar Número <span class="diff">(Cédula, Código Militar o NIT:)</span></td>
<td class="tdizq" colspan="2">
<input name="Identificacion" type="text" size="15" maxlength="15" value="<?php echo "$Identificacion"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Referencia <span class="diff">(Señor o Señora):</span></td>
<td class="tdizq" colspan="2"><input name="Referencia" type="text" size="4" maxlength="4" value="<?php echo "$Referencia"; ?>" readonly=""></td>
</tr>
<tr>
<td class="tdder">Apellidos - Nombres <span class="diff">(Afiliado, Beneficiario o Persona Natural ) : </span></td>
<td class="tdizq" colspan="2">
<input name="Nombre_Completo" type="text" size="50" maxlength="50" value="<?php echo "$Nombre_Completo"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Dependencia que envia el mensaje:</td>
<td class="tdizq" colspan="2">
<input name="nombre_dep" type="text" id="nombre_dep" value="<?php echo $nombre_dep ?>" size="50" maxlength="50" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Nombre Funcionario que Elaboró el Documento :</td>
<td class="tdizq" colspan="2">
<input name="Nombre_Elaboro" type="text" size="50" maxlength="50" value="<?php echo "$Nombre_Elaboro"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Fecha de Envio del Documento: </td>
<td class="tdizq" colspan="2">
<input name="Dia_Envio" type="text" size="12" maxlength="12" value="<?php echo "$fechaen"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Hora de Envío del Documento:</td>
<td class="tdizq" colspan="2">
<input name="Hora_Envio" type="text" size="11" maxlength="11" value="<?php echo "$Hora_Envio"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdder">Asunto:</td>
<td class="tdizq" colspan="2">
<input name="Asunto" type="text" size="50" maxlength="50" value="<?php echo "$Asunto"; ?>" readonly="">
</td>
</tr>
<tr>
<td class="tdcen" colspan="2">Visualización del contenido de la Respuesta: </td>
</tr>
<tr>
<td class="tdcen" colspan="3" align="center">
<?php
echo "<textarea align='center' name='Contenido' cols='80' rows='4' title='RESPUESTA ENVIADA' readonly>\n";
echo htmlspecialchars($Mensaje)."\n";
echo "</textarea>"; ?>
</td>
</tr>
<tr>
<td class="tdder">Funcionario que expide el documento:</td>
<td class="tdizq" colspan="2">
<input name="Quien_Expide" type="text" size="50" maxlength="50" value="<?php echo "$Quien_Expide"; ?>" readonly="">
</td>
</tr>
<tr>
<td colspan="3">
<?php
$fecha = $Dia_Envio."-".$Mes_Envio."-".$Ano_Envio;
//$query_Recordset1 = "SELECT * FROM archivos where Identificacion = $Identificacion and registro = $Id";
//$Recordset1 = mysql_query($query_Recordset1, $dbi) or die(mysql_error());
$LaIdentificacion = $_GET[cedula];
$ElID =$_GET[id];
$Radica =$_GET[radica];
//$res = mysql_query('SELECT * FROM archivos WHERE Identificacion = "' . $HTTP_GET_VARS[Identificacion] . '" and registro = "' . $HTTP_GET_VARS[Id] . '"');
$res = mysql_query("SELECT * FROM archivosrequerimientos WHERE Identificacion = '$LaIdentificacion' and registro = '$Radica'");
if (!$res) {
die('Invalid query: ' . mysql_error());
}
printf("<style type='text/css'><!--.Estilo5 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000066; }--></style>");
printf("<table width='700' border='1' align='center' cellpadding='1' cellspacing='1'>
<tr bgcolor='#FFFFCC'>
<td class='tdtitulo' colspan='5' scope='col'><span class='tdtitulo'>LISTADO DE ARCHIVOS ENVIADOS </span></th>
</tr>
<tr>
<td class='tdtitulo'>ID</span></th>
<td class='tdtitulo'>NOMBRE</span></th>
<td class='tdtitulo'>FECHA ENVIO</span></th>
<td class='tdtitulo'>HORA ENVIO</span></th>
<td class='tdtitulo'>TIPO DE ARCHIVO</span></th>
</tr>");
//$Filas = mysql_fetch_row($res);
while($Filas = mysql_fetch_row($res))
{
printf("<tr>
<td class='tdfull'><a href='descargar_requerimientos.php?Id=".$Filas[0]."' class='tdfull'>Descargar</a></td>
<td class='tdfull'>".$Filas[2]."</td>
<td class='tdfull'>".$Filas[3]."</td>
<td class='tdfull'>".$Filas[4]."</td>
<td class='tdfull'>".$Filas[6]."</td></tr>");
}
echo "</table>";
mysql_free_result($res);
}
else
{
echo "<script>alert('Número de radicación no encontrado');<script>";
}
?>
</td>
</tr>
<tr>
<td class="tdcen" colspan="3">
<input name="menu2" type="button" class="boton1" id="menu2" onClick="window.location.href='requeriemiento_respuesta.php?cedula=<?php echo $_GET["cedula"] ; ?>&radica=<?php echo $_GET["radica"] ; ?>&id=<?php echo $_GET["id"]; ?>'" value="DAR RESPUESTA REQUERIMIENTO" />
</td>
</tr>
</table>
</form>
</body>
</html>