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/acobranzas/credito_rotativo_consulta_fecha_gestion1.php
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta Cobranzas Credito Rotativo gestion por fecha</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;}
	.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;}
    .divirmenu{text-align: center;}
    .irmenu{width: 120px;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 1px;color: #00135F;font-size: 13px;font-weight: 300; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 13px;font-weight: 300; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 1px;color: #00135F;font-size: 13px;font-weight: 700; text-align: right;}
	.tdroja{background-color: #EEE; padding: 1px 1px;color: #CC0005;font-size: 13px;font-weight: 600; text-align: center;}
	.exp{color:#8A0000; font-size:10px;}
    .boton1{width:120px;background-color: #ffffff;color: #000;padding: 4px;border:1px solid #580000;border-radius:2px;}
    .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: 13px;}
    .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>

<script Language="JavaScript"><!--
function validar(formulario)
{
/*
  if (formulario.cedula.value == "")
  {
    alert("Ingrese número de cédula del deudor");
    formulario.cedula.focus();
    return (false);
  }
  return (true);
}
*/
  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()">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">CONSULTA CON FECHA DE GESTION CREDITO ROTATIVO</h3>	
	
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
<table width="697" 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 CON FECHA DE GESTION </td>
  </tr>-->
<tr>
	<td class="fecha" colspan="6">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
	</td>
</tr>

<tr>
    <td class="tdcen" width="29">DE:</td>
    <td class="tdcen" width="93"><input name="fecha1" type="text" id="fecha1" value="0000-00-00" size="13" maxlength="13" ></td>
    <td class="tdcen" width="48">HASTA:</td>
    <td class="tdcen" width="143"><input name="fecha2" type="text" id="fecha2" value="0000-00-00" size="13" maxlength="13" ></td>
	
    <td width="336" colspan="2">
		<input name="consultar" type="submit" class="boton1" id="consultar"value ="Buscar" >
    	<input name="button" type="button" class="irmenu" onclick="window.location.href='menu_cobranzas_credito_rotativo.php'" value="Volver al Men&uacute;">
      <!--<input name="button" type="button" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid" onclick="window.location.reload()" value="Actualizar">    -->  
	</td>
</tr>
</table>  
</form>  
</body>
</html>

<?php

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

if(isset($_POST["consultar"]))
{
	global $dbi;

	echo "<table width='1100' border='0' align='center' cellpadding='3' cellspacing='3'>      
    <tr>
   	<td width='110' class='tdtitulo'>C&eacute;dula</td>
    <td width='73' class='tdtitulo'># carpeta</td>
   	<td width='300' class='tdtitulo'>Apellidos y nombres </td>
    <td width='72' class='tdtitulo'>Contrato</td>
    <td width='50' class='tdtitulo'>Tipo</td>
	<td width='70' class='tdtitulo'>Unidad</td>
    <td width='100' class='tdtitulo'>Codigo Gestion</td>
   	<td width='100' class='tdtitulo'>Fecha Gestion </td>
	<td width='100' class='tdtitulo'>Funcionario Que Realiza Gestion</td>
    <td width='109' class='tdtitulo'>N&uacute;m.Ofic.Envio </td>
    <td width='132' class='tdtitulo' colspan='2'>Fecha ofic.env&iacute;o </td>
    </tr>";
				
				
	$result = mysql_query('SELECT cedula, numero_carpeta, nombre_completo, numero, tipo, oficio_numero, fecha_oficio, unidad, codigo_gestion, fecha_gestion FROM cobranzas_credito_rotativo WHERE (fecha_gestion  between "' . $_POST["fecha1"]. '" and "' .$_POST["fecha2"]. '") and (estado = "1" || estado = "2")  and unidad != "MCPE" and unidad != "CADC" order by fecha_gestion');
	if (!$result) {
		die('Invalid query: ' . mysql_error());
	}

	while(list($cc, $nc, $an, $con, $tip, $nof, $fecha, $unidad, $codigog, $fechag) = mysql_fetch_row($result))
    { 
		$sum = $sum + 1; 
		$tres=substr($fecha, 0, 4);
		$dos=substr($fecha, 5, 2);
		$uno=substr($fecha, 8, 2);
		$fecha = ($uno."-".$dos."-".$tres);	
										
		$resulta1 = mysql_query('SELECT cedula_usuario FROM actuaciones_cobranzas_credito_rotativo WHERE fecha= "' . $fechag. '" and codigo_gestion= "' . $codigog. '" and cedula= "' . $cc. '" ');
		if (!$resulta1) {
			die('Invalid query: ' . mysql_error());
		}

		list($funcionario) = mysql_fetch_row($resulta1);		
	
	
		$resulta2 = mysql_query('SELECT Nombre_Completo FROM Usuarios WHERE cedula= "' . $funcionario. '" ');
		if (!$resulta2) {
			die('Invalid query: ' . mysql_error());
		}

		list($nomfun) = mysql_fetch_row($resulta2);		
										
										
		printf("<tr>
        <td class='tdfull'>".$cc."</a></td>					 
        <td class='tdfull'><a href=\"credito_rotativo_consultar_cobranzas.php?id=$cc&carpeta=$nc\"  target='_blank'>".$nc."</td>					 
		<td class='tdfull'>".$an."</td>
		<td class='tdfull'>".$con."</td>					 
		<td class='tdfull'>".$tip."</td>					 
		<td class='tdfull'>".$unidad."</td>
		<td class='tdfull'>".$codigog."</td>					 
		<td class='tdfull'>".$fechag."</td>
		<td class='tdfull'>".$nomfun."</td>
		<td class='tdfull'>".$nof."</td>
		<td class='tdfull'>".$fecha."</td>");
	}	   
				         // }
	echo "</tr></table>";
             
      
	echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
    <TR>
    <TD class='tdtitulo'>TOTAL REGISTROS</TD>";	
	printf("<tr>
    <td class='tdfull'>".$sum."</td>");    
	echo "</table>";

}
?>