[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> stats_products_viewed.php (source)

   1  <?php
   2  /*

   3  $Id: stats_products_viewed.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13    require ('includes/application_top.php');
  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  <script language="javascript" src="includes/general.js"></script>
  22  </head>
  23  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
  24  <!-- header //-->
  25  <?php require (DIR_WS_INCLUDES . 'header.php'); ?>
  26  <!-- header_eof //-->
  27  
  28  <!-- body //-->
  29  <table border="0" width="100%" cellspacing="2" cellpadding="2">
  30    <tr>
  31      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
  32  <!-- left_navigation //-->
  33  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
  34  <!-- left_navigation_eof //-->
  35      </table></td>
  36  <!-- body_text //-->
  37      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  38        <tr>
  39          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  40            <tr>
  41              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  42              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  43            </tr>
  44          </table></td>
  45        </tr>
  46        <tr>
  47          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  48            <tr>
  49              <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  50                <tr class="dataTableHeadingRow">
  51                  <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td>
  52                  <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
  53                  <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?>&nbsp;</td>
  54                </tr>
  55  <?php
  56    if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = $HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;
  57    $rows = 0;
  58    $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";
  59    $products_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
  60    $products_query = tep_db_query($products_query_raw);
  61    while ($products = tep_db_fetch_array($products_query)) {
  62      $rows++;
  63  
  64      if (strlen($rows) < 2) {
  65        $rows = '0' . $rows;
  66      }
  67  ?>
  68                <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $products['products_id'] . '&origin=' . FILENAME_STATS_PRODUCTS_VIEWED . '?page=' . $HTTP_GET_VARS['page'], 'NONSSL'); ?>'">
  69                  <td class="dataTableContent"><?php echo $rows; ?>.</td>
  70                  <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $products['products_id'] . '&origin=' . FILENAME_STATS_PRODUCTS_VIEWED . '?page=' . $HTTP_GET_VARS['page'], 'NONSSL') . '">' . $products['products_name'] . '</a> (' . $products['name'] . ')'; ?></td>
  71                  <td class="dataTableContent" align="center"><?php echo $products['products_viewed']; ?>&nbsp;</td>
  72                </tr>
  73  <?php
  74    }
  75  ?>
  76              </table></td>
  77            </tr>
  78            <tr>
  79              <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  80                <tr>
  81                  <td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
  82                  <td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
  83                </tr>
  84              </table></td>
  85            </tr>
  86          </table></td>
  87        </tr>
  88      </table></td>
  89  <!-- body_text_eof //-->
  90    </tr>
  91  </table>
  92  <!-- body_eof //-->
  93  
  94  <!-- footer //-->
  95  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
  96  <!-- footer_eof //-->
  97  </body>
  98  </html>
  99  <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7