<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  $expected_query = tep_db_query("select p.products_id, pd.products_name, products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS);
  if (tep_db_num_rows($expected_query) > 0) {
?><!--
<div class="title_upcomming_product">
  <h5 style="float: right;"><?php echo TABLE_HEADING_DATE_EXPECTED; ?></h5>
  <h5><?php echo TABLE_HEADING_UPCOMING; ?></h5>
</div>-->
<script type="text/javascript">
$('.productListTable tr:nth-child(even)').addClass('alt');
</script>  

<div class="tabs ui-tabs">
<div class="contentContainer">
  <div class="contentBlock">
  		<div class="contentInfoBlock">
      	<table class="productListTable upcoming_block">
        			<tr>
                      <th><div class="name"><?php echo TABLE_HEADING_UPCOMING; ?></div></th>
                      <th style="text-align:right"><?php echo TABLE_HEADING_DATE_EXPECTED; ?></th>
                    </tr>
<?php
    while ($expected = tep_db_fetch_array($expected_query)) {
      echo '        <tr>' . "\n" .
           '          <td><div class="name"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id']) . '">' . $expected['products_name'] . '</a></div></td>' . "\n" .
           '          <td style="text-align:right">' . tep_date_short($expected['date_expected']) . '</td>' . "\n" .
           '        </tr>' . "\n";
    }
?>
      </table>
      </div>
  </div>
</div>
</div>
<?php
  }
?>
