<?php

  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "../cmsAdmin/lib/viewer_functions.php";

$where = "num=num";

if((@$_REQUEST['mounting'] != "undefined") && (@$_REQUEST['mounting']) ) {
   $where .= " AND mounting LIKE '%" . mysql_real_escape_string($_REQUEST['mounting']) . "%' ";
}
if((@$_REQUEST['distribution'] != "undefined") && (@$_REQUEST['distribution']) ) {
   $where .= " AND distribution LIKE '%\t" . mysql_real_escape_string($_REQUEST['distribution']) . "\t%' ";
}
if((@$_REQUEST['lamping'] != "undefined") && (@$_REQUEST['lamping']) ) {
   $where .= " AND lamping LIKE '%" . mysql_real_escape_string($_REQUEST['lamping']) . "%' ";
}







  list($itemsRecords, $itemsMetaData) = getRecords(array(
    'tableName'   => 'items',
    'debugSql' => false,
    'where' => $where,
    'allowSearch'        => false,
  ));
 
  
?>
     

  <table width="750" align="center" cellpadding="2" cellspacing="2" class="margin-table-search-results">
  <tr>  <?php foreach ($itemsRecords as $record): ?>     
   <td width="175" align="left"> 
                 <?php foreach ($record['main_image'] as $upload): ?>
         

          <?php if ($upload['isImage']): ?>
<a href="<?php echo $record['link'] ?>"><img src="<?php echo $upload['urlPath'] ?>" alt="" class="img-bord" width="150" height="150" border="0" /></a>     <?php endif ?>
        <?php endforeach ?>
    <table width="150" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2" height="3"></td>
      </tr>
      <tr>
         <td>
         <?php foreach ($record['small_logo'] as $upload): ?>
            <a href="<?php echo $record['link'] ?>">
               <img src="<?php echo $upload['urlPath'] ?>" alt="<?php echo $record['name'] ?>" border="0">
            </a>
         <?php endforeach ?>
         </td>
         <td align="right" valign="bottom">
            <span class="text-12-no-justify-search">
               <?php echo $record['mounting'] ?>
            </span>
         </td>
      </tr>
      <tr>
         <td height="15"></td>
      </tr>
    </table>
   </td>  
   <?php $maxCols=4; if (@++$count % $maxCols == 0): ?>  </tr>  <tr>  <?php endif ?>  <?php endforeach ?>  </table>


</tr>
    </table>

