[ 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/ -> specials.php (source)

   1  <?php
   2  /*
   3    $Id: specials.php,v 1.49 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_SPECIALS);
  16  
  17    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SPECIALS));
  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_specials.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    $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC";
  55    $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS);
  56  
  57    if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
  58  ?>
  59        <tr>
  60          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  61            <tr>
  62              <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td>
  63              <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
  64            </tr>
  65          </table></td>
  66        </tr>
  67        <tr>
  68          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  69        </tr>
  70  <?php
  71    }
  72  ?>
  73        <tr>
  74          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  75            <tr>
  76  <?php
  77      $row = 0;
  78      $specials_query = tep_db_query($specials_split->sql_query);
  79      while ($specials = tep_db_fetch_array($specials_query)) {
  80        $row++;
  81  
  82        echo '            <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span></td>' . "\n";
  83  
  84        if ((($row / 3) == floor($row / 3))) {
  85  ?>
  86            </tr>
  87            <tr>
  88              <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  89            </tr>
  90            <tr>
  91  <?php
  92        }
  93      }
  94  ?>
  95            </tr>
  96          </table></td>
  97        </tr>
  98  <?php
  99    if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
 100  ?>
 101        <tr>
 102          <td><br><table border="0" width="100%" cellspacing="0" cellpadding="2">
 103            <tr>
 104              <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td>
 105              <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 106            </tr>
 107          </table></td>
 108        </tr>
 109  <?php
 110    }
 111  ?>
 112      </table></td>
 113  <!-- body_text_eof //-->
 114      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
 115  <!-- right_navigation //-->
 116  <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
 117  <!-- right_navigation_eof //-->
 118      </table></td>
 119    </tr>
 120  </table>
 121  <!-- body_eof //-->
 122  
 123  <!-- footer //-->
 124  <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
 125  <!-- footer_eof //-->
 126  <br>
 127  </body>
 128  </html>
 129  <?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