MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/www/avigilajudicial/modificar_datos_procesos.php
<?php 
require_once("../Conectarse_.php");

$cedula_get = $_GET["ced2"];
$numero_proceso_get = $_GET["numpro"];
		
/*$control = mysql_query('SELECT cedula, numero_proceso, tipo_proceso, sucursal, clase_negocio, despacho_judicial, tipo_orden, codigo_abogado, fecha_actuacion, estado_proceso, nombre_contraparte, estado FROM vigilancia_judicial WHERE cedula = "'.$_GET["cedula"].'" ');*/

$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, nombre_supervisor, codigo_abogado, codigo_supervisor, observaciones, estado_proceso, calidad, prioridad FROM procesos WHERE identificacion_demandante = "'.$_GET["ced2"].'" and numero_proceso = "'.$_GET["numpro"].'" ');
if (!$control) {
	die('Invalid query 1: ' . mysql_error());
}
		
		
$num=mysql_num_rows($control); 
		
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, $nombre_supervisor, $codigo_abogado, $codigo_supervisor, $observaciones, $estado_proceso, $calidad, $prioridad) = mysql_fetch_row($control);
		





$Recordset2 = mysql_query('SELECT * FROM sucursal order by nombre'); 
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);


$Recordset1 = mysql_query('SELECT * FROM Usuarios WHERE (Cargo="ABOGADO") order by Nombre_Completo'); 
if (!$Recordset1) {
	die('Invalid query: ' . mysql_error());
} 
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);



$Recordset4 = mysql_query('SELECT * FROM Usuarios WHERE (Cargo="SUPERVISOR" || Cargo="ABOGADO") order by Nombre_Completo'); 
if (!$Recordset4) {
	die('Invalid query: ' . mysql_error());
} 
$row_Recordset4 = mysql_fetch_assoc($Recordset4);
$totalRows_Recordset4 = mysql_num_rows($Recordset4);


//Busca Supervisor
$busca_supervisor = mysql_query('SELECT Nombre_Completo, codigo FROM Usuarios WHERE codigo = "'.$codigo_supervisor.'" ');
if (!$busca_supervisor) {   
	die('Invalid query sucursal: ' . mysql_error());
} 
list($nomsupervisor, $codsupervisor) = mysql_fetch_row($busca_supervisor);
  
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Registro de Formulario Juridico</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-color:#EAEAEA;font-family:Geneva, Arial, Helvetica, sans-serif;}
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; text-align:center;}
    
/*Dif*/
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 13px;}
td{border: 1px solid #a0a0a0;}
.td{background-color: #e5e5e5; padding: 1px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
.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:150px;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: 1px;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;}
.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;}
    
