ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/stats_products_lowstock.php
Go to the documentation of this file.
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_lowstock.php 1969 2005-09-13 06:57:21Z drbyte $
00021 //
00022   require('includes/application_top.php');
00023 
00024 ?>
00025 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
00026 <html <?php echo HTML_PARAMS; ?>>
00027 <head>
00028 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
00029 <title><?php echo TITLE; ?></title>
00030 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
00031 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
00032 <script language="javascript" src="includes/menu.js"></script>
00033 <script language="javascript" src="includes/general.js"></script>
00034 <script type="text/javascript">
00035   <!--
00036   function init()
00037   {
00038     cssjsmenu('navbar');
00039     if (document.getElementById)
00040     {
00041       var kill = document.getElementById('hoverJS');
00042       kill.disabled = true;
00043     }
00044   }
00045   // -->
00046 </script>
00047 </head>
00048 <body onload="init()">
00049 <!-- header //-->
00050 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
00051 <!-- header_eof //-->
00052 
00053 <!-- body //-->
00054 <table border="0" width="100%" cellspacing="2" cellpadding="2">
00055   <tr>
00056 <!-- body_text //-->
00057     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
00058       <tr>
00059         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
00060           <tr>
00061             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
00062             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
00063           </tr>
00064         </table></td>
00065       </tr>
00066       <tr>
00067         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
00068           <tr>
00069             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00070               <tr class="dataTableHeadingRow">
00071                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td>
00072                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
00073                 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?>&nbsp;</td>
00074               </tr>
00075 <?php
00076   if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS;
00077   $rows = 0;
00078   $products_query_raw = "select p.products_id, pd.products_name, p.products_quantity, p.products_type from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id='" . $_SESSION['languages_id'] . "' order by p.products_quantity, pd.products_name";
00079   $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $products_query_raw, $products_query_numrows);
00080   $products = $db->Execute($products_query_raw);
00081   while (!$products->EOF) {
00082 
00083 // only show low stock on products that can be added to the cart
00084     if ($zc_products->get_allow_add_to_cart($products->fields['products_id']) == 'Y') {
00085 
00086       $rows++;
00087 
00088       if (strlen($rows) < 2) {
00089         $rows = '0' . $rows;
00090       }
00091 
00092       $type_handler = $zc_products->get_admin_handler($products->fields['products_type']);
00093 
00094       $cPath = zen_get_product_path($products->fields['products_id']);
00095 ?>
00096               <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo zen_href_link($type_handler, '&product_type=' . $products->fields['products_type'] . '&cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product'); ?>'">
00097                 <td class="dataTableContent" align="right"><?php echo $products->fields['products_id']; ?>&nbsp;&nbsp;</td>
00098                 <td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id']) . '">' . $products->fields['products_name'] . '</a>'; ?></td>
00099                 <td class="dataTableContent" align="center"><?php echo $products->fields['products_quantity']; ?>&nbsp;</td>
00100               </tr>
00101 <?php
00102     }
00103     $products->MoveNext();
00104   }
00105 ?>
00106             </table></td>
00107           </tr>
00108           <tr>
00109             <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00110               <tr>
00111                 <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>
00112                 <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>
00113               </tr>
00114             </table></td>
00115           </tr>
00116         </table></td>
00117       </tr>
00118     </table></td>
00119 <!-- body_text_eof //-->
00120   </tr>
00121 </table>
00122 <!-- body_eof //-->
00123 
00124 <!-- footer //-->
00125 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
00126 <!-- footer_eof //-->
00127 </body>
00128 </html>
00129 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
 All Data Structures Namespaces Files Functions Variables Enumerations