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/acobranzas/consultar_debito.php
<?php
global $dbi;

require_once("../Conectarse.php");

$control4 = mysql_query('SELECT cedula, nombres, dirrecion, telefono, celular, ciudad, email, entidad_laboral, banco, cuenta, tipo_debito,  valor_credito, valor_juridica, valor_debitar, unidad_desc, codigo_desc, cuotas, cuotas_desc, cuotas_pend, fecha_registro, causal_rechazo, fecha_debito, situacion,usuarios, estado FROM debitos WHERE cedula = "'.$_GET["ced"].'" ');
		  if (!$control4) {
				die('Invalid query 4 aqui: ' . mysql_error());
			}
		list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entidad_laboral,  $banco, $cuenta, $tipodeb,$valor_credito, $valor_juridica, $valor_debitar, $unidad_desc, $codigo_desc, $cuotas, $cuodesc ,$cuotas_pend, $fecha_registro, $causal_rechazo,$fecha_debito,$situacion,$usuarios,$esta) = mysql_fetch_row($control4);	
			
	  
                    
							   if ($esta == 0)
							   {
							   $estado = "HISTORICO";
							   }   				
							   else
							   {
							   $estado = "VIGENTE";
							   }

        
	$resu1 = mysql_query('SELECT historico FROM debito_historico WHERE codigo =  "' ."$causal_rechazo". '" ');
			if (!$resu1) {
				die('Invalid query: ' . mysql_error());
			}	 
			list($histo) = mysql_fetch_row($resu1);
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta Datos debito</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:#FFFFFF;font-family:"Lucida Sans Unicode", "Lucida Grande", 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;}
	.subtitulos{width: 100%;text-align: left;color: #b20606;padding: 2px 0;font-size: 13px;}
    table{margin: 0 auto;border: 8px solid #bebebe; 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: #D7D7D7 solid 0.2px;}
    .tdizq{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 14px;font-weight: 400; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 14px;font-weight: 400; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 14px;font-weight: 400; text-align: right;}
	.tdroja{background-color: #EEE; padding: 1px 1px;color: #CC0005;font-size: 14px;font-weight: 600; text-align: right;}
	.tdi{background-color: #FDF8D5; padding: 1px 1px;color: #C0292E;font-size: 14px;font-weight: 500; text-align: left;}
    .tdc{background-color: #FDF8D5; padding: 1px 1px;color: #C0292E;font-size: 14px;font-weight: 500; text-align: center;}
    .tdd{background-color: #FDF8D5; padding: 1px 1px;color: #C0292E;font-size: 14px;font-weight: 500; text-align: right;}
	.exp{color:#8A0000; font-size:12px;}
    .boton1{width:200px;background-color: #ffffff;color: #000;padding: 4px;border:1px solid #580000;border-radius:2px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
	.direcciona{width: 200px;background-color: #D4090C;color: #fff; padding: 4px;border-radius: 3px;}
	.direcciona:hover{background-color: #67a0d9; color: #000;}
    input[type=text]{border:groove #191919 0.5px; border-radius: 3px; padding: 3px;background-color: #FFFFFF; font-weight:700px;}
	select{border:solid #191919 0.5px; border-radius: 3px; padding: 3px;background-color: #FFFFFF; font-weight:600px; }
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
    .tdfull{background-color: #fff; color: #000; padding: 5px; text-align: center; font-size: 12px; font-family:Verdana, Geneva, sans-serif;}
	.tdjustify{background-color: #fff; color: #000; padding: 5px; text-align: justify; font-size: 12px; font-family:Verdana, Geneva, sans-serif;}
    .botonnew{width: 90px; background-color: #C0292E;color: #FFFFFF;padding: 1px;border-radius:5px;}
    .botonnew:hover{background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
</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+"</b>")
}					
</script>
  
<script>
mesk=new Array();mesk[10]="A";mesk[11]="B";mesk[12]="C";mesk[13]="D";mesk[14]="E";mesk[15]="F";A=10;B=11;C=12;D=13;E=14;F=15;let="ABCDEF";function mes(num){if(let.indexOf(num) != -1){return eval(num)};else{if(num < 10){return eval(num)};else{return mesk[num]}}};
function color(begin,einde,stappen,stap){
hh1=(mes(begin.charAt(0))*16)+mes(begin.charAt(1));
hh2=(mes(begin.charAt(2))*16)+mes(begin.charAt(3));
hh3=(mes(begin.charAt(4))*16)+mes(begin.charAt(5));
pp1=(mes(einde.charAt(0))*16)+mes(einde.charAt(1));
pp2=(mes(einde.charAt(2))*16)+mes(einde.charAt(3)); 
pp3=(mes(einde.charAt(4))*16)+mes(einde.charAt(5));  

if(hh1 < pp1){ff1=hh1+Math.floor((pp1-hh1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/16)*16))+"\'");}
;else{ff1=hh1-Math.floor((hh1-pp1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/16)*16))+"\'");}
if(hh2 < pp2){ff2=hh2+Math.floor((pp2-hh2)/stappen*stap);
ff2=eval("\'"+mes(Math.floor(ff2/16))+"\'")+eval("\'"+mes(ff2-(Math.floor(ff2/16)*16))+"\'");}
;else{ff2=hh2-Math.floor((hh2-pp2)/stappen*stap);
ff2=eval("\'"+mes(Math.floor(ff2/16))+"\'")+eval("\'"+mes(ff2-(Math.floor(ff2/16)*16))+"\'");}
if(hh3 < pp3){ff3=hh3+Math.floor((pp3-hh3)/stappen*stap);
ff3=eval("\'"+mes(Math.floor(ff3/16))+"\'")+eval("\'"+mes(ff3-(Math.floor(ff3/16)*16))+"\'");}
;else{ff3=hh3-Math.floor((hh3-pp3)/stappen*stap);
ff3=eval("\'"+mes(Math.floor(ff3/16))+"\'")+eval("\'"+mes(ff3-(Math.floor(ff3/16)*16))+"\'");}
;return ff1+ff2+ff3}
mesf=new Array();mesh=new Array();num2=0;num3=0;num4=0;txt="";function shape(){colorsh.innerHTML="<font color='#"+background_color+"'>"+mesf[num2]+"<\/font>";for(i=0;i != mesf[num2].length;i++){mesh[i]=background_color;};for(i=0;i != mesf[num2].length;i++){mesh[i+mesf[num2].length]=color(background_color,text_color,mesf[num2].length,i);};for(i=(mesf[num2].length*2);i != (mesf[num2].length*3);i++){mesh[i]=text_color};shape2()};function shape2(){for(i=0;i != mesf[num2].length;i++){txt=txt+"<font color='"+mesh[i+num3]+"'>"+mesf[num2].charAt(i)+"<\/font>";};colorsh.innerHTML=txt;txt="";if(num3 != (mesf[num2].length*2)){num3++;setTimeout("shape2()",50)};else{num2=0;num3=0;txt=background_color;background_color=text_color;text_color=txt;txt="";setTimeout("shape()",1000);}}
</script>

</head>
<body onload="document.formulario.cedula.focus()">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">CONSULTA DE DATOS DE DEBITO</h3>	
	
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
<table width="850" border="1" align="center" cellpadding="3" cellspacing="3">    
  <!--<tr >
    <td colspan="6"  ><div align="center"><span class="Estilo2">CONSULTA DE DATOS DE DEBITO </td>
  </tr>-->
<tr >
    <td class="fecha" colspan="6"><script languaje="JavaScript">Mostrar_Fecha()</script></td>
</tr>

<tr>
	<td class="tdder">C&eacute;dula y Nombre</td>
    <td class="tdizq"><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 >
   	<td class="tdder">Direccion:</td>
  	<td class="tdizq"><input name="dire" type="text" id="dire" value="<?php echo $direccionb; ?>" size="30" maxlength="40" readonly=""></td>
    <td class="tdder">Ciudad:</td>
    <td class="tdizq"><input name="ciu" type="text" id="ciu" value="<?php echo $ciudadb; ?>" size="30" maxlength="40" readonly=""></td>
</tr>

<tr >
	<td class="tdder">Telefono:</td>
    <td class="tdizq"><input name="telefono" type="text" id="telefono" value="<?php echo $telefonob; ?>" size="8" maxlength="8" readonly=""></td>
	<td class="tdder">Celular</td>
    <td class="tdizq"><input name="celu" type="text" id="celu" value="<?php echo $celularb; ?>" size="10" maxlength="10" readonly=""></td>
</tr>


<tr >
	<td class="tdder">Fecha a Debitar </td>
    <td class="tdizq"><input name="fecha_deb" type="text" id="fecha_deb" value="<?php echo $fecha_debito; ?>" size="10" maxlength="10" readonly=""></td>
    <td class="tdder">Email:</td>
	<td class="tdizq"colspan="3" ><input name="ema" type="text" id="ema" value="<?php echo $emailb; ?>" size="30" maxlength="50" readonly=""></td>
</tr>
	
  
<tr >
 	<td class="tdder">Banco:</td>
    <td class="tdizq"><input name="ban" type="text" id="ban" value="<?php echo $banco; ?>" size="20" maxlength="15" readonly=""></td>
    <td class="tdder">Cuenta:</td>
   	<td class="tdizq" colspan="3"><input name="cuen" type="text" id="cuen" value="<?php echo $cuenta; ?>" size="30" maxlength="30" readonly=""></td>
</tr>

<tr >
	<td class="tdder">Valor Credito:</td>
    <td class="tdizq" ><input name="val_cre" type="text" id="val_cre" value="<?php echo $valor_credito; ?>" size="10" maxlength="10" readonly=""></td>
    <td class="tdder">Valor  Juridica:</td>
    <td class="tdizq" colspan="3"  ><input name="val_jur" type="text" id="val_jur" value="<?php echo $valor_juridica; ?>" size="10" maxlength="10" readonly=""></td>
</tr>

<tr >
	<td class="tdder">Valor Total Debito:</td>
    <td class="tdizq" ><input name="val_deb" type="text" id="val_deb" value="<?php echo $valor_debitar; ?>" size="10" maxlength="10" readonly=""></td>
  	<td class="tdder">Valor cuota a Debitar: </td>
    <td class="tdizq" colspan="3"  ><input name="valcuota" type="text" id="valcuota" value="<?php echo $valor_debitar; ?>"  size="10" maxlength="10" readonly=""></td>
</tr>

<tr >  
	<td class="tdder">Unidad y Codigo:</td>
    <td class="tdizq">
		<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=""></td>
  	<td class="tdder">N° Cuotas</td>
    <td class="tdizq"><input name="cuotas" type="text" id="cuotas" value="<?php echo $cuotas; ?>" size="10" maxlength="10" readonly=""></td>
</tr>
	
<tr >
	<td class="tdder">Cuotas Descontadas</td>
    <td class="tdizq"><input name="cuodesc" type="text" id="cuodesc" value="<?php echo $cuodesc; ?>" size="10" maxlength="10" readonly=""></td>
    <td class="tdder">Cuotas Pendientes: </td>
    <td class="tdizq" colspan="3"  ><input name="pend" type="text" id="pend" value="<?php echo $cuotas_pend; ?>"  size="10" maxlength="10" readonly=""></td>
</tr>
	
<tr>
	<td class="tdder">Fecha ultimo Descuento: </td>
    <td class="tdizq"><input name="fecha_registro" type="text" id="fecha_registro" value="<?php echo $fecha_registro; ?>"  size="10" maxlength="10" readonly=""></td>
    <td class="tdder">Situacion: </td>
    <td class="tdizq"><input name="situacion" type="text" id="situacion" value="<?php echo $situacion; ?>"  size="10" maxlength="10" readonly=""></td>
</tr>
	
<tr >
	<td class="tdder">Causal Terminacion:</td>
    <td class="tdizq"><input name="histo" type="text" id="histo" value="<?php echo $histo; ?>" size="20" maxlength="25" readonly=""></td>
    <td class="tdder">Fecha Terminacion: </td>
    <td class="tdizq" colspan="3"  ><input name="fecha_rechazo" type="text" id="fecha_rechazo" value="<?php echo $fecha_rechazo; ?>"  size="10" maxlength="10" readonly=""></td>
</tr>

	
<tr >
	<td class="tdder">Vigente o historico:</td>
    <td class="tdizq"><input name="estad" type="text" id="estad" value="<?php echo $estado; ?>" size="20" maxlength="25" readonly=""></td>
    <td class="tdder">Tipo Debito: </td>
    <td class="tdizq" colspan="3"  ><input name="tipodeb" type="text" id="tipodeb" value="<?php echo $tipodeb; ?>"  size="25" maxlength="20" readonly=""></td>
</tr>
  
<tr >
 	<td class="tdder">Usuario:</td>
    <td class="tdizq" colspan="3"  ><input name="usuario" type="text" id="usuario" value="<?php echo $usuarios; ?>" size="30" maxlength="30" readonly=""></td>
</tr>
  
</table>  

</form>  

</body>
</html>
<?
echo'<table width="750" 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></td>
</tr>
<tr> 
	<td class="tdtitulo" width="90" >Valor cuota</td>
    <td class="tdtitulo" width="55" ># cuotas</td>
	<td class="tdtitulo" width="300" >Causal Rechazo</td>
    <td class="tdtitulo" width="300" >Usuarios</td>
    <td class="tdtitulo" width="300" >Entidad</td>
    <td class="tdtitulo" width="140">Fecha registro</td>
  </tr>';				  


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

	while(list($id, $cedula, $nombre, $cuota, $valorcuota,$usuarios, $fecha_registro, $codesc, $unidesc,$causalrecha) = mysql_fetch_row($control)) 
	{
		if($codesc == 0)
		{
			$concepto = $unidesc;	
		}
		
		else
		{
			$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>
		<td class='tdfull' width='100'><a window.location.href=\"cartera_modificar_estado.php?id=$id\">$valorcuota</a></td>
			
		<td class='tdfull' width='100'><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 class='tdfull' width='100'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$causalrecha</a></td>


		<td class='tdfull' width='100'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$usuarios</a></td>

		<td class='tdfull' width='750'><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 class='tdfull' width='100'><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>";		
?>