[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_products_viewed.php

Zen Cart 源代码 stats_products_viewed.php




下载文件

文件名: stats_products_viewed.php
文件类型: PHP文件
文件大小: 6.17 KiB
MD5: 617454ca9715e9ace14bb923e2d0df4a

stats_products_viewed.php - 关闭高亮
  1. <?php
  2. //
  3. // +----------------------------------------------------------------------+
  4. // |zen-cart Open Source E-commerce                                       |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 2003 The zen-cart developers                           |
  7. // |                                                                      |
  8. // | http://www.zen-cart.com/index.php                                    |
  9. // |                                                                      |
  10. // | Portions Copyright (c) 2003 osCommerce                               |
  11. // +----------------------------------------------------------------------+
  12. // | This source file is subject to version 2.0 of the GPL license,       |
  13. // | that is bundled with this package in the file LICENSE, and is        |
  14. // | available through the world-wide-web at the following url:           |
  15. // | http://www.zen-cart.com/license/2_0.txt.                             |
  16. // | If you did not receive a copy of the zen-cart license and are unable |
  17. // | to obtain it through the world-wide-web, please send a note to       |
  18. // | license@zen-cart.com so we can mail you a copy immediately.          |
  19. // +----------------------------------------------------------------------+
  20. //  $Id: stats_products_viewed.php 1969 2005-09-13 06:57:21Z drbyte $
  21. //
  22.   require('includes/application_top.php');
  23. ?>
  24. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  25. <html <?php echo HTML_PARAMS; ?>>
  26. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  28. <title><?php echo TITLE; ?></title>
  29. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  30. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  31. <script language="javascript" src="includes/menu.js"></script>
  32. <script language="javascript" src="includes/general.js"></script>
  33. <script type="text/javascript">
  34.   <!--
  35.   function init()
  36.   {
  37.     cssjsmenu('navbar');
  38.     if (document.getElementById)
  39.     {
  40.       var kill = document.getElementById('hoverJS');
  41.       kill.disabled = true;
  42.     }
  43.   }
  44.   // -->
  45. </script>
  46. </head>
  47. <body onload="init()">
  48. <!-- header //-->
  49. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  50. <!-- header_eof //-->
  51.  
  52. <!-- body //-->
  53. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  54.   <tr>
  55. <!-- body_text //-->
  56.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  57.       <tr>
  58.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  59.           <tr>
  60.             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  61.             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  62.           </tr>
  63.         </table></td>
  64.       </tr>
  65.       <tr>
  66.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  67.           <tr>
  68.             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  69.               <tr class="dataTableHeadingRow">
  70.                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td>
  71.                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
  72.                 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?>&nbsp;</td>
  73.               </tr>
  74. <?php
  75.   if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS;
  76.   $rows = 0;
  77.   $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";
  78.   $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $products_query_raw, $products_query_numrows);
  79.   $products = $db->Execute($products_query_raw);
  80.   while (!$products->EOF) {
  81.  
  82. // only show low stock on products that can be added to the cart
  83.     if ($zc_products->get_allow_add_to_cart($products->fields['products_id']) == 'Y') {
  84.       $rows++;
  85.  
  86.       if (strlen($rows) < 2) {
  87.         $rows = '0' . $rows;
  88.       }
  89.       $cPath = zen_get_product_path($products->fields['products_id']);
  90. ?>
  91.               <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id']); ?>'">
  92.                 <td class="dataTableContent" align="right"><?php echo $products->fields['products_id']; ?>&nbsp;&nbsp;</td>
  93.                 <td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id']) . '">' . $products->fields['products_name'] . '</a> (' . $products->fields['name'] . ')'; ?></td>
  94.                 <td class="dataTableContent" align="center"><?php echo $products->fields['products_viewed']; ?>&nbsp;</td>
  95.               </tr>
  96. <?php
  97.     }
  98.     $products->MoveNext();
  99.   }
  100. ?>
  101.             </table></td>
  102.           </tr>
  103.           <tr>
  104.             <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  105.               <tr>
  106.                 <td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
  107.                 <td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_REPORTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
  108.               </tr>
  109.             </table></td>
  110.           </tr>
  111.         </table></td>
  112.       </tr>
  113.     </table></td>
  114. <!-- body_text_eof //-->
  115.   </tr>
  116. </table>
  117. <!-- body_eof //-->
  118.  
  119. <!-- footer //-->
  120. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  121. <!-- footer_eof //-->
  122. </body>
  123. </html>
  124. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


cron