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/acalidad/listado_fecha_diag.php
<?php
global $dbi;
require_once("../Conectarse.php");
?>


<!DOCTYPE HTML>

<html>
<head>
<title>Listado sin Fecha de Diagnostico</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
   
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/listado.css">


<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>
    <div class="header"></div>
</header>

<form name="formulario" action="" method="post">

<table width="463" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
	<td width="523">
    <fieldset>
    <table width="461" border="0" align="center" cellpadding="2" cellspacing="2">
  		<tr>
    		<td width="447" class="titulo">LITADO PROCESOS SIN FECHA DE DIAGNOSTICO </td>
  		</tr>
  		<tr>
    		<td height="22" class="fecha">
            	<div align="center">
      				<script languaje="JavaScript">Mostrar_Fecha()</script>
    			</div>
         	</td>
  		</tr>
  		<tr>
    		<td height="22"><div align="center">
      		<input name="menu2" type="button" class="irmenu" id="menu2" onclick="window.location.href='menu_control.php'" value="IR AL MENU" />
    		</div></td>
  		</tr>
	</table>
	</fieldset>
    </td>
</tr>
</table>
</form>
</body>
</html>

<?php
echo "<form name='form' action='' method='post'>";
 
//$mssql = mysql_query("select * from procesos where fecha_diagnostico = 0000-00-00",$dbi);
$mssql = mysql_query('SELECT * FROM procesos WHERE fecha_diagnostico = "0000-00-00"  ');
if (!$mssql) {
	die('Invalid query medio 15: ' . mysql_error());
}

if($mssql)
{
	$filas = mysql_num_rows($mssql);
    if ($filas > 0)
    {
		$control = mysql_query('SELECT cedula, numero_proceso, tipo_proceso, numero_contrato, tipo_contrato, codigo_abogado FROM procesos WHERE fecha_diagnostico = "0000-00-00" and (tipo_proceso= "JURIDICO" || tipo_proceso= "DISCIPLINARIO")  order by codigo_abogado');
		if (!$control) {
			die('Invalid query medio 14: ' . mysql_error());
		}
        
		if ((mysql_num_rows($control)!=0)) 
	    {	 
         	echo "<TABLE width='1000' border='0' align='center' cellpadding='0' cellspacing='1'>
            <TR>
            <TD class=tdtitulo>CEDULA</TD>
			<TD class=tdtitulo>CEDULA</TD>
			<TD class=tdtitulo>ABOGADO</TD>
			<TD class=tdtitulo>Nš PROCESO</TD>	
            <TD class=tdtitulo>TIPO PROCESO</TD>
			<TD class=tdtitulo>FECHA INICIO</TD>
			<TD class=tdtitulo>Nš CONTRATO</TD>
			<TD class=tdtitulo>TIPO CONTRATO</TD>";		  
                           							  
                        
        	while(list($cedula2, $numero_proceso, $tipo_proceso, $numero_contrato, $tipo_contrato, $codigo_abogado) = mysql_fetch_row($control)) 
            {
				$contro2 = mysql_query('SELECT numero_proceso, cedula, fecha FROM informe_diagnostico  WHERE cedula =  "' ."$cedula2". '" ');
								
				list( $numr, $cedr , $fechr ) = mysql_fetch_row($contro2);				   		


	  			$control3 = mysql_query('SELECT nombre_completo FROM asjudinet_abogados WHERE codigo_abogado = "' ."$codigo_abogado" .'" order by nombre_completo ');
				if (!$control3) {
					die('Invalid query medio 12: ' . mysql_error());
				}	 
				list($nombre_abogado) = mysql_fetch_row($control3);
	
	
	
	  			$actuacion = mysql_query('SELECT fecha , tipo_orden  FROM actuaciones  WHERE cedula  = "' ."$cedula2" .'" and numero_proceso   = "' ."$numero_proceso" .'" and tipo_orden  = "INICIO" order by fecha ');
				if (!$actuacion) {
					die('Invalid query actuacion 12: ' . mysql_error());
				}	 
				list($fechin, $tipoini) = mysql_fetch_row($actuacion);
	
				
				
				$sum = $sum + 1;
	
				/*$terr = mysql_query('SELECT MAX(id), MAX(tipo_orden)  FROM actuaciones  group by cedula,numero_proceso ');
				if (!$terr) {
					die('Invalid query actuacion 12: ' . mysql_error());
				}	 
				list($idee, $orden) = mysql_fetch_row($terr);*/
	
				/*$mssql = mysql_query("UPDATE  procesos  set tipo_orden  = 'REVISTA'  WHERE tipo_orden = 'TERMINACION' ");
	  			if (!$mssql) {
					die('Invalid query 1: ' . mysql_error());
				}*/
		
				
				
				printf("<tr>
              	<td bgcolor='#ECE9D8'><div align='center' class='lista'><input type='button' value=$cedula2 name='cedu' class=botonnew onClick =window.open('consulta_prejuridica.php?cedula=$cedula2&proceso=$numero_proceso&contrato=$numero_contrato','','top=50,left=100,toolbar=no,scrollbars=yes,width=850,height=550,status=yes')></a></td>
				
				<td class='tdfull'>".$cedula2."</td>
                <td class='tdfull'>".$nombre_abogado."</td>
				<td class='tdfull'>".$numero_proceso."</td>
				<td class='tdfull'>".$tipo_proceso."</td>
				<td class='tdfull'>".$fechin."</td>
				<td class='tdfull'>".$numero_contrato."</td>
				<td class='tdfull'>".$tipo_contrato."</td>");
			}
			                       
			echo "</table>";		 
								   
			echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
            <TR>
            <TD class=tdtitulo>TOTAL</TD>";	
			printf("<tr>
            <td class='tdfull'>".$sum."</td>");  	 
     	}
	}
}
    

echo "</form>";
 
?>