<?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 "/services/webpages/a/x/axislighting.com/public/cmsAdmin/lib/viewer_functions.php";

  list($itemsRecords, $itemsMetaData) = getRecords(array(
    'tableName'   => 'items',
  ));

?>
<!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; color:#fff;}
    .instructions { border: 3px solid #000; background-color: #EEE; padding: 10px; text-align: left; margin: 25px}
  a:link {
	color: #80a4c3;
}
a:visited {
	color: #80a4c3;
}
a:hover {
	color: #47637c;
}
  </style>
 </head>
<body>
  <?php include("header.php"); ?>
 

  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
      
       <?php foreach ($itemsRecords as $record): ?>
     
      <a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a><br/>
      
      Brand: <?php echo $record['brands'] ?><br/>
      Type: <?php echo $record['type'] ?><br/>
    


      <!-- STEP 2a: Display Uploads for field 'images' (Paste this anywhere inside STEP2 to display uploads) -->
        <!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
        <?php foreach ($record['images'] as $upload): ?>
          <?php if ($upload['hasThumbnail']): ?>
            <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

          <?php elseif ($upload['isImage']): ?>
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

          <?php else: ?>
            <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->


      <hr/>
    <?php endforeach ?>

    <?php if (!$itemsRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->
  <?php include("footer.php"); ?>
</body>
</html>
