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/public_html/consul_lis_sus.php
<?php 
require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$linea = '-';

require_once("Conectarse.php");


$sql5 = mysql_query('SELECT * FROM sucursal order by nombre ');
			if (!$sql5) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql5 = mysql_fetch_assoc($sql5);
$totalRows_sql5 = mysql_num_rows($sql5); 

?>
.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Listado Procesos Sustanciacion por sucursal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.fecha {font-size: 11px; font-family: Arial; color:#990000; display: block; }
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000;}
.lista {font-family: Arial; font-size: 11px;	color: #990000;}
.lista2 {font-family: Arial; font-size: 16px;	color: #FF6600;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; width:70px; height:22px;}
body {
	background-image: url();
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.Estilo51 {
	color: #3366FF;
	font-weight: bold;
}
.boton1 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}

a.p:link { 
    color: #0066FF; 
    text-decoration: none; 
} 
a.p:visited { 
    color: #0066FF; 
    text-decoration: none; 
} 
a.p:active { 
    color: #0066FF; 
    text-decoration: none; 
} 
a.p:hover { 
    color: #0066FF; 
    text-decoration: underline; 
} 
a.ord:link { 
    color: #000000; 
    text-decoration: none; 
} 
a.ord:visited { 
    color: #000000; 
    text-decoration: none; 
} 
a.ord:active { 
    color: #000000; 
    text-decoration: none; 
} 
a.ord:hover { 
    color: #000000; 
    text-decoration: underline; font-size: 12px;
} 
.campos{
	color: #990000;
	font-weight: bold;
	font-family: Arial;
    font-size: 11px;	
}
.campos1{
	color: #003399;
	font-weight: bold;
	font-family: Arial;
    font-size: 11px;	
}

.letras {
	color: #000000;
	font-family: Arial;
    font-size: 11px;	
}
.Estilo62 {color: #CC0000}
.Estilo65 {color: #878787; font-family: "Arial Narrow"; font-weight: bold; }
-->
</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">
<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 bgcolor="#99FF99">
    <td colspan="14" bgcolor="#FFFFCC" class="titulos"><div align="center" class="titulos Estilo62">CONSULTA LISTADO SUSTANCIACION </div></td>
  </tr>
  <tr bgcolor="#FFFF99" class="titulos">
    <td height="22" colspan="14" align="center" bgcolor="#FFFFCC" class="Estilo51">
      <script languaje="JavaScript">Mostrar_Fecha()</script></td>
  </tr>
      <tr>
        <td width="313" bgcolor="#E0FEF3"><span class="Estilo51">Seleccione &quot;SUCURSAL&quot; para continuar</span></td>
        <td width="207" bgcolor="#E0FEF3"> <select name="codigo_sucursals" class="Estilo66">
              <option value="">--SELECCIONE SUCURSAL--</option>
              <?php
     do {  
?>
              <option value="<?php echo $row_sql5['codigo'];?>"><?php echo $row_sql5['nombre']?></option>
              <?php
} while ($row_sql5 = mysql_fetch_assoc($sql5));
  $rows5 = mysql_num_rows($sql5);
  if($rows5 > 0) {
      mysql_data_seek($sql5, 0);
       $row_sql5 = mysql_fetch_assoc($sql5);
  }
?>
            </select></td>
        <td width="129" bgcolor="#E0FEF3"><label></label></td>
  </tr>

  
  <tr bgcolor="#FFCC99">
    <td colspan="14" bgcolor="#E0FEF3"><div align="center" class="Estilo51">
      <input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_empresarial.php'" value="IR AL MENU">
	   <input name="consultar" id="consultar" type="submit" class="Estilo50" value="CONSULTAR">
    </div></td>
  </tr>
</table>
</fieldset></td>
  </tr>
</table>
</form>
</body>
</html>

<?php

if(isset($_POST["consultar"]))
{


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

		
						$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  tipo_proceso = "SUSTANCIACION" and estado = "1" and codigo_sucursal = "' . $_POST[codigo_sucursals]  . '" order by  fecha_actuacion ');
			if (!$mssql) {
				die('Invalid query primero: ' . mysql_error());
			} 
if($mssql){
	echo "</font></div>"; 
echo "<table align='center' width='1500' border='0' cellspacing='1' cellpadding='0'>"; 
?>
<tr>
<td bgcolor='#99FF99' class='letras'>Cédula</td>
<td bgcolor='#99FF99' class='letras'>Proceso</td>
<td bgcolor='#99FF99' class='letras'>Abogado</td>
<td bgcolor='#99FF99' class='letras'>Tipo de orden</td>
<td bgcolor='#99FF99' class='letras'>Tipo Proceso</td>
<td bgcolor='#99FF99' class='letras'>Contrato</td>
<td bgcolor='#99FF99' class='letras'>Tipo</td>
<td bgcolor='#99FF99' class='letras'>Nombre</td>
<td bgcolor='#99FF99' class='letras'>Clase Negocio</td>
<td bgcolor='#99FF99' class='letras'>Despacho Judicial</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, $to) = mysql_fetch_row($mssql)) 
				{  
				
				   $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);
	  
	  $contrgg = mysql_query('SELECT nombre FROM cartera_serviasjudinet  WHERE cedula  = "' .$cedula. '" and numerocontrato  = "' .$numero_contrato. '" and tipocontrato  = "' .$tipo_contrato. '" ');
			if (!$contrgg) {
				die('Invalid query: ' . mysql_error());
			}	 
	
		   
          if ((mysql_num_rows($contrgg)==0)) 
	                    {	
						 $contrgg = mysql_query('SELECT nombre FROM beneficiarios  WHERE cedula  = "' .$cedula. '" and numero_contrato_titular   = "' .$numero_contrato. '" and tipo_contrato_titular   = "' .$tipo_contrato. '" ');
			if (!$contrgg) {
				die('Invalid query: ' . mysql_error());
			}
						}
						
	  list($nombre) = mysql_fetch_row($contrgg);
?> 
   <!-- tabla de resultados --> 
<tr bgcolor="#FFFFCC" onMouseOver="this.style.backgroundColor='#CCFFFF';this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#FFFFCC'"0"];" onClick="javascript:window.location.href = 'mostrar_actuaciones7.php?id=<?php echo $cedula; ?>&proceso=<?php echo $numero_proceso; ?>'">
    <td class="campos"><? echo $cedula; ?></td> 
    <td class="campos"><? echo $numero_proceso; ?></td> 
    <td class="campos"><? echo $nombre_abogado; ?></td> 	
    <td class="campos"><? echo $tipo_orden; ?></td> 						
    <td class="campos"><? echo $tipo_proceso; ?></td> 
    <td class="campos"><? echo $numero_contrato; ?></td> 	
    <td class="campos"><? echo $tipo_contrato; ?></td> 	
	<td class="campos1"><? echo $nombre; ?></td>
    <td class="campos"><? echo $clase_negocio; ?></td> 		
    <td class="campos"><? echo $despacho_judicial; ?></td> 		
    					
</tr> 
   <!-- fin tabla resultados --> 
<? 
				}
				
				
		echo "</table>";	
	}

	
echo "</form>";

}
  
?>