[TEP-COMMIT] [CVS catalog] use the new database class

hpdl-OfajU3CKLf1/[email protected] 24 Feb 2005 01:49:02 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog/includes/modules</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">downloads.php</a></tt></td><td align="right" id="added">+29</td><td align="right" id="removed">-18</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/downloads.php?rev=1.5&amp;content-type=text/vnd.viewcvs-markup">1.5</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/downloads.php.diff?r1=1.5&amp;r2=1.6">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/downloads.php?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">1.6</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">product_listing.php</a></tt></td><td align="right" id="added">+29</td><td align="right" id="removed">-23</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/product_listing.php?rev=1.48&amp;content-type=text/vnd.viewcvs-markup">1.48</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/product_listing.php.diff?r1=1.48&amp;r2=1.49">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/product_listing.php?rev=1.49&amp;content-type=text/vnd.viewcvs-markup">1.49</a></td></tr>
<tr><td></td><td align="right" id="added">+58</td><td align="right" id="removed">-41</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
use the new database class
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a><br /></span>
<div class="fileheader"><big><b>downloads.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/downloads.php?rev=1.5&amp;content-type=text/vnd.viewcvs-markup">1.5</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/downloads.php.diff?r1=1.5&amp;r2=1.6">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/downloads.php?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">1.6</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.5 -r1.6
--- downloads.php	2004/04/13 08:00:26	1.5
+++ downloads.php	2005/02/24 01:49:00	1.6
@@ -5,26 +5,35 @@
</small></pre><pre class="diff" id="context">   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
</pre><pre class="diff" id="removed">-  Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+  Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context"> 
   Released under the GNU General Public License
 */
</pre><pre class="diff" id="removed">-?&gt;
-&lt;!-- downloads //--&gt;
-&lt;?php
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context">   if (!strstr($_SERVER['PHP_SELF'], FILENAME_ACCOUNT_HISTORY_INFO)) {
 // Get last order id for checkout_success
</pre><pre class="diff" id="removed">-    $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$osC_Customer-&gt;id . "' order by orders_id desc limit 1");
-    $orders = tep_db_fetch_array($orders_query);
-    $last_order = $orders['orders_id'];
</pre><pre class="diff" id="added">+    $Qorder = $osC_Database-&gt;query('select orders_id from :table_orders where customers_id = :customers_id order by orders_id desc limit 1');
+    $Qorder-&gt;bindTable(':table_orders', TABLE_ORDERS);
+    $Qorder-&gt;bindInt(':customers_id', $osC_Customer-&gt;id);
+    $Qorder-&gt;execute();
+
+    $last_order = $Qorders-&gt;valueInt('orders_id');
</pre><pre class="diff" id="context">   } else {
</pre><pre class="diff" id="removed">-    $last_order = $_GET['order_id'];
</pre><pre class="diff" id="added">+    $last_order = <span id="addedchars">(int)</span>$_GET['order_id'];
</pre><pre class="diff" id="context">   }
 
 // Now get all downloadable products in that order
