[ Index ]
 

Code source de osCommerce 2.2ms2-060817

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/catalog/ -> products_new.php (source)

   1  <?php
   2  /*
   3    $Id: products_new.php,v 1.27 2003/06/09 22:35:33 hpdl Exp $
   4  
   5    osCommerce, Open Source E-Commerce Solutions
   6    http://www.oscommerce.com
   7  
   8    Copyright (c) 2003 osCommerce
   9  
  10    Released under the GNU General Public License
  11  */
  12  
  13    require ('includes/application_top.php');
  14  
  15    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCTS_NEW);
  16  
  17    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW));
  18  ?>
  19  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  20  <html <?php echo HTML_PARAMS; ?>>
  21  <head>
  22  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  23  <title><?php echo TITLE; ?></title>
  24  <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
  25  <link rel="stylesheet" type="text/css" href="stylesheet.css">
  26  </head>
  27  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
  28  <!-- header //-->
  29  <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  30  <!-- header_eof //-->
  31  
  32  <!-- body //-->
  33  <table border="0" width="100%" cellspacing="3" cellpadding="3">
  34    <tr>
  35      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
  36  <!-- left_navigation //-->
  37  <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
  38  <!-- left_navigation_eof //-->
  39      </table></td>
  40  <!-- body_text //-->
  41      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  42        <tr>
  43          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  44            <tr>
  45              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  46              <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  47            </tr>
  48          </table></td>
  49        </tr>
  50        <tr>
  51          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  52        </tr>
  53  <?php
  54    $products_new_array = array();
  55  
  56    $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";
  57    $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);
  58  
  59    if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
  60  ?>
  61        <tr>
  62          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  63            <tr>
  64              <td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>
  65              <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
  66            </tr>
  67          </table></td>
  68        </tr>
  69        <tr>
  70          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  71        </tr>
  72  <?php
  73    }
  74  ?>
  75        <tr>
  76          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  77  <?php
  78    if ($products_new_split->number_of_rows > 0) {
  79      $products_new_query = tep_db_query($products_new_split->sql_query);
  80      while ($products_new = tep_db_fetch_array($products_new_query)) {
  81        if ($new_price = tep_get_products_special_price($products_new['products_id'])) {
  82          $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>';
  83        } else {
  84          $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));
  85        }
  86  ?>
  87            <tr>
  88              <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td>
  89              <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td>
  90              <td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>
  91            </tr>
  92            <tr>
  93              <td colspüan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  94            </tr>
  95  <?php
  96      }
  97    } else {
  98  ?>
  99            <tr>
 100              <td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td>
 101            </tr>
 102            <tr>
 103              <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 104            </tr>
 105  <?php
 106    }
 107  ?>
 108          </table></td>
 109        </tr>
 110  <?php
 111    if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
 112  ?>
 113        <tr>
 114          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 115            <tr>
 116              <td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td>
 117              <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 118            </tr>
 119          </table></td>
 120        </tr>
 121  <?php
 122    }
 123  ?>
 124      </table></td>
 125  <!-- body_text_eof //-->
 126      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
 127  <!-- right_navigation //-->
 128  <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
 129  <!-- right_navigation_eof //-->
 130      </table></td>
 131    </tr>
 132  </table>
 133  <!-- body_eof //-->
 134  
 135  <!-- footer //-->
 136  <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
 137  <!-- footer_eof //-->
 138  <br>
 139  </body>
 140  </html>
 141  <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Généré le : Mon Nov 26 19:48:25 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics