File: /home/asjudine/public_html/modificar_actua_dis_control.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.php");
$dia = date("d");
$mes = date("m");
$ano = date("Y");
$control = mysql_query('SELECT cedula, numero_proceso, tipo_proceso, numero_contrato, tipo_contrato, codigo_sucursal, clase_negocio, despacho_judicial, ciudad_despacho, calidad_juridica_afiliado, tipo_orden, numero_carpeta, ultimo_folio, codigo_abogado, fecha_actuacion, actividad_proceso, estado_proceso,fecha_diagnostico, nombre_contraparte , direccion_contraparte , ciudad_contraparte FROM procesos WHERE cedula = "'.$_GET["id"].'" and numero_proceso = "' . $_GET["proceso"].'" ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
list($cedula, $numero_proceso, $tipo_proceso, $numero_contrato, $tipo_contrato, $codigo_sucursal, $clase_negocio, $despacho_judicial, $ciudad_despacho, $calidad_juridica_afiliado, $tipo_orden, $numero_carpeta, $ultimo_folio, $codigo_abogado, $fecha_actuacion, $actividad_proceso, $estado_proceso,$fecha_diagnostico , $nombrecontra, $direcontra, $ciucontra) = mysql_fetch_row($control);
if($actividad_proceso == 'A'){$actividad_proceso = 'ACTIVO';}else $actividad_proceso = 'INACTIVO';
if($estado_proceso == 'V'){$estado_proceso = 'VIGENTE';}else $estado_proceso = 'HISTORICO';
// $sucursal = mysql_query("select nombre from sucursal where codigo = $codigo_sucursal", $dbi);
$sucursal = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "' ."$codigo_sucursal". '" ');
if (!$sucursal) {
die('Invalid query: ' . mysql_error());
}
if($sucursal){list($ns) = mysql_fetch_row($sucursal);}
// $abogado = mysql_query("select codigo_abogado, nombre_completo from asjudinet_abogados where codigo_abogado = $codigo_abogado", $dbi);
$abogado = mysql_query('SELECT codigo_abogado, nombre_completo FROM asjudinet_abogados WHERE codigo_abogado = "' ."$codigo_abogado". '" ');
if (!$abogado) {
die('Invalid query: ' . mysql_error());
}
if($abogado){list($codigo_abogado, $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 = ($uno."-".$dos."-".$tres);
$fd = $fecha_diagnostico;
// $sqlnom = "select nombre from asjudinet_cartera where cedula = $cedula";
// $control = mysql_query($sqlnom, $dbi) or die(mysql_error());
$contr85 = mysql_query('SELECT nombre, numerocontrato, tipocontrato FROM cartera_serviasjudinet WHERE cedula = "' . $_GET["id"] . '" and numerocontrato = "'.$_GET["contrato"].'"');
if (!$contr85) {
die('Invalid query: ' . mysql_error());
}
list($nombre_completo, $numero_contrato, $tipo_contrato) = mysql_fetch_row($contr85);
if((mysql_num_rows($contr85)==0))
{
$contr85 = mysql_query('SELECT nombre, numero_contrato_titular, tipo_contrato_titular FROM beneficiarios WHERE cedula = "' . $HTTP_GET_VARS["id"] . '" ');
if (!$contr85) {
die('Invalid query: ' . mysql_error());
}
list($nombre_completo, $numero_contrato, $tipo_contrato) = mysql_fetch_row($contr85);
}
}
//MUESTRA EL ULTIMO FOLIO, LO TRAE DE ACTUACIONES,LA ULTIMA ACTUACION
$result = mysql_query('SELECT folio2,tipo_orden FROM actuaciones WHERE cedula = "' . $HTTP_GET_VARS["id"] . '" and numero_proceso = "' . $HTTP_GET_VARS["proceso"] . '" order by fecha ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if(mysql_num_rows($result) != 0)
{
while(list($folio_2,$tipo_o) = mysql_fetch_row($result))
{
$tipo_ordenp = $tipo_o;
$fol2 = $folio_2;
}
}
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton { background-color: #FFCCCC; color:#FFFFFF; width:150px; border: 4px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 13px; font-family: Arial; color:#0000CC; display: block;}
.fecha {background-color: #CCFFCC; font-size: 12px; font-family: Arial; color: #000099; width:10px display: block;}
.campo {background-color: #FFFFCC; border:1px solid #990000;}
.lista { background-color:#99FFFF; font-family: Arial; font-size: 11px; color: #990000;}
.label {background-color: #00CCFF ; font-size: 14px; font-family: Arial; color:#0000CC; display: block;}
.area {background-color: #CCFFCC; font-size: 13px; width:40px font-family: Arial; color:#0000CC; display: block;}
.variables {background-color: #CCFFCC; font-size: 12px; font-family: Arial; color: #003333 ; width:10px display: block; border: 2px solid #006633;}
.sel { background-color:#DDFFFF; width:400px; border: 1px solid #0099FF; font-family:Arial; font-style:italic; color:#990000 }
.seleccion { background-color: #CCFFCC; width:340px; border: 1px solid #0099FF; font-family:Arial; color:#990000;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; }
body {
background-image: url(fondo_argollado.gif);
}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
-->
</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">
<!--
function validar()
{
var uf, pf, sf=0;
uf = formulario.ultimo_folio.value;
pf = formulario.folio1.value;
sf = parseInt(formulario.ultimo_folio.value)+1;
if(!(pf == uf || pf == sf))
{
alert('El folio ingresado debe ser igual o inmediatamente posterior al último');
formulario.folio1.focus();
return (false);
}
if (formulario.folio2.value == "")
{
alert("Falta ingresar el Folio2");
formulario.folio2.focus();
return (false);
}
if(formulario.folio2.value < pf)
{
alert('El folio2 no debe ser menor que el folio1');
formulario.folio2.focus();
return (false);
}
if (formulario.actuacion.value == "")
{
alert("Falta ingresar la actuación");
formulario.actuacion.focus();
return (false);
}
if (formulario.codigo_funcionario.value == "")
{
alert("Falta seleccionar el nombre del funcionario");
formulario.codigo_funcionario.focus();
return (false);
}
return (true);
}
//--></script>
<SCRIPT LANGUAGE='JavaScript'>
var default1 = "VENTANA PARA EL INGRESO DE REVISTAS "; // 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 record de actuaciones";
var text3 = "Revise bien las actuaciones y los número de folios";
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()">
<form name="consulta" action="" method="post">
<table width="671" height="383" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td width="662" class="titulos"><div align="center">VISUALIZACION DE DATOS DEL PROCESO SELECCIONADO </div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="19" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td height="42" bgcolor="#FFFFFF"><fieldset>
<legend><span class="texto">Datos del proceso:</span></legend>
<table width="662" border="0" cellspacing="1" cellpadding="0">
<tr bgcolor="#FFFFFF">
<td width="218"><span class="label">Cédula (Titular-Beneficiario):</span></td>
<td colspan="2"><input name="cedula" type="text" class="campo" id="cedula" value="<?php echo $cedula; ?>" size="15" maxlength="15" readonly=""></td>
<td width="117"><span class="label">Proceso:</span></td>
<td><input name="numero_proceso" type="text" class="campo" id="numero_proceso" value="<?php echo $numero_proceso; ?>" size="6" maxlength="7" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Nombre completo:</span></td>
<td colspan="4"><input name="nombre" type="text" class="campo" id="nombre" value="<?php echo $nombre_completo; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Tipo de proceso:</span></td>
<td colspan="2"><input name="tipo_proceso" type="text" class="campo" id="tipo_proceso" value="<?php echo $tipo_proceso; ?>" size="20" maxlength="20" readonly=""></td>
<td><span class="label">Contrato:</span></td>
<td><input name="numero_contrato" type="text" class="campo" id="numero_contrato" value="<?php echo $numero_contrato; ?>" size="6" maxlength="7" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Sucursal:</span></td>
<td colspan="2"><input name="codigo_sucursal" type="text" class="campo" id="tipo_contrato" value="<?php echo $codigo_sucursal; ?>" size="2" maxlength="2" readonly="">
-
<input name="sucursal" type="text" class="campo" id="sucursal" value="<?php echo $ns; ?>" size="30" maxlength="30" readonly=""></td>
<td><span class="label">Tipo:</span></td>
<td><input name="tipo_contrato" type="text" class="campo" id="tipo_contrato" value="<?php echo $tipo_contrato; ?>" size="4" maxlength="4" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Clase de negocio:</span></td>
<td colspan="4"><input name="clase_negocio" type="text" class="campo" id="clase_negocio" value="<?php echo $clase_negocio; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Despacho judicial:</span></td>
<td colspan="4"><input name="despacho_judicial" type="text" class="campo" id="despacho_judicial" value="<?php echo $despacho_judicial; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Ciudad de Despacho:</span></td>
<td colspan="4"><input name="ciudad_despacho" type="text" class="campo" id="ciudad_despacho" value="<?php echo $ciudad_despacho; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Calidad jurídica afiliado:</span></td>
<td colspan="2"><input name="calidad_juridica" type="text" class="campo" id="calidad_juridica" value="<?php echo $calidad_juridica_afiliado; ?>" size="25" maxlength="50" readonly=""></td>
<td><span class="label">Tipo de orden:</span></td>
<td><input name="tipo_orden" type="text" class="campo" id="tipo_orden" value="<?php echo $tipo_ordenp; ?>" size="15" maxlength="20" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Número carpeta:</span></td>
<td width="60"><input name="numero_carpeta" type="text" class="campo" id="numero_carpeta" value="<?php echo $numero_carpeta; ?>" size="6" maxlength="6" readonly=""></td>
<td width="167"><span class="label">Ultimo folio:</span></td>
<td colspan="2"><input name="ultimo_folio" type="text" class="campo" id="ultimo_folio" value="<?php echo $ultimo_folio; ?>" size="3" maxlength="5" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Abogado:</span></td>
<td colspan="4"><input name="nombre_abogado" type="text" class="campo" id="nombre_abogado" value="<?php echo $nombre_abogado; ?>" size="50" maxlength="50" readonly="">
<input name="codigo_abogado" type="text" class="campo" id="codigo_abogado" value="<?php echo $codigo_abogado; ?>" size="3" maxlength="3" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><span class="label">Fecha última actuación:</span></td>
<td><input name="fecha_actuacion" type="text" class="campo" id="fecha_actuacion" value="<?php echo $fecha_actuacion; ?>" size="10" maxlength="10" readonly=""></td>
<td><span class="label">Actividad del proceso:</span></td>
<td colspan="2"><input name="actividad_proceso" type="text" class="campo" id="actividad_proceso" value="<?php echo $actividad_proceso; ?>" size="20" maxlength="20" readonly=""></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bordercolor="#ECE9D8"><span class="label">Fecha diagnóstico:</span></td>
<td ><input name="fecha_diagn" type="text" class="campo" value="<?php echo $fd; ?>" size="10" maxlength="10"></td>
<td ><span class="label">Estado del proceso:</span></td>
<td ><input name="estado_proceso" type="text" class="campo" id="estado_proceso" value="<?php echo $estado_proceso; ?>" size="20" maxlength="20" readonly="">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td ><span class="label">Nombre Contraparte:</span></td>
<td colspan="4"><input name="nombrecontra" type="text" class="campo" value="<?php echo $nombrecontra; ?>" size="50" maxlength="0"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bordercolor="#ECE9D8"><span class="label">Direccion Contraparte:</span></td>
<td colspan="2"><input name="direcontra" type="text" class="campo" value="<?php echo $direcontra; ?>" size="40" maxlength="40"></td>
<td bordercolor="#ECE9D8"><span class="label">Ciudad Contraparte:</span></td>
<td ><input name="ciucontra" type="text" class="campo" value="<?php echo $ciucontra; ?>" size="20" maxlength="0"></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
<p align="center"><?php echo "<input type='button' value='Modificar datos del proceso' name=boton class=boton2 onClick =window.open('modificar_datos_procesos.php?id=$cedula&cf=$cf&proceso=$numero_proceso&numcon=$numero_contrato','','top=50,left=100,toolbar=no,scrollbars=yes,width=790,height=520,status=yes')></a>"; ?>
<input name="button2" type="button" class="boton11" onClick="window.location.reload()" value="Actualizar">
<input name="button3" type="button" class="titulos" onClick="window.location.href='requerimientos_ingreso.php?cedula=<?php echo $cedula; ?>&proceso=<?php echo $_GET["proceso"]; ?>'" value="Requerimiento">
</p>
</form>
<?php
$result = mysql_query('SELECT id,folio1,folio2,actuacion,fecha,tipo_orden,codigo_funcionario FROM actuaciones WHERE cedula = "'.$_GET["id"].'" and numero_proceso = "'.$_GET["proceso"].'" order by fecha ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if(mysql_num_rows($result) != 0)
{
echo "<table width=750 border=1 align=center cellpadding=1 cellspacing=1>
<tr>
<td colspan=2><div align=center class=fecha>FOLIOS</span></div></td>
<td colspan=4 bgcolor=#ECE9D8><div align=center class='titulos'>LISTADO DE ACTUACIONES</div></td>
</tr>
<tr align=center>
<td width='34' class=fecha>DEL</td>
<td width='34' class=fecha>AL</td>
<td width='400' class=fecha>Actuación</td>
<td width='75' class=fecha>Fecha</td>
<td width='90' class=fecha>Tipo Orden </td>
<td width='65' class=fecha>Funcionario</td>
</tr>";
while(list($id, $folio1, $folio2, $actuacion, $fecha, $to, $cf) = mysql_fetch_row($result))
{
echo "<tr class=lista>
<td align=center><input type='button' value=$folio1 onClick =window.open('modificar_actuaciones_folios.php?id=$id&ced=$cedula&cf=$cf&proceso=$numero_proceso','','top=50,left=100,toolbar=yes,scrollbars=yes,width=500,height=350,status=yes')></a></td>
<td align=center><input type='button' value=$folio2 onClick =window.open('modificar_actuaciones_folios.php?id=$id&ced=$cedula&cf=$cf&proceso=$numero_proceso','','top=50,left=100,toolbar=yes,scrollbars=yes,width=500,height=350,status=yes')></a></td>
<td><a href=\"modifica_actuacion_estado1.php?id=$id&ced=$cedula&cf=$cf&proceso=$numero_proceso&folio1=$folio1&folio2=$folio2\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$actuacion</a></td>
<td align=center>$fecha</td>
<td align=center>$to</td>
<td align=center>$cf</td></tr>";
}
}
?>
</table>