</pre><pre class="diff" id="removed">-  $downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . (int)$osC_Customer-&gt;id . "' and o.orders_id = '" . (int)$last_order . "' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ''");
-  if (tep_db_num_rows($downloads_query) &gt; 0) {
</pre><pre class="diff" id="added">+  $Qdownloads = $osC_Database-&gt;query('select date_format(o.date_purchased, "%Y-%m-%d") as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays from :table_orders o, :table_orders_products op, :table_orders_products_downloads opd where o.customers_id = :customers_id and o.orders_id = :orders_id and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ""');
+  $Qdownloads-&gt;bindTable(':table_orders', TABLE_ORDERS);
+  $Qdownloads-&gt;bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
+  $Qdownloads-&gt;bindTable(':table_orders_products_downloads', TABLE_ORDERS_PRODUCTS_DOWNLOADS);
+  $Qdownloads-&gt;bindInt(':customers_id', $osC_Customer-&gt;id);
+  $Qdownloads-&gt;bindInt(':orders_id', $last_order);
+  $Qdownloads-&gt;execute();
+
+  if ($Qdownloads-&gt;numberOfRows() &gt; 0) {
</pre><pre class="diff" id="context"> ?&gt;
</pre><pre class="diff" id="added">+&lt;!-- downloads //--&gt;
</pre><pre class="diff" id="context">       &lt;tr&gt;
         &lt;td&gt;&lt;?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?&gt;&lt;/td&gt;
       &lt;/tr&gt;
</pre><pre class="diff"><small id="info">@@ -38,10 +47,10 @@
</small></pre><pre class="diff" id="context">         &lt;td&gt;&lt;table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"&gt;
 &lt;!-- list of products --&gt;
 &lt;?php
</pre><pre class="diff" id="removed">-    while ($downloads = tep_db_fetch_array($downloads_query)) {
</pre><pre class="diff" id="added">+    while ($Qdownloads-&gt;next()) {
</pre><pre class="diff" id="context"> // MySQL 3.22 does not have INTERVAL
</pre><pre class="diff" id="removed">-      list($dt_year, $dt_month, $dt_day) = explode('-', $downloads['date_purchased_day']);
-      $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $downloads['download_maxdays'], $dt_year);
</pre><pre class="diff" id="added">+      list($dt_year, $dt_month, $dt_day) = explode('-', $Qdownloads-&gt;value('date_purchased_day'));
+      $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $Qdownloads-&gt;value('download_maxdays'), $dt_year);
</pre><pre class="diff" id="context">       $download_expiry = date('Y-m-d H:i:s', $download_timestamp);
 ?&gt;
           &lt;tr class="infoBoxContents"&gt;
</pre><pre class="diff"><small id="info">@@ -52,16 +61,16 @@
</small></pre><pre class="diff" id="context"> // - The file is present in the DOWNLOAD directory, AND EITHER
 // - No expiry date is enforced (maxdays == 0), OR
 // - The expiry date is not reached
</pre><pre class="diff" id="removed">-      if ( ($downloads['download_count'] &gt; 0) &amp;&amp; (file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) &amp;&amp; ( ($downloads['download_maxdays'] == 0) || ($download_timestamp &gt; time())) ) {
-        echo '            &lt;td class="main"&gt;&lt;a href="' . tep_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&amp;id=' . $downloads['orders_products_download_id']) . '"&gt;' . $downloads['products_name'] . '&lt;/a&gt;&lt;/td&gt;' . "\n";
</pre><pre class="diff" id="added">+      if ( ($Qdownloads-&gt;valueInt('download_count') &gt; 0) &amp;&amp; (file_exists(DIR_FS_DOWNLOAD . $Qdownloads-&gt;value('orders_products_filename'))) &amp;&amp; ( ($Qdownloads-&gt;value('download_maxdays') == 0) || ($download_timestamp &gt; time())) ) {
+        echo '            &lt;td class="main"&gt;&lt;a href="' . tep_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&amp;id=' . $Qdownloads-&gt;valueInt('orders_products_download_id')) . '"&gt;' . $Qdownloads-&gt;value('products_name') . '&lt;/a&gt;&lt;/td&gt;' . "\n";
</pre><pre class="diff" id="context">       } else {
</pre><pre class="diff" id="removed">-        echo '            &lt;td class="main"&gt;' . $<span id="removedchars">downloads['products_name']</span> . '&lt;/td&gt;' . "\n";
</pre><pre class="diff" id="added">+        echo '            &lt;td class="main"&gt;' . $<span id="addedchars">Qdownloads-&gt;value('products_name')</span> . '&lt;/td&gt;' . "\n";
</pre><pre class="diff" id="context">       }
 ?&gt;
 &lt;!-- right box --&gt;
 &lt;?php
       echo '            &lt;td class="main"&gt;' . TABLE_HEADING_DOWNLOAD_DATE . tep_date_long($download_expiry) . '&lt;/td&gt;' . "\n" .
</pre><pre class="diff" id="removed">-           '            &lt;td class="main" align="right"&gt;' . $<span id="removedchars">downloads['download_count']</span> . TABLE_HEADING_DOWNLOAD_COUNT . '&lt;/td&gt;' . "\n" .
</pre><pre class="diff" id="added">+           '            &lt;td class="main" align="right"&gt;' . $<span id="addedchars">Qdownloads-&gt;valueInt('download_count')</span> . TABLE_HEADING_DOWNLOAD_COUNT . '&lt;/td&gt;' . "\n" .
</pre><pre class="diff" id="context">            '          &lt;/tr&gt;' . "\n";
     }
 ?&gt;
</pre><pre class="diff"><small id="info">@@ -79,6 +88,8 @@
</small></pre><pre class="diff" id="context">       &lt;/tr&gt;
 &lt;?php
     }
</pre><pre class="diff" id="removed">-  }
</pre><pre class="diff" id="context"> ?&gt;
 &lt;!-- downloads_eof //--&gt;
