Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

parse error???


ipodskins

Recommended Posts

Posted

hi

ive just installed the low stock report cotribution and i get the following eror

 

 

Parse error: parse error, unexpected T_REQUIRE in /home/ipodskin/public_html/admin/stats_low_stock.php on line 3

 

 

here is the page

 

<?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)

 

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">

</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

 

 

any ideas???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...