logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

[TEP-COMMIT] CVS: admin/admin stats_customers.php,1.29,1.30 stats_products_: msg#00138

Subject: [TEP-COMMIT] CVS: admin/admin stats_customers.php,1.29,1.30 stats_products_viewed.php,1.27,1.28 stats_products_purchased.php,1.27,1.28
Update of /cvsroot/tep/admin/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv27219

Modified Files:
        stats_customers.php stats_products_viewed.php 
        stats_products_purchased.php 
Log Message:
standards updates

Index: stats_customers.php
===================================================================
RCS file: /cvsroot/tep/admin/admin/stats_customers.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- stats_customers.php 16 May 2002 15:32:22 -0000      1.29
+++ stats_customers.php 20 Jun 2003 00:44:35 -0000      1.30
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -55,13 +55,14 @@
                 <td class="dataTableHeadingContent" align="right"><?php echo 
TABLE_HEADING_TOTAL_PURCHASED; ?>&nbsp;</td>
               </tr>
 <?php
-  if ($HTTP_GET_VARS['page'] > 1) $rows = $HTTP_GET_VARS['page'] * 
MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;
+  if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = 
$HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - 
MAX_DISPLAY_SEARCH_RESULTS;
   $customers_query_raw = "select c.customers_firstname, c.customers_lastname, 
sum(op.products_quantity * op.final_price) as ordersum from " . TABLE_CUSTOMERS 
. " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where 
c.customers_id = o.customers_id and o.orders_id = op.orders_id group by 
c.customers_firstname, c.customers_lastname order by ordersum DESC";
   $customers_split = new splitPageResults($HTTP_GET_VARS['page'], 
MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows);
 // fix counted customers
   $customers_query_numrows = tep_db_query("select customers_id from " . 
TABLE_ORDERS . " group by customers_id");
   $customers_query_numrows = tep_db_num_rows($customers_query_numrows);
 
+  $rows = 0;
   $customers_query = tep_db_query($customers_query_raw);
   while ($customers = tep_db_fetch_array($customers_query)) {
     $rows++;
@@ -101,4 +102,4 @@
 <!-- footer_eof //-->
 </body>
 </html>
-<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
\ No newline at end of file
+<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Index: stats_products_viewed.php
===================================================================
RCS file: /cvsroot/tep/admin/admin/stats_products_viewed.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- stats_products_viewed.php   29 Jan 2003 23:22:44 -0000      1.27
+++ stats_products_viewed.php   20 Jun 2003 00:44:35 -0000      1.28
@@ -52,7 +52,8 @@
                 <td class="dataTableHeadingContent" align="center"><?php echo 
TABLE_HEADING_VIEWED; ?>&nbsp;</td>
               </tr>
 <?php
-  if ($HTTP_GET_VARS['page'] > 1) $rows = $HTTP_GET_VARS['page'] * 
MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;
+  if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = 
$HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - 
MAX_DISPLAY_SEARCH_RESULTS;
+  $rows = 0;
   $products_query_raw = "select p.products_id, pd.products_name, 
pd.products_viewed, l.name from " . TABLE_PRODUCTS . " p, " . 
TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where 
p.products_id = pd.products_id and l.languages_id = pd.language_id order by 
pd.products_viewed DESC";
   $products_split = new splitPageResults($HTTP_GET_VARS['page'], 
MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
   $products_query = tep_db_query($products_query_raw);

Index: stats_products_purchased.php
===================================================================
RCS file: /cvsroot/tep/admin/admin/stats_products_purchased.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- stats_products_purchased.php        18 Nov 2002 15:10:23 -0000      1.27
+++ stats_products_purchased.php        20 Jun 2003 00:44:35 -0000      1.28
@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2002 osCommerce
+  Copyright (c) 2003 osCommerce
 
   Released under the GNU General Public License
 */
@@ -52,10 +52,11 @@
                 <td class="dataTableHeadingContent" align="center"><?php echo 
TABLE_HEADING_PURCHASED; ?>&nbsp;</td>
               </tr>
 <?php
-  if ($HTTP_GET_VARS['page'] > 1) $rows = $HTTP_GET_VARS['page'] * 
MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;
+  if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = 
$HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - 
MAX_DISPLAY_SEARCH_RESULTS;
   $products_query_raw = "select p.products_id, p.products_ordered, 
pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION 
. " pd where pd.products_id = p.products_id and pd.language_id = '" . 
$languages_id. "' and p.products_ordered > 0 group by pd.products_id order by 
p.products_ordered DESC, pd.products_name";
   $products_split = new splitPageResults($HTTP_GET_VARS['page'], 
MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
 
+  $rows = 0;
   $products_query = tep_db_query($products_query_raw);
   while ($products = tep_db_fetch_array($products_query)) {
     $rows++;
@@ -95,4 +96,4 @@
 <!-- footer_eof //-->
 </body>
 </html>
-<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
\ No newline at end of file
+<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php


<Prev in Thread] Current Thread [Next in Thread>