<?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($brandsRecords, $brandsMetaData) = getRecords(array(
    'tableName'   => 'brands',
  ));

   list($globalRecords,$globalMetaData)=getRecords(array(        
	'tableName' =>'global',    
	'limit' => 1,      
	'allowSearch' =>0, 
	));  
  
  $global = $globalRecords[0]; 
  
  ?>


<!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>

  <?php include("header.php"); ?>


<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
   
<?php foreach ($brandsRecords as $record): ?>
     
<a href="<?php echo $record['link'] ?>"><?php echo $record['name'] ?></a><br />


      <!-- STEP 2a: Display Uploads for field 'logo' (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['logo'] as $upload): ?>
         

          <?php if ($upload['isImage']): ?>
<a href="<?php echo $record['link'] ?>"><img src="<?php echo $upload['urlPath'] ?>" alt="" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" border="0" /></a><br/>

         
          <?php endif ?>
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->



     



     



     





     
    <?php endforeach ?>

    <?php if (!$brandsRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->
<?php include("footer.php"); ?>

</body>
</html>
