JoeHeinenDC Posted February 3, 2005 Share Posted February 3, 2005 (edited) I am getting the following error and can't figure it out Parse error: parse error, unexpected T_REQUIRE in /www/#/###/htdocs/catalog/admin/stats_low_stock.php on line 3 Here is the code <?php/* $Id: stats_low_stock.php,v 1.10extra 2002/04/12 23:13:45 Mounir Ayari Exp $(v 1.1 by Alexandros Polydorou 2003/04/24)(v 1.11 by Eric Lowe 2004/03/30)(v 1.12 by Rob Woodgate 2004/04/01)(v 1.15 by Aaron Hiatt 2004/11/09) (v 1.16 by Rob Woodgate 2004/12/17) osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2002 osCommerce Released under the GNU General Public License*/ require('includes/application_top.php');?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html <?php echo HTML_PARAMS; ?>><head><meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"><title><?php echo TITLE; ?></title><link rel="stylesheet" type="text/css" href="includes/stylesheet.css"><script language="javascript" src="includes/general.js"></script></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"><!-- header //--><?php require(DIR_WS_INCLUDES . 'header.php'); ?><!-- header_eof //--><!-- body //--><table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"><!-- left_navigation //--><?php require(DIR_WS_INCLUDES . 'column_left.php'); $sorted = $HTTP_GET_VARS['sorted'];$orderby = $HTTP_GET_VARS['orderby'];if ($sorted !== "ASC" and $sorted !== "DESC") $sorted = "ASC"; ?><!-- left_navigation_eof //--> </table></td><!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td> <td class="dataTableHeadingContent"><?php if (!isset($orderby) or ($orderby == "name" and $sorted == "ASC")) $to_sort = "DESC"; else $to_sort = "ASC"; echo '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK, 'orderby=name&sorted='. $to_sort) . '" class="headerLink">' . TABLE_HEADING_PRODUCTS . '</a>'; ?></td> <td class="dataTableHeadingContent"><?php if (!isset($orderby) or ($orderby == "model" and $sorted == "ASC")) $to_sort = "DESC"; else $to_sort = "ASC"; echo '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK, 'orderby=model&sorted='. $to_sort) . '" class="headerLink">' .TABLE_HEADING_PROD_ID . '</a>'; ?></td> <td class="dataTableHeadingContent" align="right"><?php if (!isset($orderby) or ($orderby == "stock" and $sorted == "ASC")) $to_sort = "DESC"; else $to_sort = "ASC"; echo '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK, 'orderby=stock&sorted='. $to_sort) . '" class="headerLink">' .TABLE_HEADING_QTY_LEFT . '</a>'; ?> </td> </tr><?php if ($HTTP_GET_VARS['page'] > 1) $rows = $HTTP_GET_VARS['page'] * 20 - 20; if ($orderby == "name") {$db_orderby = "pd.products_name";} elseif ($orderby == "stock") {$db_orderby = "p.products_quantity";} else {$db_orderby = "pd.products_name";} $products_query_raw = "select p.products_id, p.products_quantity, pd.products_name, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . $languages_id. "' and p.products_quantity <= " . STOCK_REORDER_LEVEL . " group by pd.products_id order by $db_orderby $sorted"; $products_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows); $products_query = tep_db_query($products_query_raw); while ($products = tep_db_fetch_array($products_query)) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } $products_id = $products['products_id']; $last_category_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = $products_id"); $last_category = tep_db_fetch_array($last_category_query); $p_category = $last_category["categories_id"]; do { $p_category_array[] = $p_category; $last_category_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = $p_category"); $last_category = tep_db_fetch_array($last_category_query); $p_category = $last_category["parent_id"]; } while ($p_category); $cPath_array = array_reverse($p_category_array); ?><tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo tep_href_link(FILENAME_CATEGORIES, tep_get_path() . '&pID=' . $products['products_id'] . '&action=new_product', 'NONSSL'); ?>'"> <td align="left" class="dataTableContent"><?php echo $rows; ?>.</td> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path() . '&pID=' . $products['products_id']) . '" class="blacklink">' . $products['products_name'] . '</a>'; ?></td> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path() . '&pID=' . $products['products_id'], 'NONSSL') . '&action=new_product">' . $products['products_model'] . '</a>'; ?></td> <td align="right" class="dataTableContent"><?php echo $products['products_quantity']; ?></td> </tr><?php unset($cPath_array); unset($p_category_array); }?> </table></td> </tr> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <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> <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'], "orderby=" . $orderby . "&sorted=" . $sorted); ?> </td> </tr> </table></td> </tr> </table></td> </tr> </table></td><!-- body_text_eof //--> </tr></table><!-- body_eof //--> </tr></table><!-- body_eof //--><!-- footer //--><?php require(DIR_WS_INCLUDES . 'footer.php'); ?><!-- footer_eof //--></body></html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Edited February 3, 2005 by JoeHeinenDC Quote Link to comment Share on other sites More sharing options...
JoeHeinenDC Posted February 3, 2005 Author Share Posted February 3, 2005 not sure what I did....but its working Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.