<?php
@session_start();
  $vg_login=$_SESSION["usuario"];
  if($vg_login<>""){}
 else
  {echo "<script>";
   echo "window.location='../index.php';";
   echo "</script>";
  }	
include "../valida_permisos.php";
$vg_programa = F_programa();
include "../seguridad.php";
$ip=getenv("REMOTE_ADDR");
?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>SIVI</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK REL="SHORTCUT ICON" HREF="../sivi.ico">
<LINK href="../general.css" type=text/css rel=stylesheet>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="../bootstrap/js/bootstrap.min.js"></script>

</head>

<BODY >
<?php
 
include "../conexion.php";

   echo "<center> <table width='100%' border='1' bordercolor='#FFfff' cellpadding='0' cellspacing='0'>";
	echo "<tr class='texto' >";
	echo "<td bgcolor='#1C2023'><center><font color='#FFFFFF'>Codigo</font></center></td>";	
	echo "<td bgcolor='#1C2023'><center><font color='#FFFFFF'>Nombre</font></center></td>";
	echo "<td bgcolor='#1C2023'><center><font color='#FFFFFF'>fecha vence</font></center></td>";
	echo "</tr>";	
        $sql_datosrs=mysqli_query($conexion,"SELECT producto,fecha  from producto_vence	  where fecha>='".date("Y-m-d")."'");
			  while($datos= mysqli_fetch_row($sql_datosrs))
			    {   $producto=$datos[0];
		            $fecha=$datos[1];
			    

                $sql_datosrs1=mysqli_query($conexion,"SELECT nombre from producto  where id='".$producto."'");
			    while($datos1= mysqli_fetch_row($sql_datosrs1)){  $nombre=$datos1[0];}
			  
		
			echo " <tr>";
					 echo "<td>$producto</td>";					
					 echo "<td>".$nombre."</td>";
					 echo "<td>".$fecha."</td>";
					 echo "</tr>";
		 }
	 echo "</table></center>"; 

?>
<form name="parametros" method="post" action="" >

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