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/cobranzas_recuperacion_historica1.php
<?php 
require_once("mainfile.php");
include ("config.php");
global $dbi;

require_once("Conectarse.php");


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

	$fecha_act=date ( "Y-n-j" );
	

	
	if ($causal == "")
		{
		
	 echo "<script>alert('Falta seleccionar causal historica');</script>";
		}
		else
		{ 
		
			 			 $mssql3 = mysql_query("UPDATE  recuperacion_cartera2  set  causal  = '" .$_POST[causal]. "', fecha_rechazo = '" .$fecha_act. "', estado = '0' WHERE cedula =  '" . $HTTP_GET_VARS[ced2] . "' and contrato =  '" . $HTTP_GET_VARS[numcon] . "'");
            if (!$mssql3) {
				die('Invalid query recuperacion_cartera MODIFICAR: ' . mysql_error());
				} 
				
				
			 $trance = mysql_query("UPDATE  abono_morosos_jur set   causal  = '" .$_POST[causal]. "', fecha_rechazo = '" .$fecha_act. "', estado = '0' WHERE cedula =  '" . $HTTP_GET_VARS[ced2] . "' and contrato =  '" . $HTTP_GET_VARS[numcon] . "' and estado = '1'");
					if (!$trance) {
					die('Invalid query abono_morosos_jur MODIFICAR: ' . mysql_error());
					} 
					
					 $cred = mysql_query("UPDATE  abono_morosos_cre set   causal  = '" .$_POST[causal]. "', fecha_rechazo = '" .$fecha_act. "', estado = '0' WHERE cedula =  '" . $HTTP_GET_VARS[ced2] . "' and contrato =  '" . $HTTP_GET_VARS[numcon] . "' and estado = '1'");
					if (!$cred) {
					die('Invalid query abono_morosos_cre MODIFICAR: ' . mysql_error());
					} 
			
			
	 echo "<script>alert('Paso a historico Satisfatoriamente');</script>";
			}

}

$control = mysql_query('SELECT cedula, nombre, contrato, tipo, deudajur, deudacre FROM recuperacion_cartera2 WHERE  cedula = "' . $HTTP_GET_VARS["ced2"] . '" and contrato = "' . $HTTP_GET_VARS["numcon"] . '"');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
		$num=mysql_num_rows($control); 
	list($cedula, $nombre, $numcon , $tipo, $deudajur, $deudacre) = mysql_fetch_row($control);

	

$sql2 = mysql_query('SELECT * FROM descuentos WHERE estado = "1" order by unidad');
			if (!$sql2) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2); 
