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/afinanciera/consultar_debito2.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, valor_cuota_credito, unidad_desc, codigo_desc, cuotas, cuotas_desc, cuotas_pend, fecha_registro, causal_rechazo, fecha_terminacion, fecha_debito, situacion,usuarios, estado FROM debitos WHERE cedula = "' . $_GET["ced2"] . '" ');
		  if (!$control4) {
				die('Invalid query 4 aqui: ' . mysql_error());
			}
		list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entidad_laboral,  $banco, $cuenta, $tipodeb, $val_cre, $val_jur, $val_deb, $valcuota, $unidad_desc, $codigo_desc, $cuotas, $cuodesc ,$cuotas_pend, $fecha_registro, $causal_rechazo, $fecha_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="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<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>
  
<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>
<style>
	.titulo{
		 text-align: center;
		 font-weight: 600;
	}
	.contenedor{		
    	background: #dbd8c973;
    	border-radius: 16px;
    	margin-top: 10px;
    	box-shadow: 6px 5px 15px -1px rgba(0,0,0,0.75);
	}
	header {
		background-color: #B7271F; 
		text-align: center;
	}
	.formedp{
		margin-top: 5px;
	}
	label{
		text-align: right;
	}
</style>
</head>
<body onload="document.formulario.cedula.focus()" style="font-size: 12px">
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
	<header>
		<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
	</header>
	<div class="container contenedor">
		<h2 class="titulo">CONSULTA DE DATOS DE DEBITO</h2>
		<div style="text-align: center">
			<h4><script languaje="JavaScript">Mostrar_Fecha()</script></h4>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
			  <label for="email" class="col-sm-5">Cedula:</label>
			  <input name="identi" type="text" id="identi" value="<?php echo $cedulab; ?>" size="8" maxlength="8" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
			  <label for="email" class="col-sm-5">Nombre:</label>
			  <input name="apenom" type="text" id="apenom" value="<?php echo $apellidos_nomsb; ?>" size="50" maxlength="50" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Dirección:</label>
				<input name="dire" type="text" id="dire" value="<?php echo $direccionb; ?>" size="30" maxlength="40" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Ciudad:</label>
				<input name="ciu" type="text" id="ciu" value="<?php echo $ciudadb; ?>" size="30" maxlength="40" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Telefono:</label>
				<input name="telefono" type="text" id="telefono" value="<?php echo $telefonob; ?>" size="8" maxlength="8" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Celular:</label>
				<input name="celu" type="text" id="celu" value="<?php echo $celularb; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Fecha Debitar:</label>
				<input name="fecha_deb" type="text" id="fecha_deb" value="<?php echo $fecha_debito; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Email:</label>
				<input name="ema" type="text" id="ema" value="<?php echo $emailb; ?>" size="30" maxlength="50" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Banco:</label>
				<input name="ban" type="text" id="ban" value="<?php echo $banco; ?>" size="20" maxlength="15" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Cuenta:</label>
				<input name="cuen" type="text" id="cuen" value="<?php echo $cuenta; ?>" size="30" maxlength="30" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Valor Credito:</label>
				<input name="val_cre" type="text" id="val_cre" value="<?php echo $val_cre; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Valor Juridica:</label>
				<input name="val_jur" type="text" id="val_jur" value="<?php echo $val_jur; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Valor Total:</label>
				<input name="val_deb" type="text" id="val_deb" value="<?php echo $val_deb; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Cuota a Debitar:</label>
				<input name="valcuota" type="text" id="valcuota" value="<?php echo $valcuota; ?>"  size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Unidad y Codigo:</label>
				<input name="unidad" type="text" id="unidad" value="<?php echo $unidad_desc; ?>" size="10" maxlength="10" readonly="" class="col-sm-4">
				<input name="cod" type="text" id="cod" value="<?php echo $codigo_desc; ?>"  size="10" maxlength="10" readonly="" class="col-sm-3">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">No. Cuotas:</label>
				<input name="cuotas" type="text" id="cuotas" value="<?php echo $cuotas; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Cuotas Descontadas:</label>
				<input name="cuodesc" type="text" id="cuodesc" value="<?php echo $cuodesc; ?>" size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5" >Cuotas Pendientes:</label>
				<input name="pend" type="text" id="pend" value="<?php echo $cuotas_pend; ?>"  size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Fecha ultimo Descuento:</label>
				<input name="fecha_registro" type="text" id="fecha_registro" value="<?php echo $fecha_registro; ?>"  size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Situacion:</label>
				<input name="situacion" type="text" id="situacion" value="<?php echo $situacion; ?>"  size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Causal Terminacion:</label>
				<input name="histo" type="text" id="histo" value="<?php echo $histo; ?>" size="20" maxlength="25" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Fecha Terminacion:</label>
				<input name="fecha_rechazo" type="text" id="fecha_rechazo" value="<?php echo $fecha_rechazo; ?>"  size="10" maxlength="10" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Vigente o historico:</label>
				<input name="estad" type="text" id="estad" value="<?php echo $estado; ?>" size="20" maxlength="25" readonly="" class="col-sm-7">
			</div>
			<div class="formedp col-sm-6">
				<label for="email" class="col-sm-5">Tipo Debito:</label>
				<input name="tipodeb" type="text" id="tipodeb" value="<?php echo $tipodeb; ?>"  size="25" maxlength="20" readonly="" class="col-sm-7">
			</div>
		</div>
		<div class="col-sm-12">
			<div class="formedp col-sm-6" style="margin-bottom: 10px">
				<label for="email" class="col-sm-5" >Usuario:</label>
				<input name="usuario" type="text" id="usuario" value="<?php echo $usuarios; ?>" size="30" maxlength="30" readonly="" class="col-sm-7">
			</div>
		</div>
	</div>
</form>  
</body>
</html>
<?
echo'<div class="container">
		<h3 class="titulo"> PAGOS EFECTUADOS</h3>
	 
  <table class="table table-bordered">  
  <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">Usuarios</font></td>
	<td width="300" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Causal</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></div>'
	;				  

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

		while(list($id, $cedula, $nombre, $cuota, $valorcuota,$usuarios, $fecha_registro, $codesc, $unidesc,$causal) = 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);

		}
		 
		 $cont18 = mysql_query('SELECT concepto FROM causales_rechazo_debitos WHERE concepto = "'.$causal.'" ');
		  if (!$cont18) {
				die('Invalid query 42: ' . mysql_error());
			}
		list($causal) = mysql_fetch_row($cont18); 		
		
 	  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='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>$usuarios</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>$causal</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>";		
?>