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/afinanciera/deb_vigente.php
<?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, unidad_desc, codigo_desc,  cuotas_pend, fecha_registro, causal_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, $unidad_desc, $codigo_desc, $cuotas_pend, $fecha_registro, $causal_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 = '' 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>
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
<style type="text/css">
	*{margin: 0;padding: 0;}
    body{background-color:#EAEAEA;font-family:Geneva, Arial, Helvetica, sans-serif;}
    header {background-color: #B7271F; text-align: center;}
    .cerrarsesion{width: auto;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
    .cerrarsesion:hover{background-color: #ffffff;color: #000;}
    .titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
    table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
    .divirmenu{text-align: center;}
    .irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
    .irmenu:hover{background-color: #67a0d9; color: #000;}
    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
    td{border: #969696 solid 1px;}
    .tdizq{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: right;}
	.exp{color:#8A0000; font-size:13px;}
    .boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:5px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
    .tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
    .botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;border-radius:5px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
</style>
</head>

<body>
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">INGRESAR DEBITOS</h3>

<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>-->
<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 class="fecha" colspan="6">DATOS BASICOS</td>
</tr>          
          
<tr>
  	<td class="tdder" width="88">Apellidos y Nombres </td>
    <td class="tdizq" colspan="3">
		<input name="apenom" type="text" class="Estilo55" id="apenom" value="<?php echo $apellidos_nomsb ?>" size="75" maxlength="75"  />
    </td>
</tr>

<tr>
	<td class="tdder">Cedula </td>
    <td class="tdizq" width="109" >
    <input name="cedb" type="text" class="Estilo55" id="cedb" value="<?php echo $cedulab ?>" size="15" maxlength="15" readonly="" />
    </td>
    <td class="tdder" width="84" >Codigo </td>
    <td class="tdizq" width="281">
    <input name="cod" type="text" class="Estilo55" id="cod" value="<?php echo $codigob ?>" size="15" maxlength="15"  />
    </td>
</tr>


<tr>
	<td class="tdder">Ciudad </td>
  	<td class="tdizq"><input name="ciu" type="text" class="Estilo55" id="ciu" value="<?php echo $ciudadb ?>" size="15" maxlength="15"  /></td>
   	<td class="tdder">Direccion</td>
    <td class="tdizq"><input name="dir" type="text" class="Estilo55" id="dir" value="<?php echo $direccionb ?>" size="45" maxlength="45"  /></td>
</tr>

<tr>
	<td class="tdder">Celular</td>
    <td class="tdizq"><input name="celu" type="text" class="Estilo55" id="celu" value="<?php echo $celularb ?>" size="15" maxlength="15" /></td>
    <td class="tdder">Telefono</td>
    <td class="tdizq"><input name="tel" type="text" class="Estilo55" id="tel" value="<?php echo $telefonob ?>" size="15" maxlength="15"/></td>
</tr>


<tr>
	<td class="tdder">Banco</td>
    <td class="tdizq"><input name="ban" type="text" class="Estilo55" id="ban" value="<?php echo $banco ?>" size="15" maxlength="15" /></td>
    <td class="tdder">Cuenta N°</td>
    <td class="tdizq"><input name="cuen" type="text" class="Estilo55" id="cuen" value="<?php echo $cuenta ?>" size="15" maxlength="15"/></td>
</tr>


<tr>
	<td class="tdder">Valor Credito</td>
    <td class="tdizq"><input name="cre" type="text" class="Estilo55" id="cre" value="<?php echo $valcre ?>" size="15" maxlength="15" /></td>
    <td class="tdder">Valor Juridica </td>
    <td class="tdizq"><input name="jur" type="text" class="Estilo55" id="jur" value="<?php echo $valjur ?>" size="15" maxlength="15"/></td>
</tr>

<tr>
	<td class="tdder">Email </td>
    <td class="tdizq" colspan="3" >
        <input name="ema" type="text" class="Estilo55" id="ema" value="<?php echo $emailb ?>" size="35" maxlength="35"  />
    </td>
</tr>


<tr>
	<td class="tdder">Entidad Laboral</td>
    <td class="tdizq" colspan="3">
      <input name="entlab" type="text" class="Estilo55" id="entlab" value="<?php echo $entidad_laboral ?>" size="45" maxlength="45" />
    </td>
</tr>
</table>
     
  </div>
 
 

  <p align="center">
    <input name="grabar" type="submit" class="boton1" 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>";
		
?>