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

require_once("Conectarse.php");

$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, debito_jur, debito_cre, cuotas_pend, fecha_registro, causal_rechazo, fecha_rechazo, fecha_debito,  estado, historico FROM debitos WHERE cedula = "' . $HTTP_GET_VARS["id"] . '" ');
		  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, $debito_jur, $debito_cre, $cuotas_pend, $fecha_registro, $causal_rechazo, $fecha_rechazo, $fecha_debito, $esta, $historico) = mysql_fetch_row($control4);	
			
		$resu = mysql_query('SELECT causal FROM debito_causal WHERE codigo =  "' ."$causal_rechazo". '" ');
			if (!$resu) {
				die('Invalid query: ' . mysql_error());
			}	 
			list($causala) = mysql_fetch_row($resu);	
        
	$resu1 = mysql_query('SELECT historico FROM debito_historico WHERE codigo =  "' ."$historico". '" ');
			if (!$resu1) {
				die('Invalid query: ' . mysql_error());
			}	 
			list($histo) = mysql_fetch_row($resu1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Consulta Datos debito</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Estilo1 {font-family: "Arial Narrow"}
.Estilo2 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.Estilo10 {font-weight: bold}
.Estilo17 {font-size: 14}
.Estilo18 {font-family: "Arial Narrow"; font-weight: bold; font-size: 14; }
.Estilo19 {font-family: "Arial Narrow"; font-weight: bold; }
.Estilo24 {color: #FF0000}
-->
</style>

<script Language="JavaScript"><!--
function validar(formulario)
{
  if (formulario.dia_act.value > 31)
  {
    alert("El número de día no se debe exceder de 31");
    formulario.dia_act.focus();

    return (false);
  }

  if (formulario.mes_act.value > 12)
  {
    alert("El número del mes no se debe exceder de 12");
    formulario.mes_act.focus();
    return (false);
  }
  return (true);
}
//--></script>

<script languaje="JavaScript">
function Mostrar_Fecha()
{
         var mydate=new Date()
         var year=mydate.getYear()
         if (year < 1000)
                 year+=1900
                 var day=mydate.getDay()
                 var month=mydate.getMonth()
                 var daym=mydate.getDate()
                 if (daym<10)
                    daym="0"+daym
                    var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
                    var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
                    document.write("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}					
</script>



</head>
<body onload="document.formulario.cedula.focus()">
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
<table width="420" border="0" align="center" cellpadding="3" cellspacing="3">    
  <tr valign="baseline" bgcolor="#0099FF">
    <td colspan="6" align="right" nowrap><div align="center"><span class="Estilo2">CONSULTA DE DATOS DE DEBITO </span></div></td>
  </tr>
  <tr valign="baseline" bgcolor="#0099FF">
    <td colspan="6" align="right" nowrap><div align="center" class="Estilo2"><script languaje="JavaScript">Mostrar_Fecha()</script></div></td>
  </tr>
  <tr valign="baseline" bgcolor="#0099FF">
    <td width="196" align="right" nowrap><span class="Estilo18">C&eacute;dula y Nombre</span></td>
    <td><input name="identi" type="text" id="identi" value="<?php echo $cedulab; ?>" size="8" maxlength="8" readonly=""></td>
    <td colspan="4"><input name="apenom" type="text" id="apenom" value="<?php echo $apellidos_nomsb; ?>" size="50" maxlength="50" readonly=""></td>
    </tr>
  <tr valign="baseline" bgcolor="#0099FF">
   <td><div align="right" class="Estilo18">Direccion: </div></td>
      <td width="40"><input name="dire" type="text" id="dire" value="<?php echo $direccionb; ?>" size="30" maxlength="40" readonly=""></td>
      <td width="150"><div align="right" class="Estilo18">Ciudad:</div></td>5
      <td width="10"><input name="ciu" type="text" id="ciu" value="<?php echo $ciudadb; ?>" size="30" maxlength="40" readonly=""></td>
  </tr>
    <tr valign="baseline" bgcolor="#0099FF">
	<td><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
        <div align="right"><span class="Estilo5">Telefono:</span></div>
      </div></td>
      <td width="40"><input name="telefono" type="text" id="telefono" value="<?php echo $telefonob; ?>" size="8" maxlength="8" readonly=""></td>
	  
      <td align="right" nowrap><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
        <div align="right"><span class="Estilo5">Ceular </span></div>
      </div></td>
      <td><input name="celu" type="text" id="celu" value="<?php echo $celularb; ?>" size="10" maxlength="10" readonly=""></td>

    </tr>
    <tr valign="baseline" bgcolor="#0099FF">
  <td align="right" nowrap><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
        <div align="right"><span class="Estilo5">Fecha a Debitar </span></div>
      </div></td>
      <td><input name="fecha_deb" type="text" id="fecha_deb" value="<?php echo $fecha_debito; ?>" size="10" maxlength="10" readonly=""></td>
      <td><div align="right" class="Estilo18">Email: </div></td>
<td colspan="3"><input name="ema" type="text" id="ema" value="<?php echo $emailb; ?>" size="30" maxlength="50" readonly=""></td>
    </tr>
	
  
    <tr valign="baseline" bgcolor="#FFFFCC">
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Banco:</strong></span></td>
      <td align="right" nowrap><div align="left" class="Estilo19">
          <input name="ban" type="text" id="ban" value="<?php echo $banco; ?>" size="20" maxlength="15" readonly="">
      </div></td>
      <td align="right" nowrap class="Estilo19">Cuenta:</td>
      <td colspan="3" align="right" nowrap><div align="left"><span class="Estilo19">
          <input name="cuen" type="text" id="cuen" value="<?php echo $cuenta; ?>" size="15" maxlength="15" readonly="">
      </span></div></td>
    </tr>
    <tr valign="baseline" bgcolor="#FFFFCC">
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Valor Credito:</strong></span></td>
      <td align="right" nowrap><div align="left"><span class="Estilo19">
          <input name="val_cre" type="text" id="val_cre" value="<?php echo $debito_cre; ?>" size="10" maxlength="10" readonly="">
      </span></div></td>
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Valor  Juridica:</strong></span></td>
      <td colspan="3" align="right" nowrap><div align="left"><span class="Estilo19">
          <input name="val_jur" type="text" id="val_jur" value="<?php echo $debito_jur; ?>" size="10" maxlength="10" readonly="">
      </span></div></td>
    </tr>
    <tr valign="baseline" bgcolor="#FFFFCC">
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Valor Total Debito:</strong></span></td>
      <td align="right" nowrap><div align="left"><span class="Estilo1">
        <input name="val_deb" type="text" id="val_deb" value="<?php echo $val_deb; ?>" size="10" maxlength="10" readonly="">
      </span></div></td>
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Cuotas a Debitar:</strong></span> </td>
      <td colspan="3" align="right" nowrap><div align="left"><span class="Estilo19"><span class="Estilo17">
        <input name="cuota_deb" type="text" id="cuota_deb" value="<?php echo $cuo_deb; ?>"  size="10" maxlength="10" readonly="">
      </span></span></div></td>
    </tr>
    <tr valign="baseline" bgcolor="#FFFFCC">
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Unidad y Codigo:</strong></span></td>
      <td align="right" nowrap><div align="left"><span class="Estilo1">
        <input name="unidad" type="text" id="unidad" value="<?php echo $unidad_desc; ?>" size="10" maxlength="10" readonly="">
     
      
        <input name="cod" type="text" id="cod" value="<?php echo $codigo_desc; ?>"  size="10" maxlength="10" readonly="">  </span></div></td>
      
	  <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Cuotas Pendientes:</strong></span> </td>
      <td colspan="3" align="right" nowrap><div align="left"><span class="Estilo19"><span class="Estilo17">
        <input name="pend" type="text" id="pend" value="<?php echo $cuotas_pend; ?>"  size="10" maxlength="10" readonly="">
      </span></span></div></td>
    </tr>
	  <tr valign="baseline" bgcolor="#FFFFCC">
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Casusal Rechazo:</strong></span></td>
      <td align="right" nowrap><div align="left"><span class="Estilo1">
        <input name="causal" type="text" id="causal" value="<?php echo $causala; ?>" size="20" maxlength="25" readonly="">
      </span></div></td>
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Fecha Rechazo:</strong></span> </td>
      <td colspan="3" align="right" nowrap><div align="left"><span class="Estilo19"><span class="Estilo17">
        <input name="fecha_rechazo" type="text" id="fecha_rechazo" value="<?php echo $fecha_rechazo; ?>"  size="10" maxlength="10" readonly="">
      </span></span></div></td>
    </tr>
	 <tr valign="baseline" bgcolor="#FFFFCC">
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Vigente o historico:</strong></span></td>
      <td align="right" nowrap><div align="left"><span class="Estilo1">
        <input name="estad" type="text" id="estad" value="<?php echo $esta; ?>" size="20" maxlength="25" readonly="">
      </span></div></td>
      <td align="right" nowrap><span class="Estilo1 Estilo29"><strong>Causal Historico:</strong></span> </td>
      <td colspan="3" align="right" nowrap><div align="left"><span class="Estilo19"><span class="Estilo17">
        <input name="historico" type="text" id="historico" value="<?php echo $histo; ?>"  size="25" maxlength="20" readonly="">
      </span></span></div></td>
    </tr>
  </table>  

</form>  

<table width="640" border="1" cellspacing="3" cellpadding="3" align="center">
  <tr valign="baseline" bgcolor="#0099FF">
  <td width="15" align="center" nowrap><span class="Estilo18">#</span></div></td>  
  <td width="480" align="center" nowrap><span class="Estilo18">GESTION</span></div></td>
  <td width="100" align="center" nowrap><span class="Estilo18">FECHA</span></div></td> 
  </tr>

<?php
	 require_once("mainfile.php");
     include ("config.php");
     global $dbi;
	 $i=0;
	 
	 $result = mysql_query('SELECT id, cedula, gestion, fecha_gestion FROM debitos_gestion WHERE cedula = "' . $HTTP_GET_VARS["id"] . '" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
	
     if($result)
     {				 
                 while(list($id, $cedula, $gestion, $fecha) = mysql_fetch_row($result)) 
                  { 
				    $i=$i + 1;
                    $tres=substr($fecha, 0, 4);
                    $dos=substr($fecha, 5, 2);
                    $uno=substr($fecha, 8, 2);
                    $fecha = ($uno."-".$dos."-".$tres);	
			
                
				  
                     printf("<tr>
                     <td bgcolor='#ECE9D8'><div align='center' class='Estilo14 Estilo1'>".$i."</a></span></div></td>
					 <td bgcolor='#C5D6FC'><div align='center' class='Estilo14 Estilo1'>".$gestion."</span></div></td>
					 <td bgcolor='#C5D6FC'><div align='center' class='Estilo14 Estilo1'>".$fecha."</span></div></td>");
				  } //Terminación del ciclo while					    
			         echo "</tr></table>";
       }					 
	   
?>

<table width="663" align="center">
  <tr>
    <td><div align="center">
      <input name="button" type="button" class="Estilo10" onClick="javascript:window.close()" value="Cerrar Ventana">

    </div></td>
  </tr>
  <tr>
    <td><div align="center">		  
<h3><center><div id="colorsh" style="cursor:hand"></div></center></h3>
<script>
background_color=	"3a6ca3" // use capital letters
text_color=		"99FFFF" // use capital letters
mesf[0]=		"SI DESEA SALIR OPRIMA CERRAR VENTANA"
shape()
</script>
</div>
</td>
  </tr>
</table>

<p>&nbsp;</p><p>  </font></p>
</body>
</html>