<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block to the TOP of your page BEFORE anything else. */
  require_once "/home/pb3d/public_html/cmsAdmin/lib/viewer_functions.php";

  list($ventes_de_lotsRecords, $ventes_de_lotsMetaData) = getRecords(array(
    'tableName'   => 'ventes_de_lots',
  ));

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  <style type="text/css">
    body          { font-family: arial; }
    .instructions { border: 3px solid #000; background-color: #EEE; padding: 10px; text-align: left; margin: 25px}
  </style>
 </head>
<body>

  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    <h1>Ventes de lots</h1>
    <table border="1px" cellpadding="10px" width="800px">
      <tr>
        <th>Produits</th>
        <th>Format</th>
        <th>Quantit&eacute;</th>
        <th>Prix</th>
        <th>Commentaire</th>
        <th>&nbsp;</th>
      </tr>

    <?php foreach ($ventes_de_lotsRecords as $record): ?>
        <tr>
    <?php
        if ($record['produits']=="-Ligne-"){
            echo ("<td colspan='6'>&nbsp;</td>");
        }else{
    ?>
        <td><?php echo $record['produits'] ?></td>
        <td align="center"><?php echo $record['format'] ?></td>
        <td align="center"><?php echo $record['quantite'] ?></td>
        <td align="center"><?php echo $record['prix'] ?></td>
        <td><?php echo $record['commentaire'] ?></td>
        <td>Achetez</td>



    <?php
        }
        echo ("</tr>");
        endforeach;
    ?>
    </table>
    <?php if (!$ventes_de_lotsRecords): ?>
      Il n'y a aucun lots &agrave; vendre pour l'instant!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->

</body>
</html>
