|
ZenCart_Documentation
1.5.0
http://www.collinsharper.com
|
00001 <?php 00002 // 00003 // +----------------------------------------------------------------------+ 00004 // |zen-cart Open Source E-commerce | 00005 // +----------------------------------------------------------------------+ 00006 // | Copyright (c) 2003 The zen-cart developers | 00007 // | | 00008 // | http://www.zen-cart.com/index.php | 00009 // | | 00010 // | Portions Copyright (c) 2003 osCommerce | 00011 // +----------------------------------------------------------------------+ 00012 // | This source file is subject to version 2.0 of the GPL license, | 00013 // | that is bundled with this package in the file LICENSE, and is | 00014 // | available through the world-wide-web at the following url: | 00015 // | http://www.zen-cart.com/license/2_0.txt. | 00016 // | If you did not receive a copy of the zen-cart license and are unable | 00017 // | to obtain it through the world-wide-web, please send a note to | 00018 // | [email protected] so we can mail you a copy immediately. | 00019 // +----------------------------------------------------------------------+ 00020 // $Id: stats_products_viewed.php 1969 2005-09-13 06:57:21Z drbyte $ 00021 // 00022 require('includes/application_top.php'); 00023 ?> 00024 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 00025 <html <?php echo HTML_PARAMS; ?>> 00026 <head> 00027 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 00028 <title><?php echo TITLE; ?></title> 00029 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 00030 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS"> 00031 <script language="javascript" src="includes/menu.js"></script> 00032 <script language="javascript" src="includes/general.js"></script> 00033 <script type="text/javascript"> 00034 <!-- 00035 function init() 00036 { 00037 cssjsmenu('navbar'); 00038 if (document.getElementById) 00039 { 00040 var kill = document.getElementById('hoverJS'); 00041 kill.disabled = true; 00042 } 00043 } 00044 // --> 00045 </script> 00046 </head> 00047 <body onload="init()"> 00048 <!-- header //--> 00049 <?php require(DIR_WS_INCLUDES . 'header.php'); ?> 00050 <!-- header_eof //--> 00051 00052 <!-- body //--> 00053 <table border="0" width="100%" cellspacing="2" cellpadding="2"> 00054 <tr> 00055 <!-- body_text //--> 00056 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> 00057 <tr> 00058 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 00059 <tr> 00060 <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> 00061 <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 00062 </tr> 00063 </table></td> 00064 </tr> 00065 <tr> 00066 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 00067 <tr> 00068 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 00069 <tr class="dataTableHeadingRow"> 00070 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td> 00071 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> 00072 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?> </td> 00073 </tr> 00074 <?php 00075 if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS; 00076 $rows = 0; 00077 $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"; 00078 $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $products_query_raw, $products_query_numrows); 00079 $products = $db->Execute($products_query_raw); 00080 while (!$products->EOF) { 00081 00082 // only show low stock on products that can be added to the cart 00083 if ($zc_products->get_allow_add_to_cart($products->fields['products_id']) == 'Y') { 00084 $rows++; 00085 00086 if (strlen($rows) < 2) { 00087 $rows = '0' . $rows; 00088 } 00089 $cPath = zen_get_product_path($products->fields['products_id']); 00090 ?> 00091 <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']); ?>'"> 00092 <td class="dataTableContent" align="right"><?php echo $products->fields['products_id']; ?> </td> 00093 <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> 00094 <td class="dataTableContent" align="center"><?php echo $products->fields['products_viewed']; ?> </td> 00095 </tr> 00096 <?php 00097 } 00098 $products->MoveNext(); 00099 } 00100 ?> 00101 </table></td> 00102 </tr> 00103 <tr> 00104 <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 00105 <tr> 00106 <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> 00107 <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> 00108 </tr> 00109 </table></td> 00110 </tr> 00111 </table></td> 00112 </tr> 00113 </table></td> 00114 <!-- body_text_eof //--> 00115 </tr> 00116 </table> 00117 <!-- body_eof //--> 00118 00119 <!-- footer //--> 00120 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> 00121 <!-- footer_eof //--> 00122 </body> 00123 </html> 00124 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>