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/record_cobranzas1_financiera.php
<?php include("b.php"); ?>
<!DOCTYPE HTML>
<html>
<head>
<title>Cobranzas Juridica 2 Morosos  </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: 2px 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 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:12px;}
    .boton1{width:90px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:3px;}
    .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: 1px; text-align: center; font-size: 11px; font-weight: 700}
    .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>

<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 DE  DATOS DE COBRANZAS</h3>
<?php echo "<div class='cerrarsesion' onclick='location.href=\"../cerrar_session.php\"'>CERRAR SESION</div>";?>

<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="4" align="right" nowrap><div align="center"><span class="Estilo2">CONSULTA DE  DATOS DE COBRANZAS </span></div></td>
  </tr>-->
<tr>
    <td class="fecha" colspan="4" nowrap><div align="center" class="Estilo2">
      <script languaje="JavaScript">Mostrar_Fecha()</script></div></td>
  	</tr>
	<tr>
    <td class="tdcen" width="141">C&eacute;dula del Deudor</td>
    <td class="tdcen" width="90"><input name="cedula" type="text" id="cedula" value="" size="15" maxlength="15" ></td>
    <td class="tdcen" width="436" colspan="2"><input name="consultar" type="submit" id="consultar"value ="Buscar" class="boton1">
      <input name="button" type="button" class="irmenu" onclick="window.location.href='menu_gerencia_financiera.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">
      <input name="button" type="button" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid" onclick="history.forward()" value="Adelante"></td>
  </tr>
  </table>  
</form>  
</body>
</html>

<?php


