File: /home/asjudine/public_html/avigilajudicial/formulario_ingreso_revista.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, fecha_actuacion, estado_proceso FROM procesos WHERE identificacion_demandante = "'.$_GET["ced2"].'" 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_proceso, $codigo_supervisor_proceso, $fecha_actuacion, $estado_proceso) = mysql_fetch_row($control);
if($actividad_proceso == 'A')
{
$actividad_proceso = 'ACTIVO';
}
else $actividad_proceso = 'INACTIVO';
if($estado_proceso == '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);
//se Comenta Por si pruebas
/*$abogado = mysql_query('SELECT nombre_completo FROM asjudinet_externos WHERE codigo_abogado = "' ."$codigo_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;}
.tdc{background-color: #FCF8D8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.marquee{background-color: #ffffff; color: #912828; font-size: 15px; width:400px;}
.tdlittle{background-color: #e5e5e5; font-size: 11px; text-align: center;}
.tdbig{width:150px;}
.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 4px; text-align: left; font-size: 12px;}
</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 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="800" 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="800" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tdcen">Identificación Demandante:</td>
<td class="tdizq" colspan="2"><input name="cedula" type="text" id="cedula" 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" readonly=""></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" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Ciudad Proceso:</td>
<td class="tdizq" colspan="2"><input name="ciudad_proceso" type="text" id="ciudad_proceso" value="<?php echo $ciudad_proceso; ?>" size="15" maxlength="15" 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">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" readonly=""></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" readonly=""></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" 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="despacho_judicial" type="text" id="despacho_judicial" value="<?php echo $despacho_judicial; ?>" 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">Medio De Control:</td>
<td class="tdizq" colspan="4"><input name="medio_control" type="text" id="medio_control" value="<?php echo $medio_control; ?>" 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">Naturaleza:</td>
<td class="tdizq"><input name="naturaleza" type="text" id="naturaleza" value="<?php echo $naturaleza; ?>" size="15" maxlength="20" readonly=""></td>
</tr>
<tr>
<td class="tdcen">Nombre Del Apoderado:</td>
<td class="tdizq" colspan="4"><input name="nombre_apoderado" type="text" id="nombre_apoderado" value="<?php echo $nombre_apoderado; ?>" 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>
<?php if($fecha_actuacion != "0000-00-00" || $fecha_actuacion != "" ){ ?>
<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_actuacion; ?>" size="10" maxlength="10" readonly=""></td>
</tr>
<?php } ?>
<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>
<?php if($calidad != ""){ ?>
<td class="tdcen">Calidad:</td>
<td class="tdizq" colspan="2"><input name="calidad" type="text" id="calidad" value="<?php echo $calidad; ?>" size="15" maxlength="15" readonly=""></td>
<?php } ?>
<?php if($prioridad != ""){ ?>
<td class="tdcen">Prioridad:</td>
<td class="tdizq"><input name="prioridad" type="text" id="prioridad" value="<?php echo $prioridad; ?>" size="15" maxlength="25" readonly=""></td>
<?php } ?>
</tr>
<?php if($ruta_archivo != ""){ ?>
<tr>
<td class="tdcen">Descargar imagen</td>
<td colspan="4" bgcolor="#EFEFEF" align="left"><center><span class="label2"><?php
echo "<a href='descargar_archivos_vigi_judicial.php?cedula=$cedula_demandante&numpro=$numero_proceso'>Realizar Descarga Ultimo Archivo Subido</a>"?></span></center></td>
</tr>
<?php } ?>
<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>
</fieldset></td>
</tr>
<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>
<input name="ultimo_folio" type="hidden" value="<?php echo $ultimo_folio; ?>">
<input name="cedula" type="hidden" value="<?php echo $cedula_demandante; ?>">
<input name="numero_proceso" type="hidden" value="<?php echo $numero_proceso; ?>">
<table width="650" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td colspan="8" class="titulo">INGRESE LOS DATOS DE LA REVISTA JURIDICA</td>
</tr>
<tr>
<!--<td class="tdlittle">FOLIOS</td>
<td class="tdlittle">DEL:</td>
<td class="tdlittle">
<input name="folio1" type="text" id="folio1" size="4" maxlength="4" value="<?php echo $ultimo_folio; ?>" readonly="">
</td>
<td class="tdlittle">AL:</td>
<td class="tdlittle">
<input name="folio2" type="text" id="folio2" size="4" maxlength="4" required>
</td>
<td class="tdlittle">FECHA ACTUACION: </td>
<td class="tdbig" colspan="2">
<input name="dia" type="text" id="dia" value="<?php echo $dia ?>" size="1" maxlength="2" readonly="">
<input name="mes" type="text" id="mes" value="<?php echo $mes ?>" size="1" maxlength="2" readonly="">
<input name="ano" type="text" id="ano" value="<?php echo $ano ?>" size="2" maxlength="4" readonly="">
</td>-->
</tr>
<tr>
<td colspan="7" rowspan="2" ><textarea name="actuacion" cols="80" rows="3" id="actuacion" required></textarea></td>
<td width="15%" class="fecha">Tipo de orden: </td>
</tr>
<tr>
<td>
<select name="ordenes">
<option value="REVISTA">REVISTA</option>
</select></td>
</tr>
<tr>
<td colspan="8" class="marquee"><marquee behavior="alternate" scrolldelay="100">El archivo debe pesar menos de 1MB</marquee></td>
</tr>
<tr>
<td class="tdc">Seleccione El Archivo</td>
<td class="tdc"><input name="archivito" id="archivito" type="file" class="polici3" size="40" maxlength="40"></td>
<td class="tdc" colspan="3"></td>
</tr>
<tr>
<td colspan="8" align="right">
<input class="boton1" name = "submit" type="submit" value="GRABAR REVISTA" onClick="validar_folios()">
<input class="boton1" name="button" type="reset" onclick="formulario.folio1.focus();" value="Limpiar">
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="formulario">
</form>
</body>
</html>
<?php
if(isset($_POST["submit"]))
{
require_once("../Conectarse_.php");
$archivo = $_FILES["archivito"]["tmp_name"];
$tamanio = $_FILES["archivito"]["size"];
$tipo = $_FILES["archivito"]["type"];
$nombre = $_FILES["archivito"]["name"];
/*if($archivo == ""){
echo "<script>alert('Seleccione Imagen');</script>";
}
else
{*/
$fp = fopen($archivo, "rb");
$contenido = fread($fp, $tamanio);
$contenido = addslashes($contenido);
fclose($fp);
//if($codigo_funcionario == $codigo_abogado)
//{
$fechast = date("y").'-'.date("m").'-'.date("d");
//$fecha = ($_POST["dia_act"]."-".$_POST["mes_act"]."-".$_POST["ano_act"]);
//$eldia = $_POST["dia_act"];
//$elmes = $_POST["mes_act"];
//$elano = $_POST["ano_act"];
//$fecha_actuacion = ($_POST["eldia"]."-".$_POST["elmes"]."-".$_POST["elano"]);
$nuevafecha = $_POST["ano"]."-".$_POST["mes"]."-".$_POST["dia"];
//$abogado = mysql_query('SELECT codigo_abogado, cedula FROM asjudinet_externos WHERE codigo_abogado = "' ."$codigo_abogado". '" ');
//if (!$abogado) {
// die('Invalid query5: ' . mysql_error());
//}
//list($codigo_abogado, $cedu) = mysql_fetch_row($abogado);
$nombre=$_FILES['archivito']['name'];
$guardado=$_FILES['archivito']['tmp_name'];
if(!file_exists('archivos')){
mkdir('archivos',0777,true);
if(file_exists('archivos')){
if(move_uploaded_file($guardado, 'archivos/'.$nombre)){
echo "Archivo guardado con exito";
}else{
echo "Archivo no se pudo guardar";
}
}
}else{
if(move_uploaded_file($guardado, 'archivos/'.$nombre)){
echo "Archivo guardado con exito";
}else{
echo "Archivo no se pudo guardar";
}
}
$ruta_archivo = "archivos/$nombre";
//BUSCAR ABOGADO
//$busca_abogado = mysql_query('SELECT codigo, cargo, Nombre_Completo FROM Usuarios WHERE cedula = "'.$_GET["cc"].'" ');
//list($codigo_abogado, $cargo_abogado, $nombre_abogado) = mysql_fetch_row($busca_abogado);
//if($cargo_abogado = "ABOGADO")
//{
/*$insertar_actua = mysql_query("INSERT INTO actuaciones_vigilancia_judicial (cedula, numero_proceso, actuacion, fecha, tipo_orden, codigo_abogado,nombre, contenido, tipo, estado, ruta_archivo) VALUES ('".$_POST["cedula"]."', '".$numero_proceso."', '".$_POST["actuacion"]."', '".$fechast."', '".$_POST["ordenes"]."', '".$codigo_abogado."', '".$nombre."', '".$contenido."', '".$tipo."', '0', '".$ruta_archivo."')");
//////el estado 10 es para que aparezca la revista a los directores de servicio */
$insertar_actua = mysql_query("INSERT INTO actuaciones_vigilancia_judicial (cedula, numero_proceso, actuacion, fecha, tipo_orden, codigo_abogado, codigo_supervisor, nombre, tipo, ruta_archivo, estado) VALUES ('".$_POST["cedula"]."', '".$numero_proceso."', '".$_POST["actuacion"]."', '".$fechast."', '".$_POST["ordenes"]."', '".$codigo_abogado_proceso."', '".$codigo_supervisor_proceso."', '".$nombre."', '".$tipo."', '".$ruta_archivo."', '0')");
//////el estado 10 es para que aparezca la revista a los directores de servicio
if (!$insertar_actua) {
die('Invalid query insert : ' . mysql_error());
}
/*
$pro = mysql_query("UPDATE procesos set fecha_actuacion = '" . $fechast. "', tipo_orden = 'REVISTA', nombre = '".$nombre."', contenido='".$contenido."', tipo='".$tipo."' WHERE identificacion_demandante = '" . $_GET["ced2"] . "' and numero_proceso = '" . $_GET["numpro"] . "' ");
*/
$pro = mysql_query("UPDATE procesos set fecha_actuacion = '" . $fechast. "', tipo_orden = 'REVISTA', nombre = '".$nombre."', tipo='".$tipo."', ruta_archivo = '".$ruta_archivo."' WHERE identificacion_demandante = '".$_GET["ced2"]."' and numero_proceso = '".$_GET["numpro"]."' ");
if (!$pro) {
die('Invalid query update ultimo : ' . mysql_error());
}
/*
$godr = mysql_query('SELECT MAX(id) FROM actuaciones_vigilancia_judicial WHERE cedula = "'.$_GET["ced2"].'" and numero_proceso = "'.$_GET["numcon"].'" ');
if (!$godr) {
die('Error de godr: ' . mysql_error());
}
list($id_max)=mysql_fetch_row($godr);
$pro = mysql_query("UPDATE actuaciones_vigilancia_judicial set nombre = '".$nombre."', contenido='".$contenido."', tipo='".$tipo."' WHERE cedula = '" . $_GET["ced2"] . "' and numero_proceso = '" . $_GET["numcon"] . "' and id = '".$id_max."' ");
if (!$pro) {
die('Invalid query update ultimo : ' . mysql_error());
}
*/
///////////////////////////
//// ENVIO DE MENSAJES ////
///////////////////////////
// $actuacion_enviada = $_POST['actuacion'];
// $email_jefe = 'gerenciacontractuallegal@gmail.com';
//
// $to = $email_jefe.','.$email_apoderado.','.$email_supervisor;
// $subject = 'Movimiento Proceso';
//
// $message = "
// <html>
// <head>
// <title>HTML</title>
// </head>
// <body>
// <h1>N° Proceso: ".$numero_proceso."</h1>
// <h2>Cedula Demandante: ".$cedula_demandante."</h2>
// <h2>Nombre Demandante: ".$nombre_demandante."</h2>
// <p>Actuacion/Movimiento: ".$actuacion_enviada."</p>
// <p>Fecha Gestion: ".$fechast."</p>
// </body>
// </html>";
//
//
// $headers = 'MIME-Version: 1.0' . "\r\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// $headers .= "From:" . $email_jefe. "\r\n" . "Reply-To: " . $email_jefe;
//
//
// mail($to, $subject, $message, $headers);
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
/*
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
require('PHPMailer\PHPMailer');
require('PHPMailer\SMTP');
require('PHPMailer\Exception');
// Instantiation and passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTPDebug = 0; // Enable verbose debug output
$mail->isSMTP(); // Send using SMTP
$mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '@gmail.com'; // SMTP username
$mail->Password = ''; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted
$mail->Port = 587; // TCP port to connect to
//Recipients
$mail->setFrom('joselempresarial@gmail.com', 'Jose');
//$mail->addAddress('joselempresarial@gmail.com', 'Joe User'); // Add a recipient
$mail->addAddress($email_supervisor); // Name is optional
//$mail->addReplyTo('info@example.com', 'Information');
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');
// Attachments
$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
// Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
*/
echo "<script>alert('Los datos fueron grabados correctamente');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
//}
//else
//{
// echo "<script>alert('No puede Guardar datos');</script>";
//}
//}
//else
//{
// echo "<script>alert('Usted no pertenece a este proceso');</script>";
// echo "<script languaje='javascript'>window.close();</script>";
//}
//} //cierre validar que haya imagen
}
/*else
{
echo "<script>alert('Usted no pertenece a este proceso');</script>";
}*/
?>
<?php
$result= mysql_query('SELECT id, cedula,actuacion,fecha,tipo_orden,codigo_abogado,nombre,ruta_archivo 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>
<td width='65' class='tdtitulo'>Archivo</td>
</tr></center>";
while(list($id,$cedula, $actuacion, $fecha, $tipoorden, $abogado, $nombre_archivo, $ruta_archivo) = 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);
if($nombre_archivo == "")
{
echo "<tr class=lista>
<td class='tdfulljusti'>$actuacion</td>
<td class='tdfull'>$fecha</td>
<td class='tdfull'>$tipoorden</td>
<td class='tdfull'>$nombabog</td>
<td class='tdfull'></td>
</tr>";
}
else
{
echo "<tr class=lista>
<td class='tdfulljusti'>$actuacion</td>
<td class='tdfull'>$fecha</td>
<td class='tdfull'>$tipoorden</td>
<td class='tdfull'>$nombabog</td>
<td class='tdfull'><a href='descargar_archivos_vigi_judicial_actuacion.php?id=$id&cedula=$cedula&numpro=$numero_proceso'>Descargar</a></td>
</tr>";
}
}
}
?>