File: /home/asjudine/www/abogados/formulario_descarga_archivos.php
<?php
require_once("../Conectarse.php");
$Recordset1 = mysql_query('SELECT * FROM Usuarios WHERE (cargo="ABOGADO") ');
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$control = mysql_query('SELECT cedula, numero_proceso, tipo_proceso, codigo_sucursal, clase_negocio, despacho_judicial, ciudad_despacho, tipo_orden, codigo_abogado, fecha_actuacion, estado_proceso, nombre_contraparte, estado FROM procesos WHERE cedula = "'.$_GET["ced2"].'" and numero_proceso = "'.$_GET["numpro"].'" ');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($cedula, $numpro, $tipoproceso, $sucursal , $clasenegocio, $despacho, $ciudad_despacho, $tipoorden,$cod_abogado, $fecha, $estadopro, $contraparte) = mysql_fetch_row($control);
if($actividad_proceso == 'A')
{
$actividad_proceso = 'ACTIVO';
}
else $actividad_proceso = 'INACTIVO';
if($estadopro == 'V')
{
$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);}
?>
<html>
<head>
<title>Formulario Listado Audiencia</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:Geneva, Arial, Helvetica, sans-serif;}
header {background-color: #B7271F; text-align: center;}
.cerrarsesion{width: auto;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: 2px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{border: #969696 solid 1px;}
.tdizq{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: left;}
.tdcen{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
.tdder{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: right;}
.exp{color:#8A0000; font-size:12px;}
.boton1{width:150px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:4px;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
input[type=text]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 1px; text-align: center; font-size: 12px; font-weight: 600}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 13px;}
.tdfulljusti{background-color: #fff; color: #000; padding: 1px 4px; text-align: left; 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>
function Verificar() {
if(document.frm.funcionario.value == "") {
alert("Por Favor Seleccione Funcionario");
document.frm.funcionario.focus();
return false;
}
if(document.frm.nombre.value == "") {
alert("Por Favor Escriba El Nombre");
document.frm.nombre.focus();
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#EFEFEF" text="#000000" topmargin="0" leftmargin="0">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">Descargar Imagen</h3>
<table width="700px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" colspan="2">
<script>
function Verificar() {
if(document.frm.apellidos.value == "") {
alert("Por Favor Escriba Los Apellidos");
document.frm.apellidos.focus();
return false;
}
if(document.frm.nombre.value == "") {
alert("Por Favor Escriba El Nombre");
document.frm.nombre.focus();
return false;
}
if(document.frm.ced.value == "") {
alert("Por Favor Escriba El Numero De Cedula");
document.frm.ced.focus();
return false;
}
if(document.frm.ecivil.value == "") {
alert("Por Favor Escriba El Estado Civil");
document.frm.ecivil.focus();
return false;
}
if(document.frm.funcionario.value == "") {
alert("Por Favor Seleccione El Funcionario");
document.frm.funcionario.focus();
return false;
}
return true;
}
</script>
<!--<form name="formulario" method="post" action="" enctype="multipart/form-data" onSubmit="return validar_campos(this)">
<table border="0" bgcolor="#EFEFEF" cellspacing="5">-->
<!--<td><div align="right"><strong> Fecha Registro</strong></div></td>
<td><div align="left">
<input name="dia2" type="text" id="dia2" value="<?php echo date("d"); ?>" size="2" maxlength="2" readonly>
<input name="mes2" type="text" id="mes2" value="<?php echo date("m"); ?>" size="2" maxlength="2" readonly>
<input name="ano2" type="text" id="ano2" value="<?php echo date("Y"); ?>" size="4" maxlength="4" readonly>
</div></td>
</tr> -->
<form name="formulario" method="post" action="" enctype="multipart/form-data" onSubmit="return validar_campos(this)">
<table width="700" border="4" cellspacing="5" bgcolor="#EFEFEF">
<tr>
<td class="tdcen">Cedula de Ciudadania:</td>
<td class="tdizq"><input type="text" name="ced" value="<? echo $cedula?>"size="50" maxlength="40" readonly></td>
</tr>
<tr>
<td class="tdcen"><b>Numero de Proceso:</td>
<td class="tdizq"><input type="text" name="numeroproceso" value="<? echo $numpro ?>"size="50" maxlength="40"></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="13" 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">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">Descargar imagen</td>
<td colspan="1" bgcolor="#EFEFEF" align="left"><center><span class="label2"><?php
echo "<a href='descargar_archivos_vigi_judicial.php?cedula=$cedula&numpro=$numpro'>Realizar Descarga</a>"?></span></center></td>
</tr>
</table><br>
</form>
</td>
</tr>
<br>
<td class="tdcen" colspan="2">
<input name="button" class="irmenu" type="button" onClick="javascript:window.close()" value="REGRESAR AL LISTADO">
</div></td>
</body>
</html>
<?php
$result= mysql_query('SELECT id, cedula,actuacion,fecha,tipo_orden,codigo_abogado FROM actuaciones_vigilancia_judicial WHERE cedula = "'.$_GET["ced2"].'" and numero_proceso = "'.$_GET["numpro"].'" order by fecha ');
if (!$result) {
die('Error de consulta: ' . mysql_error());
}
if(mysql_num_rows($result) != 0)
{
echo "<center><table width=750 border=1 cellpadding=1 cellspacing=1>
<tr>
<td class='tdtitulo' width='400'>Actuación</td>
<td width='75' class='tdtitulo'>Fecha</td>
<td width='65' class='tdtitulo'>Tipo</td>
<td width='65' class='tdtitulo'>Funcionario</td>
</tr></center>";
while(list($id,$cedula,$actuacion,$fecha,$tipoorden,$abogado) = mysql_fetch_row($result))
{
$controlabog = mysql_query('SELECT Nombre_Completo FROM Usuarios WHERE codigo = "'.$abogado.'" ');
if (!$controlabog) {
die('Invalid query sucursal: ' . mysql_error());
}
$num=mysql_num_rows($controlabog);
list($nombabog) = mysql_fetch_row($controlabog);
echo "<tr class=lista>
<td class='tdfulljusti'>$actuacion</td>
<td class='tdfull'>$fecha</td>
<td class='tdfull'>$tipoorden</td>
<td class='tdfull'>$nombabog</td>
</tr>";
}
}
?>