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/deb_pasar_historico.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.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();
	*/
	
	$control4 = mysql_query('SELECT cedula, nombres, dirrecion, telefono, celular, ciudad, email, entidad_laboral, banco, cuenta, valor_credito, valor_juridica, valor_debitar, cuota_debitar, unidad_desc, codigo_desc,  cuotas_pend, fecha_registro, causal_rechazo, fecha_rechazo, estado FROM debitos WHERE cedula = "' . $HTTP_GET_VARS["cedu"]  . '" ');
		  if (!$control4) {
				die('Invalid query 4 aqui: ' . mysql_error());
			}
		list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entidad_laboral,  $banco, $cuenta, $valcre, $valjur, $val_deb, $cuo_deb, $unidad_desc, $codigo_desc, $cuotas_pend, $fecha_registro, $causal_rechazo, $fecha_rechazo, $esta) = mysql_fetch_row($control4);	
		
if(isset($_POST["grabar"]))
{
    $mt = floor(($mes_inicio + $numcuo)/12);
	$submt = (($mes_inicio + $numcuo)%12)-1;
	$at = $mt + $aņo_inicio;
	if($submt==0)
	{
		$submt = 12;
		$at = $at-1;
	}
			 
			
			$resu4 = mysql_query('SELECT  codigo FROM debito_historico WHERE codigo =  "' ."$unidt2". '" ');
			if (!$resu4) {
				die('Invalid query: ' . mysql_error());
			}	 
			list($codi) = mysql_fetch_row($resu4);

		
			
	 $datos = mysql_query("UPDATE  debitos  set estado = '1' , causal_rechazo = '', fecha_rechazo = '' WHERE cedula = '" . $HTTP_GET_VARS[cedu]  . "'");
				       
				if (!$datos) {
				die('Invalid query datos: ' . mysql_error());
			}
            
            echo "<script>alert('Usuario paso a vigente satisfatoriamente');</script>";
			
				 
}