</pre><pre class="diff" id="added">+&lt;?php
+  }
+?&gt;
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a><br /></span>
<div class="fileheader"><big><b>product_listing.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/product_listing.php?rev=1.48&amp;content-type=text/vnd.viewcvs-markup">1.48</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/product_listing.php.diff?r1=1.48&amp;r2=1.49">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/product_listing.php?rev=1.49&amp;content-type=text/vnd.viewcvs-markup">1.49</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.48 -r1.49
--- product_listing.php	2004/04/15 16:05:39	1.48
+++ product_listing.php	2005/02/24 01:49:00	1.49
@@ -5,19 +5,25 @@
</small></pre><pre class="diff" id="context">   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
</pre><pre class="diff" id="removed">-  Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+  Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context"> 
   Released under the GNU General Public License
 */
 
</pre><pre class="diff" id="removed">-  $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
</pre><pre class="diff" id="added">+  if (!isset($_GET['page']) || (isset($_GET['page']) &amp;&amp; !is_numeric($_GET['page']))) {
+    $_GET['page'] = 1;
+  }
+
+  $Qlisting = $osC_Database-&gt;query($listing_sql);
+  $Qlisting-&gt;setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
+  $Qlisting-&gt;execute();
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-  if ( ($<span id="removedchars">listing_split-&gt;number_of_rows</span> &gt; 0) &amp;&amp; ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
</pre><pre class="diff" id="added">+  if ( ($<span id="addedchars">Qlisting-&gt;numberOfRows()</span> &gt; 0) &amp;&amp; ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
</pre><pre class="diff" id="context"> ?&gt;
 &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
   &lt;tr&gt;
</pre><pre class="diff" id="removed">-    &lt;td class="smallText"&gt;&lt;?php echo $listing_split-&gt;display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?&gt;&lt;/td&gt;
-    &lt;td class="smallText" align="right"&gt;&lt;?php echo TEXT_RESULT_PAGE . ' ' . $listing_split-&gt;display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="added">+    &lt;td class="smallText"&gt;&lt;?php echo $Qlisting-&gt;displayBatchLinksTotal(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?&gt;&lt;/td&gt;
+    &lt;td class="smallText" align="right"&gt;&lt;?php echo $Qlisting-&gt;displayBatchLinksPullDown('page', tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="context">   &lt;/tr&gt;
 &lt;/table&gt;
 &lt;?php
</pre><pre class="diff"><small id="info">@@ -70,10 +76,10 @@
</small></pre><pre class="diff" id="context">                                     'text' =&gt; '&amp;nbsp;' . $lc_text . '&amp;nbsp;');
   }
 
</pre><pre class="diff" id="removed">-  if ($listing_split-&gt;number_of_rows &gt; 0) {
</pre><pre class="diff" id="added">+  if ($Qlisting-&gt;numberOfRows() &gt; 0) {
</pre><pre class="diff" id="context">     $rows = 0;
</pre><pre class="diff" id="removed">-    $listing_query = tep_db_query($listing_split-&gt;sql_query);
-    while ($listing = tep_db_fetch_array($listing_query)) {
</pre><pre class="diff" id="added">+
+    while ($Qlisting-&gt;next()) {
</pre><pre class="diff" id="context">       $rows++;
 
       if (($rows/2) == floor($rows/2)) {
</pre><pre class="diff"><small id="info">@@ -90,47 +96,47 @@
</small></pre><pre class="diff" id="context">         switch ($column_list[$col]) {
           case 'PRODUCT_LIST_MODEL':
             $lc_align = '';
</pre><pre class="diff" id="removed">-            $lc_text = '&amp;nbsp;' . $listing['products_model'] . '&amp;nbsp;';
</pre><pre class="diff" id="added">+            $lc_text = '&amp;nbsp;' . $Qlisting-&gt;value('products_model') . '&amp;nbsp;';
</pre><pre class="diff" id="context">             break;
           case 'PRODUCT_LIST_NAME':
             $lc_align = '';
             if (isset($_GET['manufacturers_id'])) {
</pre><pre class="diff" id="removed">-              $lc_text = '&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;products_id=' . $<span id="removedchars">listing['products_id'])&nbsp;.&nbsp;'"&gt;'&nbsp;.&nbsp;$listing['products_name']</span> . '&lt;/a&gt;';
</pre><pre class="diff" id="added">+              $lc_text = '&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;products_id=' . $<span id="addedchars">Qlisting-&gt;valueInt('products_id'))&nbsp;.&nbsp;'"&gt;'&nbsp;.&nbsp;$Qlisting-&gt;value('products_name')</span> . '&lt;/a&gt;';
</pre><pre class="diff" id="context">             } else {
</pre><pre class="diff" id="removed">-              $lc_text = '&amp;nbsp;&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $<span id="removedchars">listing['products_id'])&nbsp;.&nbsp;'"&gt;'&nbsp;.&nbsp;$listing['products_name']</span> . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="added">+              $lc_text = '&amp;nbsp;&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $<span id="addedchars">Qlisting-&gt;valueInt('products_id'))&nbsp;.&nbsp;'"&gt;'&nbsp;.&nbsp;$Qlisting-&gt;value('products_name')</span> . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="context">             }
             break;
           case 'PRODUCT_LIST_MANUFACTURER':
             $lc_align = '';
</pre><pre class="diff" id="removed">-            $lc_text = '&amp;nbsp;&lt;a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '"&gt;' . $listing['manufacturers_name'] . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="added">+            $lc_text = '&amp;nbsp;&lt;a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $Qlisting-&gt;valueInt('manufacturers_id')) . '"&gt;' . $Qlisting-&gt;valueInt('manufacturers_name') . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="context">             break;
           case 'PRODUCT_LIST_PRICE':
             $lc_align = 'right';
</pre><pre class="diff" id="removed">-            if (tep_not_null($listing['specials_new_products_price'])) {
-              $lc_text = '&amp;nbsp;&lt;s&gt;' .  $osC_Currencies-&gt;displayPrice($listing['products_price'], $listing['products_tax_class_id']) . '&lt;/s&gt;&amp;nbsp;&amp;nbsp;&lt;span class="productSpecialPrice"&gt;' . $osC_Currencies-&gt;displayPrice($listing['specials_new_products_price'], $listing['products_tax_class_id']) . '&lt;/span&gt;&amp;nbsp;';
</pre><pre class="diff" id="added">+            if (tep_not_null($Qlisting-&gt;value('specials_new_products_price'))) {
+              $lc_text = '&amp;nbsp;&lt;s&gt;' .  $osC_Currencies-&gt;displayPrice($Qlisting-&gt;value('products_price'), $Qlisting-&gt;valueInt('products_tax_class_id')) . '&lt;/s&gt;&amp;nbsp;&amp;nbsp;&lt;span class="productSpecialPrice"&gt;' . $osC_Currencies-&gt;displayPrice($Qlisting-&gt;value('specials_new_products_price'), $Qlisting-&gt;valueInt('products_tax_class_id')) . '&lt;/span&gt;&amp;nbsp;';
</pre><pre class="diff" id="context">             } else {
</pre><pre class="diff" id="removed">-              $lc_text = '&amp;nbsp;' . $osC_Currencies-&gt;displayPrice($listing['products_price'], $listing['products_tax_class_id']) . '&amp;nbsp;';
</pre><pre class="diff" id="added">+              $lc_text = '&amp;nbsp;' . $osC_Currencies-&gt;displayPrice($Qlisting-&gt;value('products_price'), $Qlisting-&gt;valueInt('products_tax_class_id')) . '&amp;nbsp;';
</pre><pre class="diff" id="context">             }
             break;
           case 'PRODUCT_LIST_QUANTITY':
             $lc_align = 'right';
</pre><pre class="diff" id="removed">-            $lc_text = '&amp;nbsp;' . $listing['products_quantity'] . '&amp;nbsp;';
</pre><pre class="diff" id="added">+            $lc_text = '&amp;nbsp;' . $Qlisting-&gt;valueInt('products_quantity') . '&amp;nbsp;';
</pre><pre class="diff" id="context">             break;
           case 'PRODUCT_LIST_WEIGHT':
             $lc_align = 'right';
</pre><pre class="diff" id="removed">-            $lc_text = '&amp;nbsp;' . $osC_Weight-&gt;display($listing['products_weight'], $listing['products_weight_class']) . '&amp;nbsp;';
</pre><pre class="diff" id="added">+            $lc_text = '&amp;nbsp;' . $osC_Weight-&gt;display($Qlisting-&gt;value('products_weight'), $Qlisting-&gt;value('products_weight_class')) . '&amp;nbsp;';
</pre><pre class="diff" id="context">             break;
           case 'PRODUCT_LIST_IMAGE':
             $lc_align = 'center';
             if (isset($_GET['manufacturers_id'])) {
</pre><pre class="diff" id="removed">-              $lc_text = '&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;products_id=' . $listing['products_id']) . '"&gt;' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '&lt;/a&gt;';
</pre><pre class="diff" id="added">+              $lc_text = '&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $_GET['manufacturers_id'] . '&amp;products_id=' . $Qlisting-&gt;valueInt('products_id')) . '"&gt;' . tep_image(DIR_WS_IMAGES . $Qlisting-&gt;value('products_image'), $Qlisting-&gt;value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '&lt;/a&gt;';
</pre><pre class="diff" id="context">             } else {
</pre><pre class="diff" id="removed">-              $lc_text = '&amp;nbsp;&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $listing['products_id']) . '"&gt;' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="added">+              $lc_text = '&amp;nbsp;&lt;a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $Qlisting-&gt;valueInt('products_id')) . '"&gt;' . tep_image(DIR_WS_IMAGES . $Qlisting-&gt;value('products_image'), $Qlisting-&gt;value('products_name'), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="context">             }
             break;
           case 'PRODUCT_LIST_BUY_NOW':
             $lc_align = 'center';
</pre><pre class="diff" id="removed">-            $lc_text = '&lt;a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), tep_get_all_get_params(array('action')) . 'action=buy_now&amp;products_id=' . $<span id="removedchars">listing['products_id']</span>) . '"&gt;' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="added">+            $lc_text = '&lt;a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), tep_get_all_get_params(array('action')) . 'action=buy_now&amp;products_id=' . $<span id="addedchars">Qlisting-&gt;valueInt('products_id')</span>) . '"&gt;' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '&lt;/a&gt;&amp;nbsp;';
</pre><pre class="diff" id="context">             break;
         }
 
</pre><pre class="diff"><small id="info">@@ -151,12 +157,12 @@
</small></pre><pre class="diff" id="context">     new productListingBox($list_box_contents);
   }
 
</pre><pre class="diff" id="removed">-  if ( ($<span id="removedchars">listing_split-&gt;number_of_rows</span> &gt; 0) &amp;&amp; ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
</pre><pre class="diff" id="added">+  if ( ($<span id="addedchars">Qlisting-&gt;numberOfRows()</span> &gt; 0) &amp;&amp; ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
</pre><pre class="diff" id="context"> ?&gt;
 &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
   &lt;tr&gt;
</pre><pre class="diff" id="removed">-    &lt;td class="smallText"&gt;&lt;?php echo $listing_split-&gt;display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?&gt;&lt;/td&gt;
-    &lt;td class="smallText" align="right"&gt;&lt;?php echo TEXT_RESULT_PAGE . ' ' . $listing_split-&gt;display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="added">+    &lt;td class="smallText"&gt;&lt;?php echo $Qlisting-&gt;displayBatchLinksTotal(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?&gt;&lt;/td&gt;
+    &lt;td class="smallText" align="right"&gt;&lt;?php echo $Qlisting-&gt;displayBatchLinksPullDown('page', tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="context">   &lt;/tr&gt;
 &lt;/table&gt;
 &lt;?php
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.9</small></center>
</body></html>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click