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/estado_contable_servi_prov.php
<?php 
function Conectarse()
	{
	
	   if (!($link=@mysql_connect("localhost","asjudine","as2006")))
	   {
		  echo "Error conectando con el servidor.";
		  exit();
	   }
	   $dbname = "asjudinet";
	   if (!@mysql_select_db($dbname,$link))
	   {
		  echo "Error seleccionando la base de datos.";
		  exit();
	   }
	   return $link;
	}
	Conectarse();


require_once("mainfile.php");
include ("config.php");
global $dbi;
	

$control = mysql_query('SELECT cedula, codigo_militar, nombre, grado, numerocontrato,   tipocontrato , numero_libranza , tipo_afiliado, codigo_sucursal, direccion , telefono, celular, ciudad , email, cuenta, banco, entidad_laboral, unidad_descuento, codigo_descuento, entidad_recaudo, fecha_nacimiento, fecha_afiliacion, valorcontrato, numerocuotas, valorcuota, fecha_inicio_contrato, fecha_termino_contrato, fecha_ultimo_registro, mes_inicio, ano_inicio, mes_termino, ano_termino, saldoanteior, cuotaspendientes, cuotasdescontadas, saldonuevo, vendedor, director,  beneficiarios FROM cartera_serviasjudinet WHERE cedula =  "' . $HTTP_GET_VARS["ced2"] . '" and numerocontrato =  "' . $HTTP_GET_VARS["numcon"] . '"');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
		$num=mysql_num_rows($control); 
		list($cedula, $codi, $apes, $grad, $numcont, $plan, $num_lib, $titular, $codigosu, $dire, $tele, $celul, $ciud, $email, $cue, $ban, $enti, $unides, $codides, $entre, $fecna, $fechafil, $valcon, $numcuo, $valcuo, $fechainicio, $fechatermino, $fechaul, $mesini, $anoini, $mesfin, $anofin, $salant, $cupen, $cudesc, $salnue, $ven, $director, $bene) = mysql_fetch_row($control);
$inipag = $anoini.'-'.$mesini; 

