File: /home/asjudine/www/listado_personas_juridicas_jur.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Listado de personas Juridicas</title>
<style type="text/css">
<!--
.Estilo2 {color: #FF6633;
font-size: 16px;
}
.Estilo3 {color: #2492FF;
font-weight: bold;
}
.recaudo {font-family: "Courier New", Courier, monospace;
font-size: 12px;
font-style: normal;
font-weight: bold;
font-variant: normal;
color: #000000;
background-color: #B6CBDC;
margin: 4px;
padding: 8px;
width: auto;
border: medium outset #339966;
}
.Estilo4 {
color: #D94B3C;
font-size: 24px;
}
.est_cont1 {
font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #4068F4;
background-color: #E6FFF1;
margin: 1px;
padding: 1px;
height: auto;
width: auto;
border: thin double #33CC66;
}
.est_cont2 {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #418BAF;
background-color: #F0F5CF;
height: 15px;
width: auto;
border: thin solid #FABF85;
}
.est_cont3 {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #EA261C;
background-color: #DEDDE8;
height: auto;
width: auto;
border: thin outset #FC9F67;
}
.est_cont5 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
background-color: #CCFFCC;
margin: 2px;
padding: 2px;
height: auto;
width: auto;
color: #C72350;
}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block; }
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<table width="669" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td class="titulos"><div align="center">LISTADO SOLICITUDES PERSONAS JURIDICAS </div></td>
</tr>
<tr bgcolor="#ECE9D8">
<tr bgcolor="#FFCC99">
<td bgcolor="#FFCC99"><div align="center">
<input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='menu_cartera_debito.php'" value="IR AL MENU" />
<label></label>
</div></td>
</tr>
</table>
<div align="left"></div>
<div align="left"></div>
<div align="right"></div>
</div>
</form>
</body>
</html>
<?php
echo "<form id='form2' name='form2' method='post' action=''>";
require_once("Conectarse.php");
require_once("mainfile.php");
include ("config.php");
global $dbi;
$resul = mysql_query('SELECT * FROM personas_juridicas ');
if (!$resul) {
die('Invalid query: ' . mysql_error());
}
if($resul)
{
$filas = mysql_num_rows($resul);
if ($filas > 0)
{
$result = mysql_query('SELECT nit, razon, fecha, sucursal, plan, alerta1, alerta2, alerta3, alerta4, alerta5 FROM personas_juridicas WHERE estado = "1" order by nit ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($result)!=0))
{
echo "<table width='700' border='2' align='center' cellpadding='1' cellspacing='1' class='est_cont5'>
<tr>
<td width='100'><div align='center'><strong>NIT</strong></div></td>
<td width='200'><div align='center'><strong>RAZON</strong></div></td>
<td width='200'><div align='center'><strong>FECHA</strong></div></td>
<td width='200'><div align='center'><strong>ALERTAS</strong></div></td>
<td width='100'><div align='center'><strong>SUCURSAL</strong></div></td>
<td width='100'><div align='center'><strong>PLAN</strong></div></td>
</tr>";
while(list($ced, $razon, $fec, $sucu , $plan, $alerta1, $alerta2, $alerta3, $alerta4, $alerta5) = mysql_fetch_row($result))
{
$resul = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "' ."$sucu". '" ');
if (!$resul) {
die('Invalid query 1111: ' . mysql_error());
}
list($ciu) = mysql_fetch_row($resul);
if($alerta1 == "")
{
$alerta1 = "NO";
}
if($alerta2 == "")
{
$alerta2 = "NO";
}
if($alerta3 == "")
{
$alerta3 = "NO";
}
if($alerta4 == "")
{
$alerta4 = "NO";
}
if($alerta5 == "")
{
$alerta5 = "NO";
}
if ($alerta1 == "1" || $alerta2 == "2" || $alerta3 == "3" || $alerta4 == "4" || $alerta5 == "5")
{
$control = mysql_query('SELECT cedula, numero_proceso, tipo_proceso, codigo_abogado, estado FROM procesos WHERE cedula = "' .$ced. '"');
if (!$control) {
die('Invalid query 2: ' . mysql_error());
}
list($cedula, $numpro, $tipo, $codigo, $estado) = mysql_fetch_row($control);
$contr = mysql_query('SELECT cedula, grado, nombre, numerocontrato, estado FROM cartera_serviasjudinet WHERE cedula = "' .$ced. '"');
if (!$contr) {
die('Invalid query 2: ' . mysql_error());
}
list($cedula, $grado , $nombres, $numcont, $estado) = mysql_fetch_row($contr);
$con = mysql_query('SELECT cedula, nombre, numero_contrato_titular, tipo_contrato_titular , estado FROM beneficiarios WHERE cedula = "' .$ced. '"');
if (!$con) {
die('Invalid query 2: ' . mysql_error());
}
list($cedula, $nombres, $numcon, $tipo, $estado) = mysql_fetch_row($con);
printf("<TR>
<TD bgcolor='#66CCFF'><div align='center' class='lista'><input type='button' value=$ced name='cedu' class=Estilo24 onClick =window.open('tel_guardar_info.php?cedula=$ced','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')></a></span></div></TD>
<TD bgcolor='#66CCFF'><div align='center' class='lista'>".$razon."</span></div></TD>
<TD bgcolor='#66CCFF'><div align='center' class='lista'>".$fec."</span></div></TD>
<TD bgcolor='#66CCFF'><div align='center' class='lista'><input type='button' value=$alerta1 name='alerta1' class=Estilo24 onClick =window.open('consulta_ingreso_contrato.php?ced2=$ced&numcon=$numcont','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')>-<input type='button' value=$alerta2 name='alerta2' class=Estilo24 onClick =window.open('informacion_credito_ced.php?ced=$ced','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')>-<input type='button' value=$alerta3 name='alerta3' class=Estilo24 onClick =window.open('cartera.consulta.beneficiario.php?ced2=$ced&numcon=$numcon','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')>-<input type='button' value=$alerta4 name='alerta4' class=Estilo24 onClick =window.open('mostrar_actuaciones7.php?id=$ced&proceso=$numpro','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')>-<input type='button' value=$alerta5 name='alerta5' class=Estilo24 onClick =window.open('validada_solicitud_juridica.php?ced2=$ced','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')></a></span></div></TD>
<TD bgcolor='#66CCFF'><div align='center' class='lista'>".$ciu."</span></div></TD>
<TD bgcolor='#66CCFF'><div align='center' class='lista'>".$plan."</span></div></TD> </TR>");
}
else
{
printf("<TR>
<TD bgcolor='#FDFFE6'><div align='center' class='lista'><input type='button' value=$ced name='cedu' class=Estilo24 onClick =window.open('tel_guardar_info.php?cedula=$ced','','top=50,left=100,toolbar=yes,scrollbars=yes,width=950,height=650,status=yes')></a></span></div></TD>
<TD bgcolor='#FDFFE6'><div align='center' class='lista'>".$razon."</span></div></TD>
<TD bgcolor='#FDFFE6'><div align='center' class='lista'>".$fec."</span></div></TD>
<TD bgcolor='#FDFFE6'><div align='center' class='lista'>".$ent."</span></div></TD>
<TD bgcolor='#FDFFE6'><div align='center' class='lista'>".$ciu."</span></div></TD>
<TD bgcolor='#FDFFE6'><div align='center' class='lista'>".$plan."</span></div></TD> </TR>");
}
}
echo "</table>";
}
}
}
echo "</form>";
?>