File: /home/asjudine/public_html/iuris/pages/call_center/php/TBL_PROCESOS.php
<?php
include("conexion_inter.php");
$numero_proceso = $_POST['proceso'];
$CONSULTA = "SELECT DISTINCT(numero_proceso), procesos.cedula, procesos.tipo_proceso, numero_contrato, tipo_contrato, sucursal.nombre as nombre_sucursal, clase_negocio, despacho_judicial, ciudad_despacho, procesos.tipo_afiliado, calidad_juridica_afiliado, tipo_orden, numero_carpeta, ultimo_folio, nombre_completo as nombre_abogado, fecha_actuacion, actividad_proceso, estado_proceso ,cartera_serviasjudinet.nombre,cartera_serviasjudinet.grado FROM procesos LEFT JOIN sucursal ON sucursal.codigo = codigo_sucursal LEFT JOIN asjudinet_abogados ON asjudinet_abogados.codigo_abogado = procesos.codigo_abogado LEFT JOIN cartera_serviasjudinet ON cartera_serviasjudinet.cedula = procesos.cedula WHERE procesos.numero_proceso = '".$numero_proceso."' ";
if ($result=mysql_query($CONSULTA))
{
if ((mysql_num_rows($result)!=0))
{
list($numero_proceso,$cedula, $tipo_proceso, $numero_contrato, $tipo_contrato, $sucursal, $clase_negocio, $despacho_judicial, $ciudad_despacho, $tipo_afiliado, $calidad_juridica_afiliado, $tipo_orden, $numero_carpeta, $ultimo_folio, $abogado, $fecha_actuacion, $actividad_proceso, $estado_proceso,$nombre,$grado) = mysql_fetch_row($result);
if($nombre == '')
{
$CONSULTA1 = "SELECT nombre FROM beneficiarios WHERE cedula ='".$cedula."'";
if ($result1=mysql_query($CONSULTA1))
{
list($nombre)= mysql_fetch_row($result1);
$grado = 'BENEFICIARIO';
}
}
?>
<div class="card " style="background-color: burlywood">
<div class="card-body">
<div class="col-12">
<div class="row form-group" >
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Nombre: <?php echo $nombre;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Grado: <?php echo $grado;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Proceso: <?php echo $numero_proceso;?>" >
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Tipo Proceso: <?php echo $tipo_proceso;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Contrato: <?php echo $numero_contrato;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Sucursal: <?php echo $sucursal;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Despacho: <?php echo $despacho_judicial;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Ultima Carpeta: <?php echo $ultimo_folio;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Abogado: <?php echo $abogado;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Fecha Actuacion: <?php echo $fecha_actuacion;?>">
</div>
<div class="col-6">
<input style="font-weight: bold;" type="text" class="form-control" readonly value="Estado: <?php
if($actividad_proceso =='A' && $estado_proceso=='V')
{
$ESTADO="VIGENTE";
}
else
{
$ESTADO="FINALIZADO";
}
echo $ESTADO;?>">
</div>
</div>
</div>
</div>
</div><br>
<table class="table table-responsive-lg table-hover" >
<thead class="text-uppercase bg-dark header-fixed" >
<tr class="text-white"><th style="text-align: center;" colspan="5"><h3>ULTIMAS ACTUACIONES DEL PROCESOS</h3> </th></tr>
<tr class="text-white">
<th scope="col">carpeta </th>
<th scope="col">actuacion</th>
<th scope="col">fecha</th>
<th scope="col">tipo orden</th>
</tr>
</thead>
<?php
$CONSULTA2 = "SELECT id, folio1, folio2, actuacion, fecha, tipo_orden, codigo_funcionario FROM actuaciones WHERE numero_proceso ='".$numero_proceso."' ORDER BY folio1 DESC,folio2 DESC ";
if ($result=mysql_query($CONSULTA2))
{
if ((mysql_num_rows($result)!=0))
{
while(list( $id, $folio1, $folio2, $actuacion, $fecha, $tipo_orden, $codigo_funcionario) = mysql_fetch_row($result))
{
?>
<tbody>
<tr>
<td><b><?php echo $folio2;?></b></td>
<td><b><?php echo $actuacion;?></b></td>
<td><b><?php echo $fecha;?></b></td>
<td><b><?php echo $tipo_orden;?></b></td>
</tr>
</tbody>
<?php
}
}
}
}
}
else
{
?>
<tr>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
<td>sin datos</td>
</tr>
<?php
}
?>
</table>