File: /home/asjudine/www/liquidacion_procesos_estado_uno.php
.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Listado Liquidación Procesos Estado 1</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: 12px; 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;}
.Estilo2 {font-family: Arial; font-size: 16px; color: #990000;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; width:70px; height:22px;}
body {
background-image: url();
}
.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;}
.boton3 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
-->
</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="#FFFFCC">
<td class="titulos"><div align="center">LIQUIDACION DE PROCESOS ESTADO 1 </div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="22" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td height="22"><fieldset>
<legend></legend>
</fieldset></td></tr>
<tr bgcolor="#FFCC99">
<td><div align="center">
<input name="menu" type="button" class="boton2" id="menu" onClick="window.location.href='menu_control_calidad.php'" value="Menu">
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td><div align="center">
<input name="consultar" id="consultar" type="submit" class="boton" value="Consultar">
<input name="button2" type="button" class="boton3" onClick="window.location.href='menu_control_calidad.php'" value="Atrás">
<input name="button" type="button" class="boton" onclick="window.location.reload()" value="Actualizar">
</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;
require_once("Conectarse.php");
//$mssql = mysql_query("select * from liquidaciones_procesos where liquidacion = '1'",$dbi);
$mssql = mysql_query('SELECT * FROM liquidaciones_procesos WHERE liquidacion = "1" ');
if (!$mssql) {
die('Invalid query medio: ' . mysql_error());
}
if($mssql)
{
$filas = mysql_num_rows($mssql);
if ($filas > 0)
{
// $sql = "select cedula,numero_proceso, codigo_causal, valor, codigo_abogado, fecha_providencia, fecha_terminacion,liquidacion from liquidaciones_procesos where liquidacion = '1' order by codigo_abogado";
// $control = mysql_query($sql, $dbi) or die(mysql_error());
$control = mysql_query('SELECT cedula,numero_proceso, codigo_causal, valor, codigo_abogado, fecha_providencia, fecha_terminacion,liquidacion FROM liquidaciones_procesos WHERE liquidacion = "1" order by codigo_abogado');
if (!$control) {
die('Invalid query 12: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='1050' border='0' align='center' cellpadding='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEDULA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>PROCESO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CAUSAL TERMINACION</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>VALOR</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>ABOGADO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TIPO PROCESO</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>FECHA PROVIDENCIA</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>FECHA TERMINACION</span></div></TD>
<TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>LIQUIDACION</span></div></TD>";
while(list($cedula,$numero_proceso,$codigo_causal,$valor,$codigo_abogado,$fecha_providencia,$fecha_terminacion,$liquidacion) = mysql_fetch_row($control))
{
if($liquidacion=='1')
{
// $tp = mysql_query("select tipo_proceso from procesos_historicos where cedula = $cedula and numero_proceso = $numero_proceso", $dbi);
$tp = mysql_query('SELECT tipo_proceso FROM procesos_historicos WHERE cedula = "' ."$cedula". '" and numero_proceso = "' ."$numero_proceso". '" ');
if (!$tp) {
die('Invalid query: ' . mysql_error());
}
if($tp){list($tpro) = mysql_fetch_row($tp);}
// $causal = mysql_query("select causal from causales_terminacion where codigo_causal = $codigo_causal", $dbi);
$causal = mysql_query('SELECT causal FROM causales_terminacion WHERE codigo_causal = "' ."$codigo_causal". '" ');
if (!$causal) {
die('Invalid query: ' . mysql_error());
}
if($causal){list($ns) = mysql_fetch_row($causal);}
//$abogado = mysql_query("select nombre_completo from asjudinet_abogados where codigo_abogado = $codigo_abogado", $dbi);
$abogado = mysql_query('SELECT nombre_completo FROM asjudinet_abogados WHERE codigo_abogado = "' . "$codigo_abogado". '" ');
if (!$abogado) {
die('Invalid query: ' . mysql_error());
}
if($abogado){list($nom) = mysql_fetch_row($abogado);}
printf("<tr>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$cedula."</a></span></div></td>
<td bgcolor='#ECE9D8'><div align='center' class='lista'>".$numero_proceso."</a></span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$ns."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$valor."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$nom."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$tpro."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$fecha_providencia."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$fecha_terminacion."</span></div></td>
<td bgcolor='#C5D6FC'><div align='center' class='lista'>".$liquidacion."</span></div></td>");
$valor_total = $valor_total + $valor;
}
}
echo "</table>";
echo "<TABLE width='500' border='0' align='center' cellpadding='0' cellspacing='1'>
<TR>
<TD bgcolor='#FFFFCC'><div align='left'><span class='texto'>VALOR TOTAL = $valor_total</span></div></TD>";
}
}
}
else
{
echo "<script>alert('El codigo de abogado no se encuentra en la base de datos');</script>";
}
}
echo "</form>";
?>