[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 stats_customers.php

Zen Cart 源代码 stats_customers.php




下载文件

文件名: stats_customers.php
文件类型: PHP文件
文件大小: 5.31 KiB
MD5: 0b29b62940814029b4f8b74f430dcf70

stats_customers.php - 关闭高亮
  1. <?php
  2. /**
  3.  * @package admin
  4.  * @copyright Copyright 2003-2010 Zen Cart Development Team
  5.  * @copyright Portions Copyright 2003 osCommerce
  6.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  7.  * @version $Id: stats_customers.php 15582 2010-02-26 17:22:10Z ajeh $
  8.  */
  9.  
  10.   require('includes/application_top.php');
  11.  
  12.   require(DIR_WS_CLASSES . 'currencies.php');
  13.   $currencies = new currencies();
  14. ?>
  15. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  16. <html <?php echo HTML_PARAMS; ?>>
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  19. <title><?php echo TITLE; ?></title>
  20. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  21. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  22. <script language="javascript" src="includes/menu.js"></script>
  23. <script language="javascript" src="includes/general.js"></script>
  24. <script type="text/javascript">
  25.   <!--
  26.   function init()
  27.   {
  28.     cssjsmenu('navbar');
  29.     if (document.getElementById)
  30.     {
  31.       var kill = document.getElementById('hoverJS');
  32.       kill.disabled = true;
  33.     }
  34.   }
  35.   // -->
  36. </script>
  37. </head>
  38. <body onload="init()">
  39. <!-- header //-->
  40. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  41. <!-- header_eof //-->
  42.  
  43. <!-- body //-->
  44. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  45.   <tr>
  46. <!-- body_text //-->
  47.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  48.       <tr>
  49.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  50.           <tr>
  51.             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  52.             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  53.           </tr>
  54.         </table></td>
  55.       </tr>
  56.       <tr>
  57.         <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  58.           <tr>
  59.             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  60.               <tr class="dataTableHeadingRow">
  61.                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td>
  62.                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
  63.                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_PURCHASED; ?>&nbsp;</td>
  64.               </tr>
  65. <?php
  66.   if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS;
  67.   $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges)  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_id order by ordersum DESC";
  68.   $customers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $customers_query_raw, $customers_query_numrows);
  69. // fix counted customers
  70.   $customers_query_m = $db->Execute("select customers_id
  71.                                           from " . TABLE_ORDERS . " group by customers_id");
  72.  
  73.   $customers_query_numrows = $customers_query_m->RecordCount();
  74.  
  75.   $rows = 0;
  76.   $customers = $db->Execute($customers_query_raw);
  77.   while (!$customers->EOF) {
  78.     $rows++;
  79.  
  80.     if (strlen($rows) < 2) {
  81.       $rows = '0' . $rows;
  82.     }
  83. ?>
  84.               <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $customers->fields['customers_id'], 'NONSSL'); ?>'">
  85.                 <td class="dataTableContent" align="right"><?php echo $customers->fields['customers_id']; ?>&nbsp;&nbsp;</td>
  86.                 <td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $customers->fields['customers_id'], 'NONSSL') . '">' . $customers->fields['customers_firstname'] . ' ' . $customers->fields['customers_lastname'] . '</a>'; ?></td>
  87.                 <td class="dataTableContent" align="right"><?php echo $currencies->format($customers->fields['ordersum']); ?>&nbsp;</td>
  88.               </tr>
  89. <?php
  90.     $customers->MoveNext();
  91.   }
  92. ?>
  93.             </table></td>
  94.           </tr>
  95.           <tr>
  96.             <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  97.               <tr>
  98.                 <td class="smallText" valign="top"><?php echo $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS); ?></td>
  99.                 <td class="smallText" align="right"><?php echo $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_REPORTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?>&nbsp;</td>
  100.               </tr>
  101.             </table></td>
  102.           </tr>
  103.         </table></td>
  104.       </tr>
  105.     </table></td>
  106. <!-- body_text_eof //-->
  107.   </tr>
  108. </table>
  109. <!-- body_eof //-->
  110.  
  111. <!-- footer //-->
  112. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  113. <!-- footer_eof //-->
  114. </body>
  115. </html>
  116. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  117.  


cron