File: /home/asjudine/public_html/adirectoress/requerimiento_ingresar_reconsideracion_direc.php
<?php
global $dbi;
require_once("../Conectarse.php");
$result = mysql_query('SELECT id, numradica, identificacion, nombre_completo, codigo_dep_envio, funcionario_requiere, referencia , fecha_envio, hora_envio, asunto, mensaje, funcionario_requiere, fecha_respuesta , hora_respuesta , asunto_respuesta, funcionario_respuesta, mesaje_respuesta, fecha_calificacion, gestion_calificacion FROM requerimientos_directores 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, $Nombre_Completo, $nombre_dep, $Nombre_Elaboro, $Referencia, $fechaen, $horaen, $Asunto, $mensajeen, $Quien_Expide, $fechare, $horare, $asuntore, $funre, $mensajere, $fechacali, $gestioncali ) = mysql_fetch_row($result);
$tere = 0;
$con1 = mysql_query('SELECT numero_proceso FROM requerimientos WHERE numero_proceso = "'.$numpro.'" and identificacion = "'.$Identificacion.'" and (estado = "4" || estado = "3" || estado = "5")');
if (!$con1) {
die('Invalid query: ' . mysql_error());
}
while(list($numero_procesoss) = mysql_fetch_row($con1))
{
$tere = $tere + 1 ;
}
?>
<html>
<head>
<title>Ingresar Reconsideracion </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">
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color:#EAEAEA;font-family:Verdana, Geneva, 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;}
.subtitulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #0C0C76;padding: 3px 0;font-size: 16px;}
table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 2px;border-radius: 6px; border:2px solid #C0C0C0;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{}
.tdizq{background-color: #F4F4F4; padding: 1px 10px;color: #454545;font-size: 13px;font-weight: 600; text-align: left;}
.tdcen{background-color: #F4F4F4; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
.tdder{background-color: #F4F4F4; padding: 1px 10px;color: #454545;font-size: 13px;font-weight: 600; text-align: right;}
.exp{color:#8A0000; font-size:11px;}
.boton1{width:200px;background-color: #FFF;color: #000; padding: 3px; border:2px solid #7D0000;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
.direcciona{background-color: #B32225;color: #fff; padding: 3px;}
.direcciona:hover{background-color: #67a0d9; color: #000;}
input[type=text], select{border-radius: 2px; padding: 1px;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 500}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
textarea{font-weight:200; color:#000;}
</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>
</head>
<body>
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">INGRESAR RECONSIDERACION DEL REQUERIMIENTO</h3>
<form method="post" name="formulario" action="">
<table width="726" align="center" cellpadding="3" cellspacing="3">
<!--<tr bgcolor="#0099FF">
<td colspan="3" bordercolor="#FFCCCC" bgcolor="#FFFFCC"><div align="center" class="Estilo1">INGRESAR RECONSIDERACION DEL REQUERIMIENTO </div></td>
</tr>-->
<tr>
<td colspan="3" class="fecha">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</td>
</tr>
<tr>
<td > </td>
<td width="349" colspan="2"> </td>
</tr>
<tr>
<td class="tdder">Número del Radicación: </td>
<td class="tdizq" colspan="2" ><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=""></td>
</tr>
<tr>
<td class="tdder">Identificacion:</td>
<td class="tdizq" colspan="2" ><input name="Identificacion" type="text" value="<?php echo "$Identificacion"; ?>" size="15" maxlength="15" readonly=""></td>
</tr>
<tr>
<td class="tdder">Referencia:</td>
<td class="tdizq" colspan="2"><input name="Referencia" type="text" value="<?php echo "$Referencia"; ?>" size="4" maxlength="4" readonly="">
<input name="Nombre_Completo" type="text" value="<?php echo "$Nombre_Completo"; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="tdder">Funcionario Requerido</td>
<td class="tdizq" colspan="2"> </td>
</tr>
<tr>
<td class="tdder">Dependencia que envió 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" value="<?php echo "$Nombre_Elaboro"; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="tdder">Fecha y Hora de Envio del Requerimiento: </td>
<td class="tdizq" colspan="2" ><input name="fechaen" type="text" size="12" maxlength="12" value="<?php echo "$fechaen"; ?>" readonly=""> - <input name="horaen" type="text" size="11" maxlength="11" value="<?php echo "$horaen"; ?>" readonly=""> </td>
</tr>
<tr >
<td class="tdder">Fecha y Hora de Respuesta del Requerimiento: </span></strong></div></td>
<td class="tdizq" colspan="2"><input name="fechare" type="text" size="12" maxlength="12" value="<?php echo "$fechare"; ?>" readonly=""> - <input name="horare" type="text" size="11" maxlength="11" value="<?php echo "$horare"; ?>" readonly=""> </td>
</tr>
<tr>
<td class="tdder">Asunto:</td>
<td class="tdizq" colspan="2"><input name="asuntore" type="text" value="<?php echo "$asuntore"; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="subtitulo" colspan="3">Visualizacion por la cual fue Requerido:</td>
</tr>
<tr>
<td colspan="3">
<?php
echo "<textarea name='Contenido' cols='85' rows='4' style='color:#0000CC' title='RESPUESTA ENVIADA' readonly>\n";
echo $mensajeen;
echo "</textarea>"; ?>
</td>
</tr>
<tr>
<td class="subtitulo" colspan="3">Visualización Respuesta del Requerimiento: </td>
</tr>
<tr>
<td colspan="3">
<?php
echo "<textarea name='Contenido' cols='85' rows='4' style='color:#990033' title='RESPUESTA ENVIADA' readonly>\n";
echo $mensajere;
echo "</textarea>"; ?>
</td>
</tr>
<tr>
<td colspan="3" >
<?php
global $dbi;
$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];
//$res = mysql_query('SELECT * FROM archivos WHERE Identificacion = "' . $_GET[Identificacion] . '" and registro = "' . $_GET[Id] . '"');
$res = mysql_query("SELECT * FROM archivos_requerimientos_directores WHERE Identificacion = '$LaIdentificacion' and registro = '$ElID'");
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'>
<th colspan='5' class='tdtitulo'>LISTADO DE ARCHIVOS ENVIADOS </span></th>
</tr>
<tr bgcolor='#FFFFCC'>
<th class='tdtitulo'>ID</span></th>
<th class='tdtitulo'>NOMBRE</span></th>
<th class='tdtitulo'>FECHA ENVIO</span></th>
<th class='tdtitulo'>HORA ENVIO</span></th>
<th class='tdtitulo'>TIPO DE ARCHIVO</span></th>
</tr>");
//$Filas = mysql_fetch_row($res);
while($Filas = mysql_fetch_row($res))
{
printf("<tr><td><div align='center'><a href='descargar_archivos.php?Id=" . $Filas[1] . "' class='Estilo5 Estilo6'>Descargar</a></div></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>
<br>
<tr >
<td class="subtitulo" colspan="3">ACCION TOMADA DEL REQUERIMIENTO CALIFICADO </td>
</tr>
<tr>
<td colspan="3">
<?php
echo "<textarea name='Contenido' cols='85' rows='4' title='RESPUESTA ENVIADA' readonly>\n";
echo $gestioncali;
echo "</textarea>"; ?>
</td>
</tr>
<tr></tr>
<tr>
<td class="subtitulo" colspan="3"> SOLICITUD RECONSIDERACIÓN O ACLARACIÓN A SU RESPUESTA.</td>
</tr>
<tr>
<td colspan="3"><textarea name="gestionre" cols="90" rows="4" ></textarea></td>
</tr>
<tr>
<td colspan="3"><input name="rechazar" type="submit" id = "rechazar" value="Guardar" class="direcciona"> </td>
</tr>
</table>
</form>
</body>
</html>
<?php
if ((isset($_POST["rechazar"])))
{
$Quien = strtoupper($Funcionario_Expide);
$Noti = "N";
global $dbi;
$fecha = date('Y').'-'.date('m').'-'.date('d');
if ($_POST[gestionre]== "")
{
echo "<script>alert('Falta emitir el resultado de la reconsideracion' )</script>";
}
else
{
$mss = mysql_query("UPDATE requerimientos_directores set fecha_reconsideracion = '" .$fecha. "', gestion_reconsideracion = '".$_POST[gestionre]. "', estado = '3' WHERE identificacion = '".$_GET[cedula]. "' and id = '".$_GET[id]."' and numradica = '".$_GET[radica] . "' and estado = '2'");
if (!$mss ) {
die('Invalid query cartera_estado_contable MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Reconsideracion grabada satisfatoriamente' )</script>";
}
}
?>