?>

    
<!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>Estado Contable - Coomanufacturas</title>
<style type="text/css">
<!--
.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: #000000;
	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: #D6ECFE;
	margin: 2px;
	padding: 2px;
	height: auto;
	width: auto;
	border: thin groove #E9AAF0;
	color: #C72350;
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.Estilo51 {
	font-size: 22px
}
.Estilo55 {font-weight: bold; font-family: "Arial Narrow";}
.Estilo56 {color: #003366; }
.Estilo57 {color: #000099}
.Estilo58 {color: #000000}
.Estilo59 {color: #FF0000}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
   
      <div align="center" class="Estilo4 Estilo51 Estilo59">ESTADO CONTABLE SERVI@SJUDINET</div>

    <p>
      <input name="menu2" type="button" class="Estilo57" id="menu2" onclick="window.location.href='menu_prov.php'" value="IR AL MENU" />
    </p>
    <div align="left"></div>
    <div align="left"></div>
    <div align="right"></div>

    <table width="630" border="2" cellpadding="1" cellspacing="1" class="est_cont5">
      <tr>
        <th width="92" height="23" bgcolor="#CCFFCC"><span class="Estilo57">Cedula :</span></th>
        <th width="90" bgcolor="#CCFFCC"><div align="left" class="Estilo56">
            <input name="ced" type="text" class="Estilo55" id="ced" value="<?php echo $cedula ?>" size="18" maxlength="18" readonly="" />
        </div></th>
        <th width="111" bgcolor="#CCFFCC"><span class="Estilo57">Apellidos y Nombres :</span></th>
        <th colspan="3" bgcolor="#CCFFCC"><div align="left">
            <input name="ape" type="text" class="Estilo55" id="ape" value="<?php echo $apes ?>" size="60" maxlength="60" readonly="" />
        </div></th>
      </tr>
      <tr>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Banco :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo56">
            <input name="ban" type="text" class="Estilo55" id="ban" value="<?php echo $ban ?>" size="18" maxlength="18" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">No Cuenta :</span></th>
        <th width="69" bgcolor="#CCFFCC"><div align="left" class="Estilo57">
            <input name="nocuen" type="text" class="Estilo55" id="nocuen" value="<?php echo $cue ?>" size="13" maxlength="13" readonly="" />
        </div></th>
        <th width="134" bgcolor="#CCFFCC"><span class="Estilo57">Fecha Afiliacion :</span></th>
        <th width="99" bgcolor="#CCFFCC" class="Estilo55"><div align="left" class="Estilo58">
            <input name="fec" type="text" class="Estilo55" id="fec" value="<?php echo $fechafil ?>" size="10" maxlength="10" readonly="" />
        </div></th>
      </tr>
      <tr>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Valor Contrato:</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo56">
            <input name="val" type="text" class="Estilo55" id="val" value="<?php echo $valcon ?>" size="18" maxlength="18" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">No Cuotas :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo57">
            <input name="cuo" type="text" class="Estilo55" id="cuo" value="<?php echo $numcuo ?>" size="3" maxlength="2" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Valor Cuota :</span></th>
        <th bgcolor="#CCFFCC" class="Estilo55"><div align="left" class="Estilo58">
          <input name="cuomes" type="text" class="Estilo55" id="cuomes" value="<?php echo $valcuo ?>" size="18" maxlength="18" readonly="" />
        </div></th>
      </tr>
      <tr>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Saldo Anterior :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo56">
            <input name="sal" type="text" class="Estilo55" id="sal" value="<?php echo $salant ?>" size="18" maxlength="18" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Cuotas Pendientes :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo57">
            <input name="cuotap" type="text" class="Estilo55" id="cuotap" value="<?php echo $cupen ?>" size="3" maxlength="2" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Nuevo Saldo :</span></th>
        <th bgcolor="#CCFFCC" class="Estilo55"><div align="left" class="Estilo58">
            <input name="nue" type="text" class="Estilo55" id="nue" value="<?php echo $salnue ?>" size="18" maxlength="18" readonly="" />
        </div></th>
      </tr>
      <tr>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Fecha Inicio :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo56">
            <input name="fecini" type="text" class="Estilo55" id="fecini" value="<?php echo $inipag ?>" size="10" maxlength="10" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Cuotas Descontadas :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo57">
            <input name="cuotad" type="text" class="Estilo55" id="cuotad" value="<?php echo $cudesc ?>" size="3" maxlength="2" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Fecha Ultimo Descuento :</span></th>
        <th bgcolor="#CCFFCC" class="Estilo55"><div align="left" class="Estilo58">
          <input name="fecult" type="text" class="Estilo55" id="fecult" value="<?php echo $fechaul ?>" size="10" maxlength="10" readonly="" />
        </div></th>
      </tr>
     
    </table>
    <p><?php echo "<input type='button' value='Modificar datos' name=boton class=boton2 onClick =window.open('cartera_modi_datos_estado.php?cedu=$cedula&numcon=$numcon','','top=50,left=100,toolbar=no,scrollbars=yes,width=790,height=280,status=yes')></a>"; ?></p>
  </div>
</form>
</body>
</html>
<?php

   
   	$mssql = mysql_query('SELECT * FROM cartera_estado_contable  ');
			if (!$mssql) {
				die('Invalid query: ' . mysql_error());
			}
   if($mssql)
   {
         $filas = mysql_num_rows($mssql);
         if ($filas > 0)
         {
		 
	$control = mysql_query('SELECT * FROM  cartera_estado_contable  WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '" and contrato  =  "' . $HTTP_GET_VARS["numcon"] . '" ORDER BY cuota  ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}
                      if ((mysql_num_rows($control)!=0)) 
	                    {	 
                               
							
						echo'<table width="700" border="0" cellspacing="2" cellpadding="2" align = "center">
  <tr align="center"> 
    <td colspan="6"><font face="Georgia, Times New Roman, Times, serif" color="#000066"><b>PAGOS 
      EFECTUADOS</b></font></td>
  </tr>
  <tr align="center" bgcolor="#DDDDDD"> 
    <td width="70" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Valor cuota</font></td>
    <td bgcolor="#DDDDDD" width="55" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300"># cuotas</font></td>
    <td width="100"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300"  align="center">Mes</font></td>
	<td width="100"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300"  align="center">Año</font></td>
    <td width="140"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Fecha pago</font></td>
    <td width="300" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Entidad</font></td>
    <td width="140"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Fecha registro</font></td>
  </tr>';				  
                        
	while(list($id, $cedula, $nombre, $contrato, $tipo, $cuota, $mescuota, $anocuota, $valorcuota, $fecha_registro, $fecha_nomina, $codesc, $unidesc) = mysql_fetch_row($control)) 
		{
					   
			$control5 = mysql_query('SELECT * FROM descuentos WHERE codigo = "' ."$codesc". '" and unidad = "' ."$unidesc". '" ');
			if (!$control5) {
				die('Invalid query: ' . mysql_error());
			}	 
			list($idr, $codigo, $unidad, $concepto) = mysql_fetch_row($control5);
											  
								  printf ("<tr align='center' bgcolor='#f4f4f4'>
			<td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\">$valorcuota</a></td>
<td width='100'> <font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$cuota</a></td><td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$mescuota</a></td>
<td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$anocuota</a></td>
<td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_nomina</a></td>
<td width='550'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\" top=50,left=200,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$concepto</a></td>
<td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a href=\"cartera_modificar_estado_prov.php?id=$id&ced2=$ced2&numcon=$numcon\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_registro</a></td></tr>");
						            								   
                               }
				
								   
								   echo "</table>";		  
                        }
				
		
					
		       
	      }
     }
    

echo "</form>";

?>