?>

    
<!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>Psar Historico Recupracion</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;
}
.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;
}
.Estilo55 {font-weight: bold; font-family: "Arial Narrow";}
.Estilo56 {color: #003366; }
.Estilo57 {color: #000099}
.Estilo60 {color: #000099; font-weight: bold; }
.Estilo61 {
	color: #000066;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
    
    
      <div align="center" class="Estilo50">INFORMACION RECUPERACION CARTERA </div>

    <div align="left"></div>
    <div align="left"></div>
    <div align="right"></div>
    <table width="655" border="2" cellpadding="1" cellspacing="1" class="est_cont5">
      <tr>
        <th width="116" 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="119" bgcolor="#CCFFCC"><span class="Estilo57"> Nombres :</span></th>
        <th colspan="3" bgcolor="#CCFFCC"><div align="left">
          <input name="ape" type="text" class="Estilo55" id="ape" value="<?php echo $nombre ?>" size="60" maxlength="60" readonly="" />
        </div></th>
      </tr>
      <tr>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Contrato:</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo56" >
            <input name="numcon" type="text" class="Estilo55" id="numcon" value="<?php echo $numcon ?>" size="18" maxlength="18" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Tipo :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo57">
            <input name="tipo" type="text" class="Estilo55" id="tipo" value="<?php echo $tipo ?>" size="3" maxlength="2" readonly="" />
        </div></th>
      </tr>
      <tr>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Deuda Juridica :</span></th>
        <th bgcolor="#CCFFCC"><div align="left" class="Estilo56">
            <input name="deudajur" type="text" class="Estilo55" id="deudajur" value="<?php echo $deudajur ?>" size="18" maxlength="18" readonly="" />
        </div></th>
        <th bgcolor="#CCFFCC"><span class="Estilo57">Deuda Credito:</span></th>
        <th width="305" bgcolor="#CCFFCC"><div align="left" class="Estilo57">
            <input name="deudacre" type="text" class="Estilo55" id="deudacre" value="<?php echo $deudacre ?>" size="13" maxlength="13" readonly="" />
        </div></th>
    </table>
	<BR />
	<br />
<div align="center" class="Estilo50">PASAR HISTORICO </div>
<BR />
 <table  border="2" cellpadding="1" cellspacing="1" class="est_cont5">

     <tr>
        <td bgcolor="#CCFFFF" ><span class="Estilo54 Estilo61">Selecione Causal Historico</span></td>
        <td > 	<SELECT NAME="causal">
     <OPTION value="">--SELECCIONE CAUSAL--</OPTION>
    <OPTION value="PAGO DE LA DEUDA">PAGO DE LA DEUDA</OPTION>
	<OPTION value="CONCILIACION">CONCILIACION</OPTION>
    <OPTION value="PROCESO JURIDICO">PROCESO JURIDICO</OPTION>
    <OPTION value="OPERAR DESCUENTO DEBITO">OPERAR DESCUENTO DEBITO</OPTION>
    <OPTION value="OPERAR DESCUENTO NOMINA">OPERAR DESCUENTO NOMINA</OPTION>
	
			   </SELECT></td>
       
      </tr>
</table>
  </div>
  <br />
  <br />
  <div align="center">
   <input name="grabar" id="grabar" type="submit" class="Estilo60" value="Pasar Historico">

  </div>
</form>
</body>
</html>
<?php

   	$mssql = mysql_query('SELECT * FROM abono_morosos_jur  ');
			if (!$mssql) {
				die('Invalid query: ' . mysql_error());
			}
   if($mssql)
   {
         $filas = mysql_num_rows($mssql);
         if ($filas > 0)
         {
	$control = mysql_query('SELECT * FROM  abono_morosos_jur  WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '" and contrato = "' . $HTTP_GET_VARS["numcon"] . '" ORDER BY fecha_pago  ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}
                      if ((mysql_num_rows($control)!=0)) 
	                    {	 
                               
							
						echo'<table width="500"  border="1" cellspacing="2" cellpadding="2" align = "left">
  <tr align="center"> 
    <td colspan="6"><font face="Georgia, Times New Roman, Times, serif" color="#000066"><b>PAGOS  EFECTUADOS JURIDICA</b></font></td>
  </tr>
  <tr align="center" bgcolor="#FFFF99"> 
    <td width="70" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Valor cuota</font></td>
    <td width="400" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Entidad</font></td>
    <td width="140" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Fecha registro</font></td>
  </tr>';	
  			  
                        
	while(list($id, $cedula, $nombre, $contrato, $tipo, $valorcuota, $fecha_registro,$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'>$valorcuota</td>
<td width='400'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'>$concepto</td>
<td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'>$fecha_registro</td></tr>");

						            								   
                               }
				
								   
								   echo "</table>";		  
                        }
				
		
					
		       
	      }
     }
    

echo "</form>";

?>

<?php

   	$mssql = mysql_query('SELECT * FROM abono_morosos_cre  ');
			if (!$mssql) {
				die('Invalid query: ' . mysql_error());
			}
   if($mssql)
   {
         $filas = mysql_num_rows($mssql);
         if ($filas > 0)
         {
	$control = mysql_query('SELECT * FROM  abono_morosos_cre  WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '" and contrato = "' . $HTTP_GET_VARS["numcon"] . '" ORDER BY fecha_pago  ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}
                      if ((mysql_num_rows($control)!=0)) 
	                    {	 
                               
							
						echo'<table width="500"  border="1" cellspacing="2" cellpadding="2" align = "left">
  <tr align="center"> 
    <td colspan="6"><font face="Georgia, Times New Roman, Times, serif" color="#CC3333"><b>PAGOS  EFECTUADOS CREDITO</b></font></td>
  </tr>
  <tr align="center" bgcolor="#CCFFCC"> 
    <td width="70" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Valor cuota</font></td>
    <td width="400" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Entidad</font></td>
    <td width="140" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#993300">Fecha registro</font></td>
  </tr>';	
  			  
                        
	while(list($id, $cedula, $nombre, $contrato, $tipo, $valorcuota, $fecha_registro,$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=##000066'>$valorcuota</td>
<td width='400'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=##000066'>$concepto</td>
<td width='100'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=##000066'>$fecha_registro</td></tr>");

						            								   
                               }
				
								   
								   echo "</table>";		  
                        }
				
		
					
		       
	      }
     }
    
echo "</form>";

?>