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/apostventas/consul_lis_inicio.php
<!DOCTYPE HTML>
<html>
<head>
<title>Listado Envio Inicios de Procesos</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: 150px;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 4px;color: #00135F;font-size: 13px;font-weight: 600; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 4px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 4px;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: 11px; font-weight: 700}
    .tdfull{background-color: #fff; color: #000000; padding: 1px; text-align: center; font-size: 11px;}
	.botonnew{width: 90px; height:30px; background-color: #E4E4E4;color: #990000;padding: 1px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;}
    
</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>
<h3 class="titulo">CONSULTA LISTADO DE INICIOS</h3>

<form name="formulario" action="" method="post">
<table width="671" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><fieldset>
<table width="669" border="0" align="center" cellpadding="2" cellspacing="2">
<!--<tr>
<td colspan="14" bgcolor="#0066FF" class="titulos"><div align="center" class="titulos Estilo62">CONSULTA LISTADO DE INICIOS </div></td>
</tr>-->

<tr>
	<td class="tdcen" width="149" >FECHA DESDE</td>
    <td class="tdcen" width="147" scope="col">
      	<input name="fecha1" type="text" class="Estilo66" id="fecha1" value="0000-00-00" size="10" maxlength="10" />
    </td>
 
	<td class="tdcen" width="149" > FECHA HASTA </span></td>
	<td class="tdcen" width="147" scope="col" bgcolor="#CCCCCC">
     	<input name="fecha2" type="text" class="Estilo66" id="fecha2" value="0000-00-00" size="10" maxlength="10" />
  	</td>
</tr>
  

  
<tr>
 	<td colspan="14">
    <input name="consultar" id="consultar" type="submit" class="boton1" value="CONSULTAR">
    <input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='menu_movimiento_procesos.php'" value="IR AL MENU">
    </td>
  </tr>
</table>
</fieldset></td>
  </tr>
</table>  
  
</table>
</fieldset></td>
  </tr>
</table>


</form>
</body>
</html>

<?php

echo "<form name='form' action='' method='post'>";
global $dbi;
require_once("../Conectarse.php");

$linea = '-';

if(isset($_POST["consultar"]))
{
	
if (  $_POST["fecha2"] < $_POST["fecha1"] ){
	echo "<center>Verifique las fechas. Posiblemente la fecha inicial es posterior a la fecha final.</center>";
} 

else 
{
	$control41 = mysql_query('SELECT cedula,fecha,codigo_abogado,numero_proceso FROM actuaciones WHERE fecha>= "'.$_POST["fecha1"].'" and  fecha <= "'.$_POST["fecha2"].'" and tipo_orden = "INICIO" and postventas = "" order by  fecha ');
	if (!$control41) {
		die('Invalid query: ' . mysql_error());
	}	 
		
	if($control41 != "0")
	{
		echo "<TABLE width='1200' border='2' align='center' cellpadding ='2' cellspacing='2'>
       	<TR>
				             
		<TD class='tdtitulo'>CEDULA</TD>
		<TD class='tdtitulo'>CEDULA</TD>
		<TD class='tdtitulo'>PROCESO</TD>				                
		<TD class='tdtitulo' width='80'>FECHA DE INICIO</TD>
		<TD class='tdtitulo'>ABOGADO</TD>
		<TD class='tdtitulo'>TIPO DE ORDEN</TD>
		<TD class='tdtitulo'>TIPO PROCESO</TD>
		<TD class='tdtitulo'>CONTRATO</TD>
		<TD class='tdtitulo'>TIPO</TD>
		<TD class='tdtitulo'>SUCURSAL</TD>
		<TD class='tdtitulo'>CLASE DE NEGOCIO</TD>
		<TD class='tdtitulo'>DESPACHO JUDICIAL</TD>";	
			

 		while(list($ceduli,$fecha_inicio,$codigo_abogado,$numero_proceso) = mysql_fetch_row($control41))
		{
			$mssql = 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 FROM procesos WHERE cedula= "'.$ceduli.'" and (tipo_proceso="JURIDICO"|| tipo_proceso="DISCIPLINARIO" || tipo_proceso="SUBSIDIO FAMILIAR" || tipo_proceso="I.P.C." || tipo_proceso="BONIFICACION JUDICIAL" || tipo_proceso="UNIFICADO" || tipo_proceso="RELIQUIDACION PENSION" || tipo_proceso="CESANTIAS RETROACTIVAS" || tipo_proceso="SIN PENSION 15-20" || tipo_proceso="GENERICO" || tipo_proceso="RELIQUIDACION RETIRO" || tipo_proceso="ACCIONES CONSTITUCIONALES") and numero_proceso=  "'.$numero_proceso.'"');
			if (!$mssql) {
				die('Invalid query primero: ' . mysql_error());
			} 


			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, $to) = mysql_fetch_row($mssql);
									
			if ((mysql_num_rows($mssql)!=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);
				}
	  
				$control4 = mysql_query('SELECT nombre_completo FROM asjudinet_abogados WHERE codigo_abogado = "'.$codigo_abogado.'"');
				if (!$control4) {
				die('Invalid query: ' . mysql_error());
				}	 
	  			list($nombre_abogado) = mysql_fetch_row($control4);
	  

  				//////
  
  				$valida = mysql_query('SELECT nombre FROM cartera_serviasjudinet WHERE cedula = "'.$cedula.'" and numerocontrato= "' .$numero_contrato. '" ');

				if (!$valida) {
				
					die('Invalid query: ' . mysql_error());
				} 
  
  				if ( (mysql_num_rows($valida) != 0)) 
				{
	  				$sum = $sum +1 ;
					$tipo_orde="INICIO";
  
  				printf("<tr>
								 
				<td bgcolor='#ECE9D8'><div align='center' class='botonnew'><input type='button' value= $cedula name='proceso' class='botonnew' onClick =	window.open('enviar_movimiento.php?cedula=$cedula&contrato=$numero_contrato&proceso=$numero_proceso','','top=30,left=50,toolbar=yes,scrollbars=yes,width=850,height=650,status=yes')></a></td>
  				<td class='tdfull'>".$cedula."</a></td>			   
				<td class='tdfull'>".$numero_proceso."</a></td>
				<td class='tdfull'>".$fecha_inicio."</a></td>		
				<td class='tdfull'>".$nombre_abogado."</a></td>
				<td class='tdfull'>".$tipo_orde."</a></td>
				<td class='tdfull'>".$tipo_proceso."</a></td>
				<td class='tdfull'>".$numero_contrato."</a></td>
				<td class='tdfull'>".$tipo_contrato."</a></td>
				<td class='tdfull'>".$ns."</a></td>
				<td class='tdfull'>".$clase_negocio."</a></td>
				<td class='tdfull'>".$despacho_judicial."</a></td>"); 
  
				}
			}
		}  
	}			

				
	echo "</table>";	
		
	echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1' bgcolor='#0000FF'>
    <TR>
    <TD class='tdtitulo'>TOTAL VALOR</TD>";
	printf("<tr>
                               
	<td class='tdfull'>".$sum."</td>");	 
}
}

	
echo "</form>";

  
?>