$sql2 = mysql_query('SELECT * FROM debito_historico order by codigo ');
			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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo10 {	font-size: 14px;
	font-weight: bold;
}
.Estilo12 {
	font-size: 11px
}
.Estilo15 {	font-size: 12px;
	color: #000000;
	font-weight: bold;
}
.campo1 {	background-color: #B7FFFF;
	border: thin dashed #B6B6B6;
}
.campo1 {	font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	font-style: normal;
	font-weight: bold;
	background-color: #E1EFFD;
	border: thin doble #009999;
}
.campo1 {
	font-family: "Courier New", Courier, monospace;
	font-size: 11px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
	height: 18px;
	width: auto;
}
.datos3 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #FF3300;
	background-color: #A6ECD7;
	margin: 4px;
	padding: 4px;
	border: medium groove #CCCCFF;
}
body {
	background-color: #DCFAF3;
}
.campo {background-color: #FFFFCC; border:1px solid #990000; font-family:Arial;  font-size:11px; height: inherit}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.Estilo1 {	color: #FF6633;
	font-size: 24px;
	font-style: italic;
}
.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;
}
.datos2 {
	font-family: "Courier New", Courier, monospace;
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 2px;
	padding: 3px;
	border: medium doble #EEBFEB;
}
.go {
	font-family: "Times New Roman", Times, serif;
	font-size: 9px;
	font-style: normal;
	color: #FF6633;
	background-color: #FBDCBD;
	padding: 1px;
	height: auto;
	width: auto;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
}
.Estilo8 {	font-size: 20px;
	font-weight: bold;
}
.Estilo4 {	color: #FF1A1A;
	font-weight: bold;
}
.datos1 {	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-style: normal;
	text-decoration: blink;
	background-color: #CCFFCC;
	margin: 5px;
	padding: 7px;
	height: auto;
	width: auto;
	border: thin solid #0099FF;
}
.datos1 {	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 16px;
	background-color: #FDE0C1;
	margin: 2px;
	padding: 3px;
	border: medium doble #DBAED7;
}
.datos1 {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-weight: normal;
	background-color: #B8F5E8;
	margin: 4px;
	padding: 5px;
	border: thin outset #009999;
}
.Estilo51 {font-size: 16px}
.Estilo54 {
	color: #FF3300;
	font-weight: bold;
}
.Estilo55 {
	font-size: 11px;
	font-weight: bold;
}
.Estilo56 {font-size: 11px}
.Estilo57 {font-size: 12px}
.Estilo58 {font-size: 14px}
.campo11 {background-color: #B7FFFF;
	border: thin dashed #B6B6B6;
}
.campo11 {font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	font-style: normal;
	font-weight: bold;
	background-color: #E1EFFD;
	border: thin doble #009999;
}
.campo11 {	font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
	height: 20px;
	width: auto;
}
.datos21 {	font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 2px;
	padding: 3px;
	border: medium doble #EEBFEB;
}
.est_cont2 {font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #2B39EC;
	background-color: #F0F5CF;
	height: 18px;
	width: auto;
	border: thin solid #FABF85;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
  
      <table width="330" border="3" cellpadding="3" cellspacing="3" >
          <caption>
          <span class="Estilo1">INGRESAR DEBITOS SERVIASJUDINET</span>
          </caption>
    </table>
        <strong><br />
        </strong><br />
        <table width="617" border="3" cellpadding="3" cellspacing="3" class="Estilo51">
          <caption>
          <span class="Estilo8"><br />
          </span><span class="Estilo3">DATOS BASICOS</span> 
          </caption>
          <tr>
            <td width="88" bgcolor="#F9FFEA"><span class="Estilo56"><strong>Apellidos y Nombres </strong></span></td>
            <td colspan="3" bgcolor="#F9FFEA"><div align="left">
                <input name="apenom" type="text" class="Estilo55" id="apenom" value="<?php echo $apellidos_nomsb ?>" size="75" maxlength="75"  />
            </div></td>
          </tr>
          <tr>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Cedula : </strong></div></td>
            <td width="109" bgcolor="#F9FFEA"><input name="cedb" type="text" class="Estilo55" id="cedb" value="<?php echo $cedulab ?>" size="15" maxlength="15" readonly="" /></td>
            <td width="84" bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Codigo : </strong></div></td>
            <td width="281" bgcolor="#F9FFEA"><div align="left">
                <input name="cod" type="text" class="Estilo55" id="cod" value="<?php echo $codigob ?>" size="15" maxlength="15"  />
            </div></td>
          </tr>
          <tr>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Ciudad : </strong></div></td>
            <td bgcolor="#F9FFEA"><input name="ciu" type="text" class="Estilo55" id="ciu" value="<?php echo $ciudadb ?>" size="15" maxlength="15"  /></td>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Direccion : </strong></div></td>
            <td bgcolor="#F9FFEA"><input name="dir" type="text" class="Estilo55" id="dir" value="<?php echo $direccionb ?>" size="45" maxlength="45"  /></td>
          </tr>
          <tr>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Celular : </strong></div></td>
            <td bgcolor="#F9FFEA"><input name="celu" type="text" class="Estilo55" id="celu" value="<?php echo $celularb ?>" size="15" maxlength="15" /></td>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Telefono : </strong></div></td>
            <td bgcolor="#F9FFEA"><div align="left">
                <input name="tel" type="text" class="Estilo55" id="tel" value="<?php echo $telefonob ?>" size="15" maxlength="15"/>
            </div></td>
          </tr>
		   <tr>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Banco : </strong></div></td>
            <td bgcolor="#F9FFEA"><input name="ban" type="text" class="Estilo55" id="ban" value="<?php echo $banco ?>" size="15" maxlength="15" /></td>
           <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Cuenta N° : </strong></div></td>
            <td bgcolor="#F9FFEA"><div align="left">
                <input name="cuen" type="text" class="Estilo55" id="cuen" value="<?php echo $cuenta ?>" size="15" maxlength="15"/>
            </div></td>
          </tr>
		   <tr>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Valor Credito : </strong></div></td>
            <td bgcolor="#F9FFEA"><input name="cre" type="text" class="Estilo55" id="cre" value="<?php echo $valcre ?>" size="15" maxlength="15" /></td>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Valor Juridica : </strong></div></td>
            <td bgcolor="#F9FFEA"><div align="left">
                <input name="jur" type="text" class="Estilo55" id="jur" value="<?php echo $valjur ?>" size="15" maxlength="15"/>
            </div></td>
          </tr>
          <tr>
            <td bgcolor="#F9FFEA"><div align="center" class="Estilo56"><strong>Email : </strong></div></td>
            <td colspan="3" bgcolor="#F9FFEA"><div align="left">
                <input name="ema" type="text" class="Estilo55" id="ema" value="<?php echo $emailb ?>" size="35" maxlength="35"  />
            </div></td>
		  <tr>
			 <td bgcolor="#F9FFEA"><div align="center" class="Estilo55">
                <div align="right">Entidad Laboral: </div>
            </div></td>
            <td colspan="3" bgcolor="#F9FFEA"><div align="left">
                <input name="entlab" type="text" class="Estilo55" id="entlab" value="<?php echo $entidad_laboral ?>" size="45" maxlength="45" />
            </div></td>
		  </tr>
    </table>
     
  </div>
      </caption>
 
 

  <p align="center">
    <input name="grabar" type="submit" class="Estilo3" id="grabar" value="PASAR A VIGENTE" />
  </p>

</form>
</body>
</html>
<?
echo'<table width="650" border="0" cellspacing="2" cellpadding="2" align = "center">
  <tr align="center"> 
    <td colspan="7"><font face="Georgia, Times New Roman, Times, serif" color="#006600"><b align = "center">PAGOS EFECTUADOS</b></font></td>
  </tr>
  <tr align="center" bgcolor="#DDDDDD"> 
    <td width="90" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Valor cuota</font></td>
    <td bgcolor="#DDDDDD" width="55" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099"># cuotas</font></td>
    <td width="300" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Entidad</font></td>
    <td width="140"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Fecha registro</font></td>
  </tr>';				  


	$control = mysql_query('SELECT * FROM  debitos_estado_contable WHERE cedula = "' . $HTTP_GET_VARS["cedu"] . '" ORDER BY cuota ASC  ');
			if (!$control) {
				die('Invalid query debitos: ' . mysql_error());
			}

		while(list($id, $cedula, $nombre, $cuota, $valorcuota, $fecha_registro, $codesc, $unidesc) = mysql_fetch_row($control)) 
		{
		
		$control5 = mysql_query('SELECT * FROM debitos_unidad  WHERE codigo = "' ."$codesc". '" and unidad = "' ."$unidesc". '" ');
			if (!$control5) {
				die('Invalid query descunetps: ' . 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 window.location.href=\"cartera_modificar_estado.php?id=$id\">$valorcuota</a></td>
			
<td width='100'> <font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a  window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$cuota</a></td>
<td width='750'><font face='Geneva, Arial, Helvetica, san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=250,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 window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_registro</a></td></tr>");
						            								   
                               }
 echo "</table>";		
?>