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/acorreos/consulta_numero_cedula.php
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta Guias Recibidas</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;}
	
	.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: 150px;background-color: #00135F;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{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
    .boton1{width:150px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text]{border-radius: 5px; padding: 3px;background-color: #fffde8;}
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px;}
    .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 POR NUMERO DE CEDULA</h3>

<form name="formulario" action="" method="post">
<table width="550" border="0" cellpadding="2" cellspacing="2">

<tr>
	<td colspan="2" class="fecha">
     	<script languaje="JavaScript">Mostrar_Fecha()</script>
   	</td>
</tr>

<tr>
	<td width="274" class="td">Digite El Número De Cedula</td>
    <td width="246" class="td"><input name="cedula" type="text" size="15" maxlength="15"></td>
</tr>
<tr>
   	<td colspan="2" height="35">
    <input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='menu_guias_correo.php'" value="IR AL MENU">
    <input name="consultar" type="submit" class="boton1" id="consultar" value="CONSULTAR">
    </td>
</tr>
</table>


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

<?php

  require_once("../Conectarse.php");
  echo "<form name='form' action='' method='post'>";
  global $dbi;
  
  

if ($_POST[consultar])
{   
	$res = mysql_query("SELECT * FROM guia_correos  WHERE cedula= '".$_POST["cedula"]."' ");
		if (!$res) {
			die('Invalid query: ' . mysql_error());
		} 


	if ((mysql_num_rows($res)!=0))  
	{

     	printf("<table width='980' border='4' align='center' cellpadding='2' cellspacing='2'>
       	<tr>
        	<th colspan='10' scope='col'><span class='Estilo5'>LISTADO DE GUIAS RECIBIDAS </span></th>
       	</tr>
            
		<tr>
			<th scope='col' class='tdtitulo'>TRANSPORTADORA</th>
			<th scope='col' class='tdtitulo'>CEDULA</th>
            <th scope='col' class='tdtitulo'>APELLIDOS</th>				   
            <th scope='col' class='tdtitulo'>NOMBRES</th>				   				   
            <th scope='col' class='tdtitulo'>DIRECCION DE ENVIO</th>
			<th scope='col' class='tdtitulo'>NUMERO DE GUIA</th>
			<th scope='col' class='tdtitulo'>SUCURSAL</th>
			<th scope='col' class='tdtitulo'>ESTADO</th>
			<th scope='col' class='tdtitulo'>CAMBIO ESTADO</th>	 				   
		</tr>");

		while($Filas = mysql_fetch_row($res))
       	{
			$sum = $sum +1 ;
				
			$estado=$Filas[13];
				
			if ($estado==0)
			{
				$tipestado='ENVIADO';
			}
				
			if ($estado==1)
			{
				$tipestado='RECIBIDO';
			}
					
			if ($estado==2)
			{
				$tipestado='DEVUELTO';
			}
					
				
  //printf("<tr><td bgcolor='#ECE9D8'><div align='center'><a href='descargar_archivos_guia.php?id=".$Filas[0]." class='Estilo5 Estilo6'>Descargar</a></div></td>
                
			printf("<tr>
					   
			   <td class='tdfull'>".$Filas[4]."</td>
               <td class='tdfull'>".$Filas[1]."</td>
			   <td class='tdfull'>".$Filas[5]."</td>
               <td class='tdfull'>".$Filas[6]."</td>						
               <td class='tdfull'>".$Filas[7]."</td>
			   <td class='tdfull'>".$Filas[3]."</td>
			   <td class='tdfull'>".$Filas[14]."</td>               
			   <td class='tdfull'>".$tipestado."</td>
			   <td class='tdfull'><input type='button' value=ESTADO name='proceso' class=Estilo21 onClick =	window.open('formulario_guia_correos_estado.php?id=$Filas[0]','','top=30,left=50,toolbar=yes,scrollbars=yes,width=900,height=800,status=yes')></a></td> </tr>");
            }
	               echo "</table>";   
                   mysql_free_result($res);  
					  
				   echo "<TABLE width='200' border='2' align='center' cellpadding='0' cellspacing='1'>
              <TR>
              <th class='tdtitulo'>TOTAL REGISTROS</span></th>";
			 
			  printf("<tr>
                                 
			  <td class='tdfull'>".$sum."</td>");	  
					  
         }
}
?>