<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/var/www/vhosts/onsemobilisepourvous.com/httpdocs/client/caribbean_spirit_net/admin/lib/viewer_functions.php";

list($produitsRecords, $produitsMetaData) = getRecords(array( 
    'tableName'   => 'produits', 
      'leftJoin'      => array( 
        'point_dinteret' => 'ON produits.linkedPOI LIKE CONCAT("%\t", point_dinteret.num, "\t%")', 
      ), 
  ));


?>
<!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>

<xmp><?php print_r($produitsRecords); ?></xmp> 

  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    <h1>PRODUITS - List Page Viewer</h1>

    
 
 
 <?php foreach ($produitsRecords as $record) : ?> 
  <?php if (@$lastNum != $record['num']): ?> 
     Record Number: <?php echo $record['num'] ?><br/>
      Nom du produit: <?php echo $record['productname'] ?><br/>
      Lattitude: <?php echo $record['lattitude'] ?><br/>
      Longitude: <?php echo $record['longitude'] ?><br/>
       _link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a><br/><br /><br />
      <!--Points d'intérêt liés:--> <?php //echo join(', ', getListLabels('produits', 'linkedPOI', $record['linkedPOI'])); ?><br/>
  <?php endif ?> 
  <?php $lastnum = $record['num']; ?> 
  title : <?php echo $record['point_dinteret.titre'] ?><br />
    lattitude : <?php echo $record['point_dinteret.lattitude'] ?><br />
    longitude : <?php echo $record['point_dinteret.longitude'] ?> 

 
    
    
    
    
       
	
      <hr/>
    <?php endforeach; ?>

    <?php if (!$produitsRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->

</body>
</html>
