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/consulta_fecha_guias.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Consulta Destinatario</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
.titulos {
	font: 16px;
	color: #FFF;
	font-family:Arial;
	font-weight:bold
}
.boton {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block; }
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000;}
.lista {font-family: Arial; font-size: 11px;	color: #990000;}
.lista2 {font-family: Arial; font-size: 16px;	color: #FF6600;}
.boton2 {
	font-family: Verdana;
	font-size: 8 pt;
	color: #000080;
	background-color: #C0C0C0;
	border-style: solid;
	width:90px;
	height:22px;
}
body {
		background-image: url(ELEMENTOS/gri06.jpg);
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.Estilo51 {
	color: #A00;
	font-weight: bold;
}
.boton1 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
-->
</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">
<form name="formulario" action="" method="post">
<br>
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=57% height="91" > </center>
<br><br>
<table width="522"  border="3" align="center" cellpadding="2" cellspacing="2" bgcolor="gray">
  <tr>
    <td width="506" ><fieldset><table width="548" border="0" align="center" cellpadding="2" cellspacing="2"  bgcolor="#330066">
  <tr bgcolor="#FFFFCC">
    <td colspan="5" bgcolor="#009999" class="titulos"><div align="center"> CONSULTA POR FECHA</div></td>
  </tr>
  <tr>
        
          <td width="126" align="right" bgcolor="#FFFFFF"><span class="Estilo50">FECHA    Desde </span></td>
		  <th width="131" bgcolor="#FFFFFF" scope="col">
            <input name="fecha1" type="text" class="Estilo66" id="fecha1" value="0000-00-00" size="13" maxlength="13" />
       </th>
		   <td width="88" bgcolor="#FFFFFF"><span class="Estilo50">Fecha Hasta </span></td>
		<th width="177" bgcolor="#FFFFFF" scope="col"><div align="left">
            <input name="fecha2" type="text" class="Estilo66" id="fecha2" value="0000-00-00" size="13" maxlength="13" />
        </div></th>
      </tr>

  <tr bgcolor="#FFCC99">
    <td colspan="5" bgcolor="#ECE9D8"><div align="center" class="Estilo51">
      <input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_guias_correo.php'" value="IR AL MENU">
      <input name="consultar" type="submit" class="Estilo51" id="consultar" value="CONSULTAR">
    </div></td>
  </tr>
</table>
</fieldset></td>
  </tr>
</table>

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

<?php

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

if ($_POST[consultar])
{   

$nom = $_POST["nombre"];


$res = mysql_query("SELECT * FROM guia_correos  WHERE fecha_envio >= '" . $_POST[fecha1]."' and  fecha_envio <='" . $_POST[fecha2]."' order by apellidos ");
			if (!$res) {
				die('Invalid query: ' . mysql_error());
			} 


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


       printf("<style type='text/css'><!--.Estilo5 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000066; }--></style>");

       printf("<table width='900' border='4' align='center' cellpadding='2' cellspacing='2'>
            <tr bgcolor='#FFFFCC'>
              <th colspan='10' scope='col'><span class='Estilo5'>LISTADO DE GUIAS RECIBIDAS </span></th>
             </tr>
            <tr bgcolor='#FFFFCC'>
			       
                   <th scope='col'><span class='Estilo5'>TRANSPORTADORA</span></th>
				   <th scope='col'><span class='Estilo5'>CEDULA</span>
                   <th scope='col'><span class='Estilo5'>APELLIDOS</span></th>				   
                   <th scope='col'><span class='Estilo5'>NOMBRES</span></th>				   				   
                   <th scope='col'><span class='Estilo5'>DIRECCION DE ENVIO</span></th>
				   <th scope='col'><span class='Estilo5'>NUMERO DE GUIA</span></th>
				   <th scope='col'><span class='Estilo5'>SUCURSAL</span>
				   <th scope='col'><span class='Estilo5'>ESTADO</span>
				   <th scope='col'><span class='Estilo5'>CAMBIO ESTADO</span></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 bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[4]."</span></div></td>
               <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[1]."</span></div></td>
			   <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[5]."</span></div></td>
               <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[6]."</span></div></td>						
               <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[7]."</span></div></td>
			   <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[3]."</span></div></td>
			   <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$Filas[14]."</span></div></td>               <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$tipestado."</span></div></td>
				<td bgcolor='#ECE9D8'><div align='center' class='Estilo21'><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></span></div></td></tr>");
            }
	                   echo "</table>";   
                      mysql_free_result($res);
					  
			  echo "<TABLE width='200' border='4' align='center' cellpadding='0' cellspacing='1'>
              <TR>
               <tr bgcolor='#FFFFCC'><th scope='col'><span class='Estilo5'>TOTAL REGISTROS</span></th>";
			 
				
			  printf("<tr>
                                 
			  <td bgcolor='#ECE9D8'><div align='center'><span class='Estilo7'>".$sum."</span></div></td>");	  
					    
					  
         }
}
?>