File: /home/asjudine/www/avigilajudicial/formulario_revisar_alertas.php
<?php
global $dbi;
require_once("../Conectarse_.php");
error_reporting(E_ALL ^ E_NOTICE);
$dia = date("d");
$mes = date("m");
$ano = date("Y");
//$misql = mysql_query("select codigo from Usuarios where Cedula = $cc", $dbi);
/*$misql = mysql_query('SELECT codigo FROM Usuarios WHERE Cedula = "'.$_GET["cc"] . '" ');
if (!$misql) {
die('Invalid query 1: ' . mysql_error());
}
if($misql){list($codigo_funcionario) = mysql_fetch_row($misql);}*/
$control = mysql_query('SELECT identificacion_demandante, nombre_demandante, numero_proceso, ciudad_proceso, direccion_gestion, nombre_demandado, identificacion_demandado, despacho_judicial, medio_control, naturaleza, nombre_apoderado, email_apoderado, email_supervisor, codigo_abogado, codigo_supervisor, estado_proceso FROM procesos WHERE cedula = "'.$_GET["cedula"] . '" and numero_proceso = "'.$_GET["numpro"].'" ');
if (!$control) {
die('Invalid query 2: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
list($cedula_demandante, $nombre_demandante, $numero_proceso, $ciudad_proceso, $direccion_gestion, $nombre_demandado, $cedula_demandado, $despacho_judicial, $medio_control, $naturaleza, $nombre_apoderado, $email_apoderado, $email_supervisor, $codigo_abogado, $codigo_supervisor, $estado_proceso) = mysql_fetch_row($control);
//if($actividad_proceso == 'A')
//{
/// $actividad_proceso = 'ACTIVO';
//}
//else $actividad_proceso = 'INACTIVO';
//if($estadopro == 'VIGENTE')
//{
// $estado_proceso = 'VIGENTE';
//}
//else $estado_proceso = 'HISTORICO';
// $sucursal = mysql_query("select nombre from sucursal where codigo = $codigo_sucursal", $dbi);
$sucursales = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "'.$sucursal.'" ');
if (!$sucursales) {
die('Invalid query4: ' . mysql_error());
}
if($sucursal){list($ns) = mysql_fetch_row($sucursales);}
// $abogado = mysql_query("select nombre_completo from asjudinet_abogados where codigo_abogado = $codigo_abogado", $dbi);
//$abogado = mysql_query('SELECT nombre_completo FROM asjudinet_abogados WHERE codigo_abogado = "' ."$cod_abogado". '" ');
//if (!$abogado) {
// die('Invalid query5: ' . mysql_error());
//}
//if($abogado){list($nombre_abogado) = mysql_fetch_row($abogado);}
/* $tres=substr($fecha_actuacion, 0, 4);
$dos=substr($fecha_actuacion, 5, 2);
$uno=substr($fecha_actuacion, 8, 2);
$fecha_actuacion = ($_POST[uno]."-".$_POST[dos]."-".$_POST[tres]);*/
$eldia = $_POST[dia];
$elmes = $_POST[mes];
$elano = $_POST[ano];
$fecha_actuacion = ($_POST[ano]."-".$_POST[mes]."-".$_POST[dia]);
// $sqlnom = "select nombre from asjudinet_cartera where cedula = $cedula";
// $control = mysql_query($sqlnom, $dbi) or die(mysql_error());
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Datos Proceso</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">
<link rel="stylesheet" href="css/estilos.css">
<!--
<style>
*{margin: 0;padding: 0;}
body{background-image:url(../ELEMENTS/fondo.jpg);font-family:Geneva, Arial, Helvetica, sans-serif;font-size:12px;}
header {background-color: #B7271F; text-align: center;}
.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;}
.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: 12px;font-weight: 600; text-align: left;}
.tdcen{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdder{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.boton1{width:200px;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;}
.tdfulljusti{background-color: #fff; color: #000; padding: 1px; text-align: justify; 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>
-->
<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>
<script Language="JavaScript">
<!--
<script languaje="JavaScript">
function validar_campos(formulario)
{
if (formulario.funcionario.value == "")
{
alert("Seleccione El Funcionario");
formulario.funcionario.focus();
return (false);
}
if (formulario.archivito.value == "")
{
alert("Seleccione Un Archivo");
formulario.archivito.focus();
return (false);
}
if (formulario.archivito2.value == "")
{
alert("Seleccione Un Archivo");
formulario.archivito2.focus();
return (false);
}
if (formulario.seguimiento.value == "")
{
alert("Describa La Actividad");
formulario.seguimiento.focus();
return (false);
}
if (formulario.funcionario.value == "")
{
alert("Seleccione El Funcionario");
formulario.funcioanrio.focus();
return (false);
}
if (formulario.archivito.value == "")
{
alert("Anexe Un Archivo");
formulario.archivito.focus();
return (false);
}
if (confirm("Los datos de la consulta son correctos"))
{
return (true);
}
else
{
return (false);
}
return (true);
}
//-->
</script>
<SCRIPT LANGUAGE='JavaScript'>
var default1 = "VENTANA PARA EL INGRESO DE REVISTAS JURIDICAS"; // only shown once at page load
var text1 = "El primer encabezado muestra en detalle los datos del proceso seleccionado";
var text2 = "la segunda parte muestra el formulario para el ingreso de revistas";
var text3 = "No se le olvide tener en cuenta el número del folio que se entrega en el juzgado";
var changeRate = 3000; // 1000 = 1 second
var messageNumber = 0;
function changeStatus()
{
if (messageNumber == 0) {
window.status=default1;
document.title=default1;
}
else if (messageNumber == 1) {
window.status=text1;
}
else if (messageNumber == 2) {
window.status=text2;
}
else if (messageNumber == 3) {
window.status=text3;
messageNumber = 0;
}
messageNumber++;
setTimeout("changeStatus();",changeRate);
}
changeStatus(); // leave here to run right away
// -->
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="document.formulario.folio1.focus()">
<?php include('header.php'); ?>
<h3 class="titulo">VISUALIZACION DE DATOS DEL PROCESO SELECCIONADO </h3>
<form name="consulta" action="" method="post" enctype="multipart/form-data" onSubmit="return validar_campos(this)">
<table width="700" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td colspan="4" align="center" class="fecha">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</td>
</tr>
<tr>
<td class="tdbig"><fieldset><legend>Datos del proceso:</legend>
<table width="720" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tdcen">Cédula (Titular-Beneficiario):</td>
<td class="tdizq" colspan="2"><input name="cedula" type="text" id="cedula" value="<?php echo $cedula; ?>" size="15" maxlength="15" readonly=""></td>
<td class="tdcen">Proceso:</td>
<td class="tdizq"><input name="numeroproceso" type="text" id="numeroproceso" value="<?php echo $numproceso; ?>" size="15" maxlength="25" readonly=""></td>
</tr>
<!--<tr>
<td class="tdcen">Nombre completo:</td>
<td class="tdizq" colspan="4"><input name="nombre" type="text" id="nombre" value="<?php echo $nombre_completo; ?>" size="50" maxlength="50" readonly=""></td>
</tr>-->
<tr>
<td class="tdcen">Tipo de proceso:</td>
<td class="tdizq" colspan="2"><input name="tipoproceso" type="text" id="tipoproceso" value="<?php echo $tipoproceso; ?>" size="22" maxlength="20" readonly=""></td>
<!--<td class="tdcen">Contrato:</td>
<td class="tdizq"><input name="numero_contrato" type="text" id="numero_contrato" value="<?php echo $numero_contrato; ?>" size="6" maxlength="7" readonly=""></td>-->
</tr>
<tr>
<td class="tdcen">Sucursal:</td>
<td class="tdizq" colspan="2"><input name="codigo_sucursal" type="text" id="tipo_contrato" value="<?php echo $sucursal; ?>" size="1" maxlength="1" readonly="">
-
<input name="sucursal" type="text" id="sucursal" value="<?php echo $ns; ?>" size="18" maxlength="20" readonly=""></td>
<!--<td class="tdcen">Tipo:</td>
<td class="tdizq"><input name="tipo_contrato" type="text" id="tipo_contrato" value="<?php echo $tipo_contrato; ?>" size="4" maxlength="4" readonly=""></td>-->
</tr>
<tr >
<td class="tdcen">Clase de negocio:</td>
<td class="tdizq" colspan="4"><input name="clasenegocio" type="text" id="clasenegocio" value="<?php echo $clasenegocio; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Despacho judicial:</td>
<td class="tdizq" colspan="4"><input name="despachojudicial" type="text" id="despachojudicial" value="<?php echo $despacho; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Ciudad Despacho:</td>
<td class="tdizq" colspan="4"><input name="ciudaddespacho" type="text" id="ciudaddespacho" value="<?php echo $ciudaddespacho; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Tipo de orden:</td>
<td class="tdizq"><input name="tipoorden" type="text" id="tipoorden" value="<?php echo $tipoorden; ?>" size="15" maxlength="20" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Abogado:</td>
<td class="tdizq" colspan="4"><input name="nombre_abogado" type="text" id="nombre_abogado" value="<?php echo $nombre_abogado; ?>" size="50" maxlength="50" readonly="">
<input name="codigo_abogado" type="text" id="codigo_abogado" value="<?php echo $cod_abogado; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Fecha última actuación:</td>
<td class="tdizq"><input name="fecha_actuacion" type="text" id="fecha_actuacion" value="<?php echo $fecha; ?>" size="10" maxlength="10" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Estado del proceso:</td>
<td class="tdizq" colspan="4"><input name="estado_proceso" type="text" id="estado_proceso" value="<?php echo $estado_proceso; ?>" size="20" maxlength="20" readonly="">
</td>
</tr>
<tr>
<td class="tdcen">Nombre Contraparte</td>
<td class="tdizq" colspan="4"><input name="contraparte" type="text" id="contraparte" value="<?php echo $contraparte; ?>" size="20" maxlength="20" readonly="">
</td>
</tr>
<!--echo "<td class='tdcen'><input type='button' value='ALERTAS' name='cedu' class='botonnew' onClick =document.location.href='formulario_generar_alertas.php?cedula=$cedula&numpro=$numproceso','','top=30,left=50,toolbar=yes,scrollbars=yes,width=1000,height=800,status=yes'></a></td>";-->
<tr>
<td colspan="5">
<!--<table width="662" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="td"><MARQUEE class=marquee scrolldelay="100">Una vez que haya grabado el registro, haga click sobre el botón **Actualizar** para visualizar el último folio</MARQUEE> </td>
<td class="td"><input name="actualiza" type="submit" id="actualiza" class= "boton1" value="Actualizar"></td>
</tr>
</table>-->
</td>
</tr>
</table>
<p align="center"><input name="button" type="button" class='boton1' onClick="javascript:window.close()" value="REGRESAR AL LISTADO"></p>
</fieldset></td>
</tr>
</table>
</form>
</body>
</html>
<?php
require_once("../Conectarse_.php");
$result= mysql_query('SELECT id, cedula,numero_proceso,actuacion,fecha,tipo_orden,codigo_abogado,estado, alerta1, alerta2, alerta3, alerta4, alerta5, alerta6 FROM actuaciones_vigilancia_judicial WHERE cedula = "'.$_GET["cedula"].'" and numero_proceso = "'.$_GET["numpro"].'" and estado = 2 order by fecha ');
if (!$result) {
die('Error de consulta: ' . mysql_error());
}
if(mysql_num_rows($result) != 0)
{
echo "<form name='actua' action='' method='post'>
<center><table width=900 border=1 cellpadding=1 cellspacing=1>
<tr>
<td class='fecha' colspan='6'>SE HAN GENERADO LAS SIGUIENTES ALERTAS</td>
</tr>
<tr>
<td class='tdtitulo' width='400'>Actuación</td>
<td width='75' class='tdtitulo'>Fecha</td>
<td width='65' class='tdtitulo'>Tipo Orden</td>
<td width='65' class='tdtitulo'>Funcionario</td>
<td width='65' class='tdtitulo'>Estado</td>
<td width='120' class='tdtitulo'>Alertas</td>
</tr></center>";
while(list($id,$cedula,$numpro,$actuacion,$fecha,$tipoorden,$abogado,$estado,$alerta1,$alerta2,$alerta3,$alerta4,$alerta5,$alerta6) = mysql_fetch_row($result))
{
if($alerta1 == "1"){$aler1 = "Audiencia, ";}else{$aler1 = "";}
if($alerta2 == "2"){$aler2 = "Recursos, ";}else{$aler2 = "";}
if($alerta3 == "3"){$aler3 = "Alegatos, ";}else{$aler3 = "";}
if($alerta4 == "4"){$aler4 = "Lectura de Fallo, ";}else{$aler4 = "";}
if($alerta5 == "5"){$aler5 = "Apelacion, ";}else{$aler5 = "";}
if($alerta6 == "6"){$aler6 = "Mediadas Cautelares, ";}else{$aler6 = "";}
$union = $aler1.$aler2.$aler3.$aler4.$aler5.$aler6;
echo "<tr class=lista>
<tr>
<td class='tdfulljusti'><a href=\"modificar_actuacion_alerta.php?cedula=$cedula&numpro=$numpro&id=$id\" target=_blank top=50,left=100,toolbar=no,scrollbars=no,width=10,height=10,status=yes>$actuacion</a></td>
<td class='tdfull'>$fecha</td>
<td class='tdfull'>$tipoorden</td>
<td class='tdfull'>$abogado</td>
<td class='tdfull'>$estado</td>
<td class='tdfull'>$union</td>
</tr>";
echo "</center></form>";
}
}
?>
</table>