<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License

   cieto Featured Products 2.1 Listing Module
   cieto@msn.com

*/

?>
<!--Featured products BOF--><table width="430" border="0" cellpadding="0" cellspacing="0">
   <?php
  if (sizeof($featured_products_array) <> '0') {
   $col = 0;
    for($i=0; $i<sizeof($featured_products_array); $i++) {
      if ($featured_products_array[$i]['specials_price']) {
        $products_price = '<s>' .  $currencies->display_price($featured_products_array[$i]['price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($featured_products_array[$i]['specials_price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])) . '</span>';
      } else {
        $products_price = $currencies->display_price($featured_products_array[$i]['price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id']));
      }
   $col++;
?>
        <tr>
          <TD height="5" COLSPAN=3 valign="top"> <IMG SRC="images/news/template1_03.gif" WIDTH=434 HEIGHT=5 ALT=""></TD>
        </tr>

        <tr>
          <TD width="7" height="169" valign="top"> <IMG SRC="images/news/template1_05.gif" WIDTH=7 HEIGHT=169 ALT=""></TD>
          <TD width="418" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <tr>
                <TD width="418" height="169" valign="top" background="images/news/template1_06.gif" ALT=""><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <!--DWLayoutTable-->
              <br>
              <tr>
                <TD width="156" rowspan="4" align="right" valign="top" class="main"><table width="100%" border="0" cellpadding="3" cellspacing="4"><td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $featured_products_array[$i]['image'], $featured_products_array[$i]['name']) . '</a>';?></td></table></TD>
              </tr>
              <tr>
                <td width="417" valign="top" class="main"><table width="100%" border="0" cellpadding="7" cellspacing="7"><td class="featured"><?php
  if ($featured_products_array[$i]['shortdescription'] != '') {
      echo $featured_products_array[$i]['shortdescription'];
  } else {
   $bah = explode(" ", $featured_products_array[$i]['description']);
   for($desc=0 ; $desc<15 ; $desc++)
      {
      echo "$bah[$desc] ";
      }
      echo '. . .';
  }
   ?><tr>
   <TD width="100%" ROWSPAN=3 valign="bottom" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'more info.gif', 'Read more about this product...', '97', '27');?></a></TD></tr>
   </td></table></td>
              </tr>
            </table></TD></tr></table>
          <TD width="9" valign="top"> <IMG SRC="images/news/template1_07.gif" WIDTH=9 HEIGHT=169 ALT=""></TD>
        </tr>
        <tr>
          <TD height="23" COLSPAN=3 valign="top"> <IMG SRC="images/news/template1_08.gif" WIDTH=434 HEIGHT=23 ALT=""></TD>
        </tr>


  <?php
  }
if (($i+1) != sizeof($featured_products_array)) {
?>
  <?php
      }
    }

?>
      </table><!--featured products EOF-->