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/acreditos/cobranzas_consulta_base_cre.php
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta Cartera</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: 8px solid #bebebe; text-align: center;}
    .divirmenu{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: #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:10px;}
    .boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
    .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: 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 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 language="javascript">
function AbreGral()
{ 
    var menu;   
	menu=window.open("mostrar_ingreso.php","","toolbar=no,scrollbars=no,width=800,height=500,status=yes");  
	menu.focus();  
	var ventana = window.self;  
	ventana.opener = window.self;  
	ventana.close();
}
</script>
</head>

<body onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">CONSULTA BASE DE DATOS</h3>
<?php echo "<div class='cerrarsesion' onclick='location.href=\"../cerrar_session.php\"'>CERRAR SESION</div>";?>

<form name="formulario" action="" method="post">

<table width="593" border="3" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td><fieldset><table width="593" height="148" border="5" align="center" cellpadding="2" cellspacing="2">

  <tr>
    <td height="22" colspan="2" class="fecha"><div align="center">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
    </div></td>
  </tr>
  
	
		
<tr>
	<td class="tdcen">C&eacute;dula o Codigo</td>
	<td class="tdcen"><input name="cedula2" type="text" class="campo1" id="cedula2" value="" size="15" maxlength="15"></td>
</tr>

<tr>
	<td colspan="2"><input name="consultar" id="consultar" type="submit" class="boton1" value="Consultar"></td>
</tr>

<tr>
    <td colspan="2">
      <input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='menu_cobranzas_cre.php'" value="IR AL MENU">
    </td>
</tr>
</table>
</fieldset></td>
  </tr>
</table>

</form>
</body>
</html>

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


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

$numero = substr($cedula2,0,1); 
$control = 0 ;

$mssql = mysql_query('SELECT *  FROM base1  ');
		  if (!$mssql) {
				die('Invalid query 1: ' . mysql_error());
			}
		
   if($mssql)
   {

if($numero == 1)
{
$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base1  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 2)
{
$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base2  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 3)
{
$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base3  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 4)
{
$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base4  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 5)
{
			$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base5  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 6)
{
			$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base6  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 7)
{
			$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base7  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 8)
{
			$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base8  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
if($numero == 9)
{
			$control = mysql_query('SELECT nombre,direccion,telefono,ciudad,celular,cedula FROM base9  WHERE  cedula =  "' . $_POST["cedula2"]  . '"  order by nombre ');
		  if (!$control) {
				die('Invalid query 2: ' . mysql_error());
					}		
}
                     if ((mysql_num_rows($control)!=0)) 
	                    {	 
                              echo "<TABLE width='1000' border='2' align='center' cellpadding='0' cellspacing='1'>
                              <TR>
                              <td class='tdtitulo'>CEDULA</td>
							  <td class='tdtitulo'>NOMBRE</td>	
							  <td class='tdtitulo'>DIRECCION</td>
                              <td class='tdtitulo'>TELEFONO </td>
							  <td class='tdtitulo'>CELULAR</td>
							  <td class='tdtitulo'>CIUDAD </td>";		  
                           							  
                        
  while(list($nombre,$direccion ,$telefono,$ciudad,$celular,$cedula) = mysql_fetch_row($control)) 
                              {  
                 
				
								   printf("<tr>
                                 
								   <td class='tdfull'><input type='button' value=$cedula name='cedu' class=botonnew onClick =window.location.href='cobranzas_gestion_base_cre.php?ced2=$cedula&numero=$numero'></td>
                                   <td class='tdfull'>".$nombre."</td>
								   <td class='tdfull'>".$direccion."</td>
								   <td class='tdfull'>".$telefono."</td>
								   <td class='tdfull'>".$celular."</td>
								   <td class='tdfull'>".$ciudad."</td>");              								   															   
                               }
								   echo "</table>";		  
                        }

     }
    

echo "</form>";

	

}

 
   
?>