Hey. I was wondering if someone could help me with something.
I'm updating an existing osCommerce for someone, and when uploading the updated index.php I accidentally did a stripslash. I'm not sure how I did this, or what one is!
Foolishly I did not save a backup, since I was only changing one spelling mistake, I did not see it necessary.
I'm trying to repair the damaged index.php, but I am not having any success.
the error the website is giving is:
Notice: Undefined variable: category_depth in [server URL] on line 48
Notice: Undefined variable: category_depth in [server URL] on line 67
Notice: Undefined variable: category_depth in [server URL] on line 70
The code I have is as follows:
<?php
/*
$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
define('TEXT_MAIN', '<FONT color=blue> <b><FONT face=Verdana size="2">
[website content is here, just text]
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Let\'s See What We Have Here');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Product Name');
define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
define('TABLE_HEADING_QUANTITY', 'Quantity');
define('TABLE_HEADING_PRICE', 'Price');
define('TABLE_HEADING_WEIGHT', 'Weight');
define('TABLE_HEADING_BUY_NOW', 'Buy Now');
define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', '<b>Show:</b>');
define('TEXT_BUY', 'Buy 1 \'');
define('TEXT_NOW', '\' now');
define('TEXT_ALL_CATEGORIES', 'All Categories');
define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
define('HEADING_TITLE', 'WELCOME to GB Gold Coins!');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>
Can anyone help me?
Thanks