[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/modules/ -> upcoming_products.php (source)

   1  <?php
   2  /*

   3  $Id: upcoming_products.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13    $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);
  14    if (tep_db_num_rows($expected_query) > 0) {
  15  ?>
  16  <!-- upcoming_products //-->
  17            <tr>
  18              <td><br><table border="0" width="100%" cellspacing="0" cellpadding="2">
  19                <tr>
  20                  <td class="tableHeading">&nbsp;<?php echo TABLE_HEADING_UPCOMING_PRODUCTS; ?>&nbsp;</td>
  21                  <td align="right" class="tableHeading">&nbsp;<?php echo TABLE_HEADING_DATE_EXPECTED; ?>&nbsp;</td>
  22                </tr>
  23                <tr>
  24                  <td colspan="2"><?php echo tep_draw_separator(); ?></td>
  25                </tr>
  26                <tr>
  27  <?php
  28      $row = 0;
  29      while ($expected = tep_db_fetch_array($expected_query)) {
  30        $row++;
  31        if (($row / 2) == floor($row / 2)) {
  32          echo '              <tr class="upcomingProducts-even">' . "\n";
  33        } else {
  34          echo '              <tr class="upcomingProducts-odd">' . "\n";
  35        }
  36  
  37        echo '                <td class="smallText">&nbsp;<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id']) . '">' . $expected['products_name'] . '</a>&nbsp;</td>' . "\n" .
  38             '                <td align="right" class="smallText">&nbsp;' . tep_date_short($expected['date_expected']) . '&nbsp;</td>' . "\n" .
  39             '              </tr>' . "\n";
  40      }
  41  ?>
  42                <tr>
  43                  <td colspan="2"><?php echo tep_draw_separator(); ?></td>
  44                </tr>
  45              </table></td>
  46            </tr>
  47  <!-- upcoming_products_eof //-->
  48  <?php
  49    }
  50  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7