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/record_cobranzas1.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;}
	.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 DE  DATOS DE COBRANZAS</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="4" align="right" nowrap><div align="center"><span class="Estilo2">CONSULTA DE  DATOS DE COBRANZAS </span></div></td>
  </tr>-->
<tr>
	<td colspan="4" class="fecha">
      <script languaje="JavaScript">Mostrar_Fecha()</script></td>
</tr>

<tr >
	<td class="tdcen" idth="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" class="boton1" type="submit" id="consultar"value ="Buscar" >
      
	<input name="button" type="button" class="irmenu" onclick="window.location.href='menu_cobranzas_jur1.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 width='100' class='tdtitulo'>C&eacute;dula</td>
    <td width='70' class='tdtitulo'># carpeta</td>
    <td width='290' class='tdtitulo'>Apellidos y nombres </td>
    <td width='60' class='tdtitulo'>Contrato</td>
    <td width='50' class='tdtitulo'>Tipo</td>
    <td width='90'class='tdtitulo'>Codigo Gestion </td>
    <td width='150'class='tdtitulo'>Fecha Gestion </td>
	<td width='40' class='tdtitulo'>N&uacute;m.Ofic.Envio </td>
	<td width='150' 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, 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 class='tdfull'><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>