.tdactua{background-color: #ffffff;color: #000; font-size: 12px; font-family: sans-serif; text-align: justify;}

</style>
-->
	
	
	
	<script>
function valida_envia() {

 	if(document.frm.nombre_demandante.value == "") {
  		alert("Por favor Escriba el nombre");
  		document.frm.nombre_demandante.focus();
  		return false;
 	}
	
	if(document.frm.numero_proceso.value == "") {
  		alert("Por favor Escriba el nombre");
  		document.frm.numero_proceso.focus();
  		return false;
 	}
 
 	return true;
}
</script>
	
</head>
 
<body bgcolor="#EFEFEF" text="#000000" topmargin="0" leftmargin="0">

<?php include('header.php'); ?>		
	
<h3 class="titulo">MODIFICAR  DATOS</h3>
       


 


<form action=""  method="post" onsubmit="return valida_envia()" enctype="multipart/form-data" name="frm" id="frm">
<table width="800" border="0" align="center" cellpadding="2" cellspacing="2">


    <tr>
        <td class="tdcen">Identificación Demandante:</td>
        <td class="tdizq" colspan="2"><input name="cedula_demandante" type="text" id="cedula_demandante" value="<?php echo $cedula_demandante; ?>" size="15" maxlength="15" readonly=""></td>
        <td class="tdcen">Proceso:</td>
        <td class="tdizq"><input name="numero_proceso" type="text" id="numero_proceso" value="<?php echo $numero_proceso; ?>" size="25" maxlength="25"></td>
    </tr>
    <tr>
        <td class="tdcen">Nombre Demandante:</td>
        <td class="tdizq" colspan="4"><input name="nombre_demandante" type="text" id="nombre_demandante" value="<?php echo $nombre_demandante; ?>" size="50" maxlength="50"></td>
    </tr>
	<tr>
		<td class="tdder">Ciudad del Proceso:</td>
		<td class="tdizq" colspan="2"><input name="muestra_ciudad_proceso" type="text" id="muestra_ciudad_proceso" value="<?php echo $ciudad_proceso; ?>" size="15" maxlength="15" readonly=""></td>
		<td class="tdizq">
			<select name="ciudad_proceso">
				<option value="">--SELECCIONE SUCURSAL--</option>
				<?php
				do {  
				?>
				<option value="<?php echo $row_Recordset2['codigo']; ?>"><?php echo $row_Recordset2['nombre']; ?></option>
				<?php
				} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
				$rows = mysql_num_rows($Recordset2);
				if($rows > 0) {
					mysql_data_seek($Recordset2, 0);
					$row_Recordset2 = mysql_fetch_assoc($Recordset2);
				}
				?>
			</select>
		</td>
	</tr>
		
	<tr>
        <td class="tdcen">Direccion Gestion:</td>
        <td class="tdizq" colspan="4"><input name="direccion_gestion" type="text" id="direccion_gestion" value="<?php echo $direccion_gestion; ?>" size="70" maxlength="70"></td>
    </tr>
		
	<tr>
        <td class="tdcen">Identificacion Demandado:</td>
        <td class="tdizq" colspan="2"><input name="cedula_demandado" type="text" id="cedula_demandado" value="<?php echo $cedula_demandado; ?>" size="15" maxlength="15"></td>
		<td class="tdcen" colspan="2"></td>
    </tr>
	<tr>
        <td class="tdcen">Nombre Demandado:</td>
        <td class="tdizq" colspan="4"><input name="nombre_demandado" type="text" id="nombre_demandado" value="<?php echo $nombre_demandado; ?>" size="70" maxlength="70"></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="despacho_judicial" type="text" id="despacho_judicial" value="<?php echo $despacho_judicial; ?>" size="50" maxlength="50"></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">Medio De Control:</td>
        <td class="tdizq" colspan="4"><input name="medio_control" type="text" id="medio_control" value="<?php echo $medio_control; ?>" size="70" maxlength="70"></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">Naturaleza:</td>
        <td class="tdizq" colspan="4"><input name="naturaleza" type="text" id="naturaleza" value="<?php echo $naturaleza; ?>" size="15" maxlength="20"></td>
    </tr>
    
    
	<tr>
        <td class="tdcenroja">Nombre Del Apoderado:</td>
        <td class="tdizq" colspan="4"><input name="muestra_nombre_apoderado" type="text" id="muestra_nombre_apoderado" value="<?php echo $nombre_apoderado; ?>" size="50" maxlength="50" readonly="">
		</td>
    </tr>
	<tr>
		<td class="tdcen">Nombre Del Apoderado </td>
		<td class="tdizq" colspan="4">
		<select NAME="nombre_apoderado" id="nombre_apoderado" class="roja">
			<option value="" class="roja">--Nombre Apoderado--</option>
			<?php
				do {  
			?>
			<option value="<?php echo $row_Recordset1['codigo']?>"><?php echo $row_Recordset1['Nombre_Completo']?></option>
			<?php
				} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
				$rows = mysql_num_rows($Recordset1);
				if($rows > 0) {
				mysql_data_seek($Recordset1, 0);
				$row_Recordset1 = mysql_fetch_assoc($Recordset1);
				}
			?>
		</select>
		</td>
	</tr>	
	
	
	
	<tr>
        <td class="tdcenroja">Nombre Del Supervisor:</td>
        <td class="tdizq" colspan="4"><input name="muestra_nombre_supervisor" type="text" id="muestra_nombre_supervisor" value="<?php echo $nomsupervisor; ?>" size="50" maxlength="50" readonly="">
		</td>
    </tr>
	<tr>
		<td class="tdcen">Nombre Del Supervisor </td>
		<td class="tdizq" colspan="4">
		<select NAME="nombre_supervisor" id="nombre_supervisor" class="roja">
			<option value="" class="roja">--Nombre supervisor--</option>
			<?php
				do {  
			?>
			<option value="<?php echo $row_Recordset4['codigo']?>"><?php echo $row_Recordset4['Nombre_Completo']?></option>
			<?php
				} while ($row_Recordset4 = mysql_fetch_assoc($Recordset4));
				$rows = mysql_num_rows($Recordset4);
				if($rows > 0) {
				mysql_data_seek($Recordset4, 0);
				$row_Recordset4 = mysql_fetch_assoc($Recordset4);
				}
			?>
		</select>
		</td>
	</tr>
		
		

    <tr>
        <td class="tdcen">Estado del proceso:</td>
        <td class="tdizq" colspan="4">
			<input name="muestra_estado_proceso" type="text" id="muestra_estado_proceso" value="<?php echo $estado_proceso; ?>" size="15" maxlength="15" readonly="">
			<select NAME="estado_proceso" id="estado_proceso">
				<option value="">--ESTADO PROCESO--</option>
				<option value="VIGENTE">VIGENTE</option>
				<option value="HISTORICO">HISTORICO</option>
			</select>
        </td>
    </tr>
		
		
		
	<tr>
		<td class="tdcen">Calidad:</td>
        <td class="tdizq" colspan="4">
			<input name="muestra_calidad" type="text" id="muestra_calidad" value="<?php echo $calidad; ?>" size="15" maxlength="15" readonly="">
			<select name="calidad" id="calidad">
		  		<option value="">SELECCIONE CALIDAD</option>
		  		<option value="DEMANDANTE">DEMANDANTE</option>
		 		<option value="DEMANDADO">DEMANDADO</option>
	 		</select>
		</td>
	</tr>
	<tr>
        <td class="tdcen">Prioridad:</td>
        <td class="tdizq" colspan="4">
			<input name="muestra_prioridad" type="text" id="muestra_prioridad" value="<?php echo $prioridad; ?>" size="15" maxlength="25" readonly="">
			<select name="prioridad" id="prioridad">
		  		<option value="">SELECCIONE PRIORIDAD</option>
		  		<option value="ALTA">ALTA</option>
		 		<option value="MEDIA">MEDIA</option>
				<option value="BAJA">BAJA</option>
	 		</select>
		</td>
    </tr>
		
		
	<tr>
        <td class="tdcen">Observaciones:</td>
        <td class="tdcen" colspan="6"><textarea id="observaciones" name="observaciones" rows="4" cols="90"><?php  echo $observaciones; ?></textarea></td>
    </tr>
		
		
	
    

    
    
       
</table>
<div align="center">
	<input name="guardar" type="submit" class="direcciona" id="guardar" value="Guardar " />
</div>
</form>

  
</body>
</html>

<br><br>
<?php


$result= mysql_query('SELECT id, cedula, numero_proceso, actuacion,fecha,tipo_orden,codigo_abogado, alerta1, alerta2, alerta3, alerta4, alerta5, alerta6, nombre 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=800 border=1 cellpadding=1 cellspacing=1>
 
  <tr>
 
    <td class='tdtitulo' width='400'>Actuaci&oacute;n</td>
    <td width='75' class='tdtitulo'>Fecha</td>
    <td width='65' class='tdtitulo'>Tipo</td>
	<td width='65' class='tdtitulo'>Abogado</td>
	<td width='65' class='tdtitulo'>Alertas</td>
	<td width='65' class='tdtitulo'>Archivo</td>
	<td width='65' class='tdtitulo'>Editar</td>
	<td width='65' class='tdtitulo'>Eliminar</td>
  </tr></center>";

 	while(list($id,$cedula,$numpro,$actuacion,$fecha,$tipoorden,$abogado, $alerta1,$alerta2,$alerta3,$alerta4,$alerta5,$alerta6, $nombre_archivo) = 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;
		
		$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'>".strtoupper($actuacion)."</td>
		<td class='tdfull'>$fecha</td>
		<td class='tdfull'>$tipoorden</td>
		<td class='tdfull'>$nombabog</td>
		<td class='tdfull'>$union</td>
		<td class='tdfull'>";
		
		if($nombre_archivo!=""){
		echo "<a href='descargar_archivos_vigi_judicial_actuacion.php?id=$id&cedula=$cedula&numpro=$numero_proceso'>Descargar</a>";
		}else{
			echo "Sin info";
		}
		echo "</td>
		<td class='tdfull'><a href='editar_revista.php?cedula=$cedula&numpro=$numpro&id=$id'><img src='img/edit.png'/></a></td>
		<td class='tdfull'><a href='eliminar_revista.php?cedula=$cedula&numpro=$numpro&id=$id'><img src='img/delete.png'/></a></td>
		</tr>";
		
		
		
   }
	
	//
}
?>


<!--

-->

















<?php
				

if(isset($_POST["guardar"]))
{
	$busca_nombre_ciudad = mysql_query('SELECT nombre, codigo FROM sucursal WHERE codigo = "'.$_POST["ciudad_proceso"].'" ');
	if (!$busca_nombre_ciudad) {   
		die('Invalid query sucursal: ' . mysql_error());
	}  
	list($nombre_ciudad, $codigo_ciudad) = mysql_fetch_row($busca_nombre_ciudad);
	echo $nombre_ciudad;
	echo $_POST["ciudad_proceso"];
	
	$busca_nombre_abogado = mysql_query('SELECT Nombre_Completo, codigo FROM Usuarios WHERE codigo = "'.$_POST["nombre_apoderado"].'" ');
	if (!$busca_nombre_abogado) {   
		die('Invalid query sucursal: ' . mysql_error());
	} 
	list($nomabogado, $codabogado) = mysql_fetch_row($busca_nombre_abogado);
	
	
	$busca_nombre_supervisor = mysql_query('SELECT Nombre_Completo, codigo FROM Usuarios WHERE codigo = "'.$_POST["nombre_supervisor"].'" ');
	if (!$busca_nombre_supervisor) {   
		die('Invalid query sucursal: ' . mysql_error());
	} 
	list($nomsupervisor, $codsupervisor) = mysql_fetch_row($busca_nombre_supervisor);
	
	
	
	//if ($cedu==$_GET["cedula"]);
	if($_POST["ciudad_proceso"]!= ""){
		$mssql = mysql_query("UPDATE procesos SET ciudad_proceso = '".$nombre_ciudad."'  WHERE identificacion_demandante = '".$cedula_get."' and numero_proceso = '".$numero_proceso_get."' ");
		if (!$mssql) {die('Invalid query update: ' . mysql_error());}
	}
	
	if($_POST["nombre_apoderado"]!= ""){
		$mssql = mysql_query("UPDATE procesos SET nombre_apoderado = '".$nomabogado."', codigo_abogado = '".$codabogado."'  WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
		if (!$mssql) {die('Invalid query update: ' . mysql_error());}
	}
	
	if($_POST["nombre_supervisor"]!= ""){
		$mssql = mysql_query("UPDATE procesos SET nombre_supervisor = '".$nomsupervisor."', codigo_supervisor = '".$codsupervisor."'  WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
		if (!$mssql) {die('Invalid query update: ' . mysql_error());}
	}
	
	
	if($_POST["estado_proceso"]!= ""){
		$mssql = mysql_query("UPDATE procesos SET estado_proceso = '".$_POST["estado_proceso"]."' WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
		if (!$mssql) {die('Invalid query update: ' . mysql_error());}
	}
	
	if($_POST["calidad"]!= ""){
		$mssql = mysql_query("UPDATE procesos SET calidad = '".$_POST["calidad"]."' WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
		if (!$mssql) {die('Invalid query update: ' . mysql_error());}
	}
	
	if($_POST["prioridad"]!= ""){
		$mssql = mysql_query("UPDATE procesos SET prioridad = '".$_POST["prioridad"]."' WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
		if (!$mssql) {die('Invalid query update: ' . mysql_error());}
	}
	
	//con trim quitamos espacios
	$num_de_pro = $_POST["numero_proceso"];
	$proceso_bien = trim($num_de_pro);
	
	//ACTUALIZA PROCESO
	$mssql3 = mysql_query("UPDATE procesos SET identificacion_demandante = '".$_POST["cedula_demandante"]."', numero_proceso = '".$proceso_bien."', nombre_demandante = '".$_POST["nombre_demandante"]."', direccion_gestion = '".$_POST["direccion_gestion"]."', identificacion_demandado = '".$_POST["cedula_demandado"]."', nombre_demandado = '".$_POST["nombre_demandado"]."', despacho_judicial = '".$_POST["despacho_judicial"]."', medio_control = '".$_POST["medio_control"]."', naturaleza = '".$_POST["naturaleza"]."', observaciones = '".$_POST["observaciones"]."' WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
    
	if (!$mssql3) {   
		die('Invalid query procesos: ' . mysql_error());
	}   
	
	
	//ACTUALIZA ACTUACIONES
	$mssql_actuaciones = mysql_query("UPDATE actuaciones_vigilancia_judicial SET cedula = '".$_POST["cedula_demandante"]."', numero_proceso = '".$_POST["numero_proceso"]."' WHERE cedula = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
	if (!$mssql_actuaciones) {   
		die('Invalid query actuaciones: ' . mysql_error());
	} 

	echo "<script>alert('Los datos fueron Modificados');</script>";	  
	echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
	  
	  
}

?>