File: /home/asjudine/www/acalidad/revision_revistas.php
<?
require_once("../Conectarse.php");
////////////////
$Recordset2 = mysql_query("SELECT * FROM sucursal WHERE nombre != 'PROMOCION ESCUELAS' and nombre !='COASJUDINET' and nombre != 'CORONEL ALBA' and nombre != 'MAYOR DURAN DUARTE HERSON FELI' order by nombre");
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
////////////////
?>
<!DOCTYPE HTML>
<html>
<head>
<title>REVISION DE REVISTAS POR SUCURSAL</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;}
.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;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.tdizq{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{padding: 1px; border: 1px solid #a0a0a0;}
.td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
.boton1{width:30%;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: #FFFFF4;}
.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;}
</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 AbreGral()
{
var menu;
menu=window.open("mostrar_ingreso.php","","toolbar=no,scrollbars=no,width=800,height=500,status=yes");
menu.focus();
var ventana = window.self;
ventana.opener = window.self;
ventana.close();
}
</script>
</head>
<body onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<form name="formulario" action="" method="post">
<tr>
<td>
<form name="formulario" action="" method="post">
<table width="480" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><fieldset><table width="541" border="6" align="center" cellpadding="2" cellspacing="2" >
<tr>
<td colspan="2"class="titulo">LISTADO PROCESOS PREJURIDICOS POR REVISTAS</td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="22" colspan="2" bgcolor="#FFFFFF" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<td class="td">SELECCIONE LA SUCURSAL
<td class="tdizq"><SELECT NAME="sucursal">
<OPTION value="">--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>
<td colspan="2">
<input name="menu2" type="button" class="boton1" id="menu2" onClick="window.location.href='menu_control_calidad.php'" value="IR AL MENU">
<input name="consultar" id="consultar" type="submit" class="boton1" value="Consultar">
</td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</form>
</body>
</html>
<?php
require_once("../Conectarse.php");
$sucu =$_GET["sucu"] ;
$nom =$_GET["nom"] ;
$ced =$_GET["ced"] ;
$diser=$_POST["nombredir"];
if(isset($_POST["consultar"]))
{
///////////
//inicializo el criterio y recibo cualquier cadena que se desee buscar
$criterio = "";
$txt_criterio = "";
if ($_GET["criterio"]!=""){
$txt_criterio = $_GET["criterio"];
$criterio = " and codigo_abogado LIKE '%".$txt_criterio."%' ";
}
$res = mysql_query('SELECT cedula,numero_proceso,tipo_proceso,numero_contrato,tipo_contrato,codigo_sucursal, clase_negocio,despacho_judicial,ciudad_despacho,tipo_afiliado,calidad_juridica_afiliado,tipo_orden,numero_carpeta, ultimo_folio,codigo_abogado,fecha_actuacion,actividad_proceso,estado_proceso,fecha_diagnostico FROM procesos WHERE codigo_sucursal = "'.$_POST[sucursal].'" ');
if (!$res) {
die('Invalid query: ' . mysql_error());
}
//////////fin consulta con limites
if(isset($txt_criterio))
{
if($txt_criterio)
{
$sql = mysql_query('SELECT nombre_completo FROM asjudinet_abogados WHERE vigentes = "1" and codigo_abogado = "' ."$txt_criterio". '" order by nombre');
if (!$sql) {
die('Invalid query: ' . mysql_error());
}
list($nombre) = mysql_fetch_row($sql);
echo "<br>Valor filtro: <b>".$txt_criterio." ".$nombre."<b>";
}
}
echo "</font></div>";
echo "<table align='center' width='850' border='0' cellspacing='1' cellpadding='0'>";
?>
<tr>
<td class='tdtitulo'>Cédula</td>
<td class='tdtitulo'>Proceso</td>
<td class='tdtitulo'>Abogado</td>
<td class='tdtitulo'>Fecha</td>
<td class='tdtitulo'>Tipo Orden</td>
<?php
while(list($cedula, $numero_proceso, $tipo_proceso, $numero_contrato, $tipo_contrato, $codigo_sucursal, $clase_negocio, $despacho_judicial, $ciudad_despacho, $tipo_afiliado, $calidad_juridica_afiliado, $tipo_orden, $numero_carpeta, $ultimo_folio, $codigo_abogado, $fecha_actuacion, $actividad_proceso, $estado_proceso, $diag) = mysql_fetch_row($res))
{
///////////////ESTADO 10 ES PARA QUE APAREZCA A LOS DIRECTORES DE SERVICIO
$actuaciones = mysql_query('SELECT cedula,numero_proceso,fecha,codigo_funcionario FROM actuaciones WHERE cedula = "'.$cedula. '" and numero_proceso = "' .$numero_proceso. '" and (tipo_orden = "REVISTA" || tipo_orden = "MEMORIAL" || tipo_orden = "AUDIENCIA")and (estado = "10" || estado = "")');
if (!$actuaciones) {
die('Invalid query: ' . mysql_error());
}
list($ced2, $numpro, $fecha, $codigo_abogado2) = mysql_fetch_row($actuaciones);
if ($ced2 > 0 )
{
$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);}
$sql = mysql_query('SELECT nombre_completo,sucursal FROM asjudinet_abogados WHERE vigentes = "1" and codigo_abogado = "'.$codigo_abogado.'" order by nombre_completo');
if (!$sql) {
die('Invalid query: ' . mysql_error());
}
list($nombre_abogado,$sucu) = mysql_fetch_row($sql);
$sumtota = $sumtota + 1;
?>
<!-- tabla de resultados -->
<tr bgcolor="#FFFFCC" onMouseOver="this.style.backgroundColor='#CCFF99';this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#FFFFCC'"o"];" onClick="window.open('consulta_procesos_revistas_direct.php?proceso=<? echo $numpro; ?>&cedula=<? echo $ced2; ?>','','top=20,left=100,toolbar=no,scrollbars=yes,width=790,height=600,status=yes')">
<td class="campos"><? echo $ced2; ?></td>
<td class="campos"><? echo $numpro; ?></td>
<td class="campos"><? echo $nombre_abogado; ?></td>
<td class="campos"><? echo $fecha; ?></td>
<td class="campos"><? echo $tipo_orden; ?></td>
</tr>
<!-- fin tabla resultados -->
<?
}//fin if
}//fin while
echo "</table>";
//////////a partir de aqui viene la paginacion
?>
<?
echo "<TABLE width='200' border='0' align='center' cellpadding ='0' cellspacing='1'>
<TR>
<td class='tdtitulo'>TOTAL</td>";
printf("<tr>
<td class='tdfull'>".$sumtota."</td>");
}
?>
</td></tr>
</table>
</html>