<?php
if (isset($_SESSION['usuario'])){
$user=$_SESSION['usuario'];
}
else{
?>
<script>
location.href="index.php?errorusuario=3";
</script>
<?php }
?>

<table width="950" border="0" align="center">
  <tr>
    <td><p class="style10">PRESENTACI&Oacute;N DE LOS PRODUCTOS </p></td>
  </tr>
  <tr>
    <td><table width="100%" height="0" border="0" cellpadding="0" cellspacing="5">
      <tr>
        <td width="8%" valign="top">
        <form id="form2" name="form2" method="post" action="main.php?a=93">
            <input name="Submit" type="submit" class="boton2" value="Nueva">
        </form>
        </td>
        <td width="92%" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="3" align="center" valign="top"><hr width="100%" size="1" noshade="noshade" color="#003366" /></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
		<p class="style4">Selecciona Presentaci&oacute;n:</p>
	  <?php
echo "<table align='center' cellpadding='2' class='tablaBordes' width='300'>";
echo "<tr class='tablaCabecera' >";

echo "<td>";
echo " ID ";
echo "</td>";

echo "<td>";
echo "Presentaci&oacute;n";
echo "</td>";

echo "<td align='center'>";
echo "Eliminar";
echo "</td>";

echo "</tr>";
include ("conexion.php");
$cons="SELECT idPresentacion,presentacion FROM presentaciones ORDER BY presentacion ASC" ;
$res=mysql_query($cons,$conex) or die ("No se realizo con exito la consulta de presentaciones");
$numero_filas=mysql_num_rows($res);
$numero_campos= mysql_num_fields($res);
    while ($fila=mysql_fetch_row($res)){				  
         
echo "<tr>";
 for ($i=0;$i< $numero_campos;$i++){

echo "<td class='style1'>";
echo $fila[$i];
echo "</td>";

}

//Eliminar
echo "<td class='style4' align='center'>";
echo "<a href='deletepresentacion.php?idPresentacion="; echo $fila[0]; echo "'> <img src='img/icon_delete.jpg' border='0' ALT='Eliminar presentación'> </a>";

echo "</td>";

echo "</tr>";
}
echo "</table>";
mysql_free_result($res);

?>
           
</td>
  </tr>
</table>