if(isset($_POST["consultar"]))
{

	global $dbi;
	require_once("../Conectarse.php");
	
	$result = mysql_query('SELECT cedula, estado FROM cobranzas WHERE cedula = "' . $_POST[cedula] . '" and estado = "0" ');
	if (!$result) {
		die('Invalid query: ' . mysql_error());
	}
	
	$row = mysql_fetch_row($result);
	$Cedula = $row[0];
	$Estado = $row[1];

	/*$msql = "select cedula, estado from cobranzas where cedula = $cedula and estado = '0'";
	$file = mysql_query($msql, $dbi);	
	if($file)
	{
    	list($cedula, $estado) = mysql_fetch_array($file);*/
        if($Cedula)
        {
          	echo "<table width='1000' border='0' align='center' cellpadding='3' cellspacing='3'>      
            <tr>
            <td class='tdtitulo'>C&eacute;dula</td>
            <td class='tdtitulo'># carpeta</td>
            <td class='tdtitulo'>Apellidos y nombres </td>
            <td class='tdtitulo'>Contrato</td>
            <td class='tdtitulo'>Tipo</td>
            <td class='tdtitulo'>Codigo Gestion </td>
            <td class='tdtitulo'>Fecha Gestion </td>
			<td class='tdtitulo'>N&uacute;m.Ofic.Envio </td>
			<td class='tdtitulo'>Fecha ofic.env&iacute;o </td>
                         
			</tr>";
				
			$result = mysql_query('SELECT cedula, numero_carpeta, nombre_completo, numero, tipo, oficio_numero, fecha_oficio, codigo_gestion, fecha_gestion FROM cobranzas WHERE cedula = "' . $_POST[cedula] . '" and estado = "0" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
            /*   $sql = "select cedula, numero_carpeta, nombre_completo, numero, tipo, oficio_numero, fecha_oficio, codigo_gestion, fecha_gestion from cobranzas where cedula = $cedula  and estado = '0' ";
            $control = mysql_query($sql, $dbi);
            if($control)
            {				 
            	while(list($cc, $nc, $an, $con, $tip, $nof, $fecha, $cod, $fechagest) = mysql_fetch_array($control)) */
				while(list($cc, $nc, $an, $con, $tip, $nof, $fecha, $cod, $fechagest) = mysql_fetch_row($result))
                { 
           			$tres=substr($fecha, 0, 4);$dos=substr($fecha, 5, 2);$uno=substr($fecha, 8, 2);$fecha = ($uno."-".$dos."-".$tres);				  
                    printf("<tr>
                    <td class='tdfull'>".$cc."</a></td>
                    <td ><a href=\"consultar_cobranzas.php?id=$Cedula&carpeta=$nc\"  target='_blank'>".$nc."</td>					 
		            <td class='tdfull'>".$an."</td>
		            <td class='tdfull'>".$con."</td>
					<td class='tdfull'>".$tip."</td>
					<td class='tdfull'>".$cod."</td>
                	<td class='tdfull'>".$fechagest."</td>
					<td class='tdfull'>".$nof."</td>
					<td class='tdfull'>".$fecha."</td> ");
				}	   
		//  }
			echo "</tr></table>";
                
     	}    
        else
        {
             echo "<script>alert('cédula no existe en la base de datos')</script>"; 
        }
//}		

/*
   echo "<table width='950' border='0' align='center' cellpadding='3' cellspacing='3'>      
  <tr valign='baseline' bgcolor='#0099FF'>
  <td width='110' align='right' nowrap><div align='center'><span class='Estilo18'>C&eacute;dula</span></div></td>
  <td width='73' align='right' nowrap><div align='center'><span class='Estilo18'># carpeta</span></div></td>
  <td width='300' align='right' nowrap><div align='center'><span class='Estilo18'>Apellidos y nombres </span></div></td>
  <td width='72' align='right' nowrap><div align='center'><span class='Estilo18'>Contrato</span></div></td>
  <td width='50' align='right' nowrap><div align='center'><span class='Estilo18'>Tipo</span></div></td>
  <td width='109'><div align='center'><span class='Estilo18'>N&uacute;m.Ofic.Envio </span></div></td>
  <td width='132' colspan='2'><div align='center'><span class='Estilo18'>Fecha ofic.env&iacute;o </span></div></td>
</tr>";


    $msql = "select * from cobranzas where cedula = $cedula and estado != '' ";
    $file = mysql_query($msql, $dbi);	
    if($file) 
     { 	
            $sql = "select cedula, numero_carpeta, nombre_completo, numero, tipo, oficio_numero, fecha_oficio from cobranzas where cedula = $cedula";
            $control = mysql_query($sql, $dbi);
            if($control)
             {				 
                 while(list($cc, $nc, $an, $con, $tip, $nof, $fecha) = mysql_fetch_array($control)) 
                  { 
                      $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='Estilo1 Estilo14'><em>".$cc."</a></span></em></div></td>					 
                     <td bgcolor='#ECE9D8'><div align='center' class='Estilo1 Estilo14'><em><a href=\"consultar_cobranzas.php?id=$cedula&carpeta=$nc\"  target='_blank'>".$nc."</span></em></div></td>					 
		             <td bgcolor='#C5D6FC'><div align='center' class='Estilo1 Estilo14'><em>".$an."</span></em></div></td>
		             <td bgcolor='#C5D6FC'><div align='center' class='Estilo1 Estilo14'><em>".$con."</span></em></div></td>					 
		             <td bgcolor='#C5D6FC'><div align='center' class='Estilo1 Estilo14'><em>".$tip."</span></em></div></td>					 
		             <td bgcolor='#C5D6FC'><div align='center' class='Estilo1 Estilo14'><em>".$nof."</span></em></div></td>
					 <td bgcolor='#C5D6FC'><div align='center' class='Estilo1 Estilo14'><em>".$fecha."</span></em></div></td>");
				  } //Terminación del ciclo while
             } 
             else 
             { 
                 echo "<script>alert('Cédula no existe en cobranzas')</script>"; 
             } 
       } 
       else 
       { 			 
           echo "<script>alert('Ya fue ingresada una devolución para esa cédula')</script>"; 
       } 	
*/	   
}
?>
</tr></table>