<?php
  require_once "/mywebsiteaddress.php";

  list($kfiveRecords, $kfiveMetaData) = getRecords(array(
    'tableName'   => 'kfive',
  ));

?>




<? include '_header.php' ?>


<div id="content">



<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="244px" rowspan="2" valign="top">
    
    
    

<? include '_menu.php' ?>
<br /></td>
<td valign="top">
    
    
    
    


    
    
    
    
    
    
    
<div id="products">    
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px;">
      <tr>
        <td height="25" class="main_headings">We Represent &gt; <span style="font-weight: bold">Kfive</span></td>
      </tr>
      <tr>
        <td valign="top"><br />
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>


<?php
$old_group = ''; // init blank var.
foreach ($kfiveRecords as $record):
$group = $record['brand']; // load sub-group value from record.
if ($group != $old_group) { // If different from the last sub-group value, print the sub-group name.
echo "<strong>$group</strong><br /><br />";
}?>            

<td width="200" align="center" valign="top" style="padding-bottom: 16px;">

<?php echo $record['title'] ?><br />

                <?php foreach ($record['brochure'] 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'] ?>" target="_blank" class="BrochureImg">
                <?php foreach ($record['thumbnail'] as $upload): ?>
                <?php if ($upload['hasThumbnail']): ?>
                <img src="<?php echo $upload['thumbUrlPath'] ?>" alt="" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" /><br/>
                <?php elseif ($upload['isImage']): ?>
                <img src="<?php echo $upload['urlPath'] ?>" alt="" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" vspace="6" /><br/>
                <?php else: ?>
                </a><br/>
                <?php endif ?>
                <?php endforeach ?>
                <?php endif ?>
                <?php endforeach ?>
				
<?php foreach ($record['brochure'] 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'] ?>" target="_blank">View Brochure ></a><br/></td>

<?php endif ?>
 <?php $old_group = $group; // retain sub-group name before moving to new record. ?>
<?php endforeach ?>
    
                
<?php $maxCols=5; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>  
<?php endforeach ?>


<?php if (!$kfiveRecords): ?>
There are currently no products. Please check this page again shortly.
<?php endif ?>                 
                
              </tr>
          </table>
          <br/>
          <br/>
          
          
          
          
     
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          </td>
      </tr>
    </table>
    </div>    </td>
  </tr>
  <tr>
    <td valign="top">
	
	
	
   </td>
  </tr>
</table>




</div>


<? include '_footer.php' ?>