chrometweaks.org

Is iPage.Com a reputable company?

Click Here To View All Answers...


Got a question... Is iPage.Com a reputable company? Looking forward for any answer or 2. Second question of mine... Fatal error: Call to undefined function: tep_get_languages() in /home/httpd/www.sweet16ssexshop.co.uk/html/oscommerce-2.2ms2/catalog/index.php on line 58.

Showing when entering my site.

Please help any advise.

Thanks..

Comments (36)

You betcha! however you might want to make sure and wait for someone else here to confirm my answer as I am unsure of myself. Better yet, why don't you give a call to the iPage guys because they can give you help better...

Comment #1

Hi steve,.

Here is the following code havent changed it unless in error, any help would be appreciated..

[CODE]<?php.

/*.

$Id: index.php,v 1.19 2003/06/27 09:38:31 dgw_ Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

Require('includes/application_top.php');.

$cat = array(array('title' => BOX_HEADING_CONFIGURATION,.

'image' => 'configuration.gif',.

'href' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=1'),.

'children' => array(array('title' => BOX_CONFIGURATION_MYSTORE, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=1')),.

Array('title' => BOX_CONFIGURATION_LOGGING, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=10')),.

Array('title' => BOX_CONFIGURATION_CACHE, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=11')))),.

Array('title' => BOX_HEADING_MODULES,.

'image' => 'modules.gif',.

'href' => tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=payment'),.

'children' => array(array('title' => BOX_MODULES_PAYMENT, 'link' => tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=payment')),.

Array('title' => BOX_MODULES_SHIPPING, 'link' => tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=shipping')))),.

Array('title' => BOX_HEADING_CATALOG,.

'image' => 'catalog.gif',.

'href' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'),.

'children' => array(array('title' => CATALOG_CONTENTS, 'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog')),.

Array('title' => BOX_CATALOG_MANUFACTURERS, 'link' => tep_href_link(FILENAME_MANUFACTURERS, 'selected_box=catalog')))),.

Array('title' => BOX_HEADING_LOCATION_AND_TAXES,.

'image' => 'location.gif',.

'href' => tep_href_link(FILENAME_COUNTRIES, 'selected_box=taxes'),.

'children' => array(array('title' => BOX_TAXES_COUNTRIES, 'link' => tep_href_link(FILENAME_COUNTRIES, 'selected_box=taxes')),.

Array('title' => BOX_TAXES_GEO_ZONES, 'link' => tep_href_link(FILENAME_GEO_ZONES, 'selected_box=taxes')))),.

Array('title' => BOX_HEADING_CUSTOMERS,.

'image' => 'customers.gif',.

'href' => tep_href_link(FILENAME_CUSTOMERS, 'selected_box=customers'),.

'children' => array(array('title' => BOX_CUSTOMERS_CUSTOMERS, 'link' => tep_href_link(FILENAME_CUSTOMERS, 'selected_box=customers')),.

Array('title' => BOX_CUSTOMERS_ORDERS, 'link' => tep_href_link(FILENAME_ORDERS, 'selected_box=customers')))),.

Array('title' => BOX_HEADING_LOCALIZATION,.

'image' => 'localization.gif',.

'href' => tep_href_link(FILENAME_CURRENCIES, 'selected_box=localization'),.

'children' => array(array('title' => BOX_LOCALIZATION_CURRENCIES, 'link' => tep_href_link(FILENAME_CURRENCIES, 'selected_box=localization')),.

Array('title' => BOX_LOCALIZATION_LANGUAGES, 'link' => tep_href_link(FILENAME_LANGUAGES, 'selected_box=localization')))),.

Array('title' => BOX_HEADING_REPORTS,.

'image' => 'reports.gif',.

'href' => tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, 'selected_box=reports'),.

'children' => array(array('title' => REPORTS_PRODUCTS, 'link' => tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, 'selected_box=reports')),.

Array('title' => REPORTS_ORDERS, 'link' => tep_href_link(FILENAME_STATS_CUSTOMERS, 'selected_box=reports')))),.

Array('title' => BOX_HEADING_TOOLS,.

'image' => 'tools.gif',.

'href' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'),.

'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools')),.

Array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER, 'selected_box=tools')),.

Array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER, 'selected_box=tools')))));.

$languages = tep_get_languages();.

$languages_array = array();.

$languages_selected = DEFAULT_LANGUAGE;.

For ($i = 0, $n = sizeof($languages); $i < $n; $i++) {.

$languages_array[] = array('id' => $languages[$i]['code'],.

'text' => $languages[$i]['name']);.

If ($languages[$i]['directory'] == $language) {.

$languages_selected = $languages[$i]['code'];.

}.

}.

?>.

<!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>.

<style type="text/css"><!.

A { color:#080381; text-decoration:none; }.

A:hover { color:#aabbdd; text-decoration:underline; }.

A.text:link, a.text:visited { color: #000000; text-decoration: none; }.

A:text:hover { color: #000000; text-decoration: underline; }.

A.main:link, a.main:visited { color: #6633ff; text-decoration: none; }.

A.main:hover { color: #6633ff; text-decoration: underline; }.

A.sub:link, a.sub:visited { color: #dddddd; text-decoration: none; }.

A.sub:hover { color: #dddddd; text-decoration: underline; }.

.heading { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; line-height: 1.5; color: #D3DBFF; }.

.main { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; font-weight: bold; line-height: 1.5; color: #6633ff; }.

.sub { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; line-height: 1.5; color: #dddddd; }.

.text { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; line-height: 1.5; color: #000000; }.

.menuBoxHeading { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #6633ff; font-weight: bold; background-color: #7187bb; border-color: #7187bb; border-style: solid; border-width: 1px; }.

.infoBox { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #080381; background-color: #f2f4ff; border-color: #7187bb; border-style: solid; border-width: 1px; }.

.smallText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }.

//></style>.

</head>.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">.

<table border="0" width="600" height="100%" cellspacing="0" cellpadding="0" align="center" valign="middle">.

<tr>.

<td><table border="0" width="600" height="440" cellspacing="0" cellpadding="1" align="center" valign="middle">.

<tr bgcolor="#000000">.

<td><table border="0" width="600" height="440" cellspacing="0" cellpadding="0">.

<tr bgcolor="#ffffff" height="50">.

<td height="50"><?php echo tep_image(DIR_WS_IMAGES'oscommerce.gif', 'osCommerce', '204', '50'); ?></td>.

<td align="right" class="text" nowrap><?php echo '<a href="'tep_href_link(FILENAME_DEFAULT)'">'HEADER_TITLE_ADMINISTRATION'</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="'tep_catalog_href_link()'">'HEADER_TITLE_ONLINE_CATALOG'</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://www.oscommerce.com" target="_blank">'HEADER_TITLE_SUPPORT_SITE'</a>'; ?>&nbsp;&nbsp;</td>.

</tr>.

<tr bgcolor="#080381">.

<td colspan="2"><table border="0" width="460" height="390" cellspacing="0" cellpadding="2">.

<tr valign="top">.

<td width="140" valign="top"><table border="0" width="140" height="390" cellspacing="0" cellpadding="2">.

<tr>.

<td valign="top"><br>.

<?php.

$heading = array();.

$contents = array();.

$heading[] = array('params' => 'class="menuBoxHeading"',.

'text' => 'osCommerce');.

$contents[] = array('params' => 'class="infoBox"',.

'text' => '<a href="http://www.oscommerce.com" target="_blank">'BOX_ENTRY_SUPPORT_SITE'</a><br>' ..

'<a href="http://www.oscommerce.com/community.php/forum" target="_blank">'BOX_ENTRY_SUPPORT_FORUMS'</a><br>' ..

'<a href="http://www.oscommerce.com/community.php/mlists" target="_blank">'BOX_ENTRY_MAILING_LISTS'</a><br>' ..

'<a href="http://www.oscommerce.com/community.php/bugs" target="_blank">'BOX_ENTRY_BUG_REPORTS'</a><br>' ..

'<a href="http://www.oscommerce.com/community.php/faq" target="_blank">'BOX_ENTRY_FAQ'</a><br>' ..

'<a href="http://www.oscommerce.com/community.php/irc" target="_blank">'BOX_ENTRY_LIVE_DISCUSSIONS'</a><br>' ..

'<a href="http://www.oscommerce.com/community.php/cvs" target="_blank">'BOX_ENTRY_CVS_REPOSITORY'</a><br>' ..

'<a href="http://www.oscommerce.com/about.php/portal" target="_blank">'BOX_ENTRY_INFORMATION_PORTAL'</a>');.

$box = new box;.

Echo $box->menuBox($heading, $contents);.

Echo '<br>';.

$orders_contents = '';.

$orders_status_query = tep_db_query("select orders_status_name, orders_status_id from "TABLE_ORDERS_STATUS" where language_id = '"$languages_id"'");.

While ($orders_status = tep_db_fetch_array($orders_status_query)) {.

$orders_pending_query = tep_db_query("select count(*) as count from "TABLE_ORDERS" where orders_status = '"$orders_status['orders_status_id']"'");.

$orders_pending = tep_db_fetch_array($orders_pending_query);.

$orders_contents .= '<a href="'tep_href_link(FILENAME_ORDERS, 'selected_box=customers&status='$orders_status['orders_status_id'])'">'$orders_status['orders_status_name']'</a>: '$orders_pending['count']'<br>';.

}.

$orders_contents = substr($orders_contents, 0, -4);.

$heading = array();.

$contents = array();.

$heading[] = array('params' => 'class="menuBoxHeading"',.

'text' => BOX_TITLE_ORDERS);.

$contents[] = array('params' => 'class="infoBox"',.

'text' => $orders_contents);.

$box = new box;.

Echo $box->menuBox($heading, $contents);.

Echo '<br>';.

$customers_query = tep_db_query("select count(*) as count from "TABLE_CUSTOMERS);.

$customers = tep_db_fetch_array($customers_query);.

$products_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS" where products_status = '1'");.

$products = tep_db_fetch_array($products_query);.

$reviews_query = tep_db_query("select count(*) as count from "TABLE_REVIEWS);.

$reviews = tep_db_fetch_array($reviews_query);.

$heading = array();.

$contents = array();.

$heading[] = array('params' => 'class="menuBoxHeading"',.

'text' => BOX_TITLE_STATISTICS);.

$contents[] = array('params' => 'class="infoBox"',.

'text' => BOX_ENTRY_CUSTOMERS' '$customers['count']'<br>' ..

BOX_ENTRY_PRODUCTS' '$products['count']'<br>' ..

BOX_ENTRY_REVIEWS' '$reviews['count']);.

$box = new box;.

Echo $box->menuBox($heading, $contents);.

Echo '<br>';.

$contents = array();.

If (getenv('HTTPS') == 'on') {.

$size = ((getenv('SSL_CIPHER_ALGKEYSIZE')) ? getenv('SSL_CIPHER_ALGKEYSIZE')'-bit' : '<i>'BOX_CONNECTION_UNKNOWN'</i>');.

$contents[] = array('params' => 'class="infoBox"',.

'text' => tep_image(DIR_WS_ICONS'locked.gif', ICON_LOCKED, '', '', 'align="right"')sprintf(BOX_CONNECTION_PROTECTED, $size));.

} else {.

$contents[] = array('params' => 'class="infoBox"',.

'text' => tep_image(DIR_WS_ICONS'unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"')BOX_CONNECTION_UNPROTECTED);.

}.

$box = new box;.

Echo $box->tableBlock($contents);.

?>.

</td>.

</tr>.

</table></td>.

<td width="460"><table border="0" width="460" height="390" cellspacing="0" cellpadding="2">.

<tr>.

<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">.

<tr><?php echo tep_draw_form('languages', 'index.php', '', 'get'); ?>.

<td class="heading"><?php echo HEADING_TITLE; ?></td>.

<td align="right"><?php echo tep_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"'); ?></td>.

</form></tr>.

</table></td>.

</tr>.

<?php.

$col = 2;.

$counter = 0;.

For ($i = 0, $n = sizeof($cat); $i < $n; $i++) {.

$counter++;.

If ($counter < $col) {.

Echo ' <tr>'"n";.

}.

Echo ' <td><table border="0" cellspacing="0" cellpadding="2">'"n" ..

' <tr>'"n" ..

' <td><a href="'$cat[$i]['href']'">'tep_image(DIR_WS_IMAGES'categories/'$cat[$i]['image'], $cat[$i]['title'], '32', '32')'</a></td>'"n" ..

' <td><table border="0" cellspacing="0" cellpadding="2">'"n" ..

' <tr>'"n" ..

' <td class="main"><a href="'$cat[$i]['href']'" class="main">'$cat[$i]['title']'</a></td>'"n" ..

' </tr>'"n" ..

' <tr>'"n" ..

' <td class="sub">';.

$children = '';.

For ($j = 0, $k = sizeof($cat[$i]['children']); $j < $k; $j++) {.

$children .= '<a href="'$cat[$i]['children'][$j]['link']'" class="sub">'$cat[$i]['children'][$j]['title']'</a>, ';.

}.

Echo substr($children, 0, -2);.

Echo '</td> '"n" ..

' </tr>'"n" ..

' </table></td>'"n" ..

' </tr>'"n" ..

' </table></td>'"n";.

If ($counter >= $col) {.

Echo ' </tr>'"n";.

$counter = 0;.

}.

}.

?>.

</table></td>.

</tr>.

</table></td>.

</tr>.

</table></td>.

</tr>.

<tr>.

<td><?php require(DIR_WS_INCLUDES'footer.php'); ?></td>.

</tr>.

</table></td>.

</tr>.

</table>.

</body>.

</html>..

Comment #2

You had me going for a minute there posting the wrong index file..

Can you post the correct one now please..

Comment #3

Steve this is the right one I have obviously uploaded the wrong one to the wrong place and ive overwrited it so now I dont have the right one..

Any advice mate!!!!!!!..

Comment #4

The one you posted was the admin/index.php not the catalog/index.php.

That is why you have the error..

Do you keep a backup copy of your store to hand so that you can retrieve the file that you require and upload it.

This post has been edited by.

241.

: 15 May 2004, 20:28..

Comment #5

No I dont steve I am new to all this and just didnt think (DAMM) I'm a idiot what do I do now..

Comment #6

Copy this code.

<?php.

/*.

 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $.

 osCommerce, Open Source E-Commerce Solutions.

 http://www.oscommerce.com.

 Copyright (c) 2003 osCommerce.

 Released under the GNU General Public License.

*/.

 require('includes/application_top.php');.

// the following cPath references come from application_top.php.

 $category_depth = 'top';.

 if (isset($cPath) && tep_not_null($cPath)) {.

   $categories_products_query = tep_db_query("select count(*) as total from "TABLE_PRODUCTS_TO_CATEGORIES" where categories_id = '"(int)$current_category_id"'");.

   $cateqories_products = tep_db_fetch_array($categories_products_query);.

   if ($cateqories_products['total'] > 0) {.

     $category_depth = 'products'; // display products.

   } else {.

     $category_parent_query = tep_db_query("select count(*) as total from "TABLE_CATEGORIES" where parent_id = '"(int)$current_category_id"'");.

     $category_parent = tep_db_fetch_array($category_parent_query);.

     if ($category_parent['total'] > 0) {.

       $category_depth = 'nested'; // navigate through the categories.

     } else {.

       $category_depth = 'products'; // category has no products, but display the 'no products' message.

     }.

   }.

 }.

 require(DIR_WS_LANGUAGES$language'/'FILENAME_DEFAULT);.

?>.

<!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>.

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER)DIR_WS_CATALOG; ?>">.

<link rel="stylesheet" type="text/css" href="stylesheet.css">.

</head>.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">.

<! header //>.

<?php require(DIR_WS_INCLUDES'header.php'); ?>.

<! header_eof //>.

<! body //>.

<table border="0" width="100%" cellspacing="3" cellpadding="3">.

 <tr>.

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! left_navigation //>.

<?php require(DIR_WS_INCLUDES'column_left.php'); ?>.

<! left_navigation_eof //>.

   </table></td>.

<! body_text //>.

<?php.

 if ($category_depth == 'nested') {.

   $category_query = tep_db_query("select cd.categories_name, c.categories_image from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.categories_id = '"(int)$current_category_id"' and cd.categories_id = '"(int)$current_category_id"' and cd.language_id = '"(int)$languages_id"'");.

   $category = tep_db_fetch_array($category_query);.

?>.

   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

     <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_image(DIR_WS_IMAGES$category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">.

         <tr>.

           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">.

             <tr>.

<?php.

   if (isset($cPath) && strpos('_', $cPath)) {.

// check to see if there are deeper categories within the current category.

     $category_links = array_reverse($cPath_array);.

     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {.

       $categories_query = tep_db_query("select count(*) as total from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.parent_id = '"(int)$category_links[$i]"' and c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"'");.

       $categories = tep_db_fetch_array($categories_query);.

       if ($categories['total'] < 1) {.

         // do nothing, go through the loop.

       } else {.

         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.parent_id = '"(int)$category_links[$i]"' and c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' order by sort_order, cd.categories_name");.

         break; // we've found the deepest category the customer is in.

       }.

     }.

   } else {.

     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.parent_id = '"(int)$current_category_id"' and c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' order by sort_order, cd.categories_name");.

   }.

   $number_of_categories = tep_db_num_rows($categories_query);.

   $rows = 0;.

   while ($categories = tep_db_fetch_array($categories_query)) {.

     $rows++;.

     $cPath_new = tep_get_path($categories['categories_id']);.

     $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW)'%';.

     echo '                <td align="center" class="smallText" width="'$width'" valign="top"><a href="'tep_href_link(FILENAME_DEFAULT, $cPath_new)'">'tep_image(DIR_WS_IMAGES$categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT)'<br>'$categories['categories_name']'</a></td>'"\n";.

     if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {.

       echo '              </tr>'"\n";.

       echo '              <tr>'"\n";.

     }.

   }.

// needed for the new products module shown below.

   $new_products_category_id = $current_category_id;.

?>.

             </tr>.

           </table></td>.

         </tr>.

         <tr>.

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

         </tr>.

         <tr>.

           <td><?php include(DIR_WS_MODULESFILENAME_NEW_PRODUCTS); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

   </table></td>.

<?php.

 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {.

// create column list.

   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,.

                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,.

                        'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,.

                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,.

                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,.

                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,.

                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,.

                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);.

   asort($define_list);.

   $column_list = array();.

   reset($define_list);.

   while (list($key, $value) = each($define_list)) {.

     if ($value > 0) $column_list[] = $key;.

   }.

   $select_column_list = '';.

   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {.

     switch ($column_list[$i]) {.

       case 'PRODUCT_LIST_MODEL':.

         $select_column_list .= 'p.products_model, ';.

         break;.

       case 'PRODUCT_LIST_NAME':.

         $select_column_list .= 'pd.products_name, ';.

         break;.

       case 'PRODUCT_LIST_MANUFACTURER':.

         $select_column_list .= 'm.manufacturers_name, ';.

         break;.

       case 'PRODUCT_LIST_QUANTITY':.

         $select_column_list .= 'p.products_quantity, ';.

         break;.

       case 'PRODUCT_LIST_IMAGE':.

         $select_column_list .= 'p.products_image, ';.

         break;.

       case 'PRODUCT_LIST_WEIGHT':.

         $select_column_list .= 'p.products_weight, ';.

         break;.

     }.

   }.

// show the products of a specified manufacturer.

   if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {.

// We are asked to show only a specific category.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_MANUFACTURERS" m, "TABLE_PRODUCTS_TO_CATEGORIES" p2c left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$HTTP_GET_VARS['filter_id']"'";.

     } else {.

// We show them all.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_MANUFACTURERS" m left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '"(int)$languages_id"' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'";.

     }.

   } else {.

// show the products in a given categorie.

     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {.

// We are asked to show only specific catgeory.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_MANUFACTURERS" m, "TABLE_PRODUCTS_TO_CATEGORIES" p2c left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '"(int)$HTTP_GET_VARS['filter_id']"' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$current_category_id"'";.

     } else {.

// We show them all.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_PRODUCTS" p left join "TABLE_MANUFACTURERS" m on p.manufacturers_id = m.manufacturers_id, "TABLE_PRODUCTS_TO_CATEGORIES" p2c left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$current_category_id"'";.

     }.

   }.

   if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {.

     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {.

       if ($column_list[$i] == 'PRODUCT_LIST_NAME') {.

         $HTTP_GET_VARS['sort'] = $i+1'a';.

         $listing_sql .= " order by pd.products_name";.

         break;.

       }.

     }.

   } else {.

     $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);.

     $sort_order = substr($HTTP_GET_VARS['sort'], 1);.

     $listing_sql .= ' order by ';.

     switch ($column_list[$sort_col-1]) {.

       case 'PRODUCT_LIST_MODEL':.

         $listing_sql .= "p.products_model "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_NAME':.

         $listing_sql .= "pd.products_name "($sort_order == 'd' ? 'desc' : '');.

         break;.

       case 'PRODUCT_LIST_MANUFACTURER':.

         $listing_sql .= "m.manufacturers_name "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_QUANTITY':.

         $listing_sql .= "p.products_quantity "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_IMAGE':.

         $listing_sql .= "pd.products_name";.

         break;.

       case 'PRODUCT_LIST_WEIGHT':.

         $listing_sql .= "p.products_weight "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_PRICE':.

         $listing_sql .= "final_price "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

     }.

   }.

?>.

   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

         <tr>.

           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>.

<?php.

// optional Product List Filter.

   if (PRODUCT_LIST_FILTER > 0) {.

     if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

       $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' and p.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"' order by cd.categories_name";.

     } else {.

       $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_MANUFACTURERS" m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '"(int)$current_category_id"' order by m.manufacturers_name";.

     }.

     $filterlist_query = tep_db_query($filterlist_sql);.

     if (tep_db_num_rows($filterlist_query) > 1) {.

       echo '            <td align="center" class="main">'tep_draw_form('filter', FILENAME_DEFAULT, 'get')TEXT_SHOW'&nbsp;';.

       if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

         echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);.

         $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));.

       } else {.

         echo tep_draw_hidden_field('cPath', $cPath);.

         $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));.

       }.

       echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);.

       while ($filterlist = tep_db_fetch_array($filterlist_query)) {.

         $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);.

       }.

       echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');.

       echo '</form></td>'"\n";.

     }.

   }.

// Get the right image for the top-right.

   $image = DIR_WS_IMAGES'table_background_list.gif';.

   if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

     $image = tep_db_query("select manufacturers_image from "TABLE_MANUFACTURERS" where manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'");.

     $image = tep_db_fetch_array($image);.

     $image = $image['manufacturers_image'];.

   } elseif ($current_category_id) {.

     $image = tep_db_query("select categories_image from "TABLE_CATEGORIES" where categories_id = '"(int)$current_category_id"'");.

     $image = tep_db_fetch_array($image);.

     $image = $image['categories_image'];.

   }.

?>.

           <td align="right"><?php echo tep_image(DIR_WS_IMAGES$image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><?php include(DIR_WS_MODULESFILENAME_PRODUCT_LISTING); ?></td>.

     </tr>.

   </table></td>.

<?php.

 } else { // default page.

?>.

   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

     <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_image(DIR_WS_IMAGES'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

         <tr>.

           <td class="main"><?php echo tep_customer_greeting(); ?></td>.

         </tr>.

         <tr>.

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

         </tr>.

         <tr>.

           <td class="main"><?php echo TEXT_MAIN; ?></td>.

         </tr>.

         <tr>.

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

         </tr>.

         <tr>.

           <td><?php include(DIR_WS_MODULESFILENAME_NEW_PRODUCTS); ?></td>.

         </tr>.

<?php.

   include(DIR_WS_MODULESFILENAME_UPCOMING_PRODUCTS);.

?>.

       </table></td>.

     </tr>.

   </table></td>.

<?php.

 }.

?>.

<! body_text_eof //>.

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! right_navigation //>.

<?php require(DIR_WS_INCLUDES'column_right.php'); ?>.

<! right_navigation_eof //>.

   </table></td>.

 </tr>.

</table>.

<! body_eof //>.

<! footer //>.

<?php require(DIR_WS_INCLUDES'footer.php'); ?>.

<! footer_eof //>.

<br>.

</body>.

</html>.

<?php require(DIR_WS_INCLUDES'application_bottom.php'); ?>.

And create a new page called index.php to upload, this is a default index.php file then backup your entire store either to another directory on the server or to your local machine. This may not give you all that you originally had but will be close. If you want I can add in that pesky javascript section for you...

Comment #7

That would be brilliant if you could steve.

Many thanks.

Clive..

Comment #8

Here you go I have placed the container below your main text..

<?php.

/*.

 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $.

 osCommerce, Open Source E-Commerce Solutions.

 http://www.oscommerce.com.

 Copyright (c) 2003 osCommerce.

 Released under the GNU General Public License.

*/.

 require('includes/application_top.php');.

// the following cPath references come from application_top.php.

 $category_depth = 'top';.

 if (isset($cPath) && tep_not_null($cPath)) {.

   $categories_products_query = tep_db_query("select count(*) as total from "TABLE_PRODUCTS_TO_CATEGORIES" where categories_id = '"(int)$current_category_id"'");.

   $cateqories_products = tep_db_fetch_array($categories_products_query);.

   if ($cateqories_products['total'] > 0) {.

     $category_depth = 'products'; // display products.

   } else {.

     $category_parent_query = tep_db_query("select count(*) as total from "TABLE_CATEGORIES" where parent_id = '"(int)$current_category_id"'");.

     $category_parent = tep_db_fetch_array($category_parent_query);.

     if ($category_parent['total'] > 0) {.

       $category_depth = 'nested'; // navigate through the categories.

     } else {.

       $category_depth = 'products'; // category has no products, but display the 'no products' message.

     }.

   }.

 }.

 require(DIR_WS_LANGUAGES$language'/'FILENAME_DEFAULT);.

?>.

<!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>.

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER)DIR_WS_CATALOG; ?>">.

<link rel="stylesheet" type="text/css" href="stylesheet.css">.

</head>.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">.

<! header //>.

<?php require(DIR_WS_INCLUDES'header.php'); ?>.

<! header_eof //>.

<! body //>.

<table border="0" width="100%" cellspacing="3" cellpadding="3">.

 <tr>.

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! left_navigation //>.

<?php require(DIR_WS_INCLUDES'column_left.php'); ?>.

<! left_navigation_eof //>.

   </table></td>.

<! body_text //>.

<?php.

 if ($category_depth == 'nested') {.

   $category_query = tep_db_query("select cd.categories_name, c.categories_image from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.categories_id = '"(int)$current_category_id"' and cd.categories_id = '"(int)$current_category_id"' and cd.language_id = '"(int)$languages_id"'");.

   $category = tep_db_fetch_array($category_query);.

?>.

   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

     <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_image(DIR_WS_IMAGES$category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">.

         <tr>.

           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">.

             <tr>.

<?php.

   if (isset($cPath) && strpos('_', $cPath)) {.

// check to see if there are deeper categories within the current category.

     $category_links = array_reverse($cPath_array);.

     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {.

       $categories_query = tep_db_query("select count(*) as total from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.parent_id = '"(int)$category_links[$i]"' and c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"'");.

       $categories = tep_db_fetch_array($categories_query);.

       if ($categories['total'] < 1) {.

         // do nothing, go through the loop.

       } else {.

         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.parent_id = '"(int)$category_links[$i]"' and c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' order by sort_order, cd.categories_name");.

         break; // we've found the deepest category the customer is in.

       }.

     }.

   } else {.

     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.parent_id = '"(int)$current_category_id"' and c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' order by sort_order, cd.categories_name");.

   }.

   $number_of_categories = tep_db_num_rows($categories_query);.

   $rows = 0;.

   while ($categories = tep_db_fetch_array($categories_query)) {.

     $rows++;.

     $cPath_new = tep_get_path($categories['categories_id']);.

     $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW)'%';.

     echo '                <td align="center" class="smallText" width="'$width'" valign="top"><a href="'tep_href_link(FILENAME_DEFAULT, $cPath_new)'">'tep_image(DIR_WS_IMAGES$categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT)'<br>'$categories['categories_name']'</a></td>'"\n";.

     if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {.

       echo '              </tr>'"\n";.

       echo '              <tr>'"\n";.

     }.

   }.

// needed for the new products module shown below.

   $new_products_category_id = $current_category_id;.

?>.

             </tr>.

           </table></td>.

         </tr>.

         <tr>.

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

         </tr>.

         <tr>.

           <td><?php include(DIR_WS_MODULESFILENAME_NEW_PRODUCTS); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

   </table></td>.

<?php.

 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {.

// create column list.

   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,.

                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,.

                        'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,.

                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,.

                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,.

                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,.

                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,.

                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);.

   asort($define_list);.

   $column_list = array();.

   reset($define_list);.

   while (list($key, $value) = each($define_list)) {.

     if ($value > 0) $column_list[] = $key;.

   }.

   $select_column_list = '';.

   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {.

     switch ($column_list[$i]) {.

       case 'PRODUCT_LIST_MODEL':.

         $select_column_list .= 'p.products_model, ';.

         break;.

       case 'PRODUCT_LIST_NAME':.

         $select_column_list .= 'pd.products_name, ';.

         break;.

       case 'PRODUCT_LIST_MANUFACTURER':.

         $select_column_list .= 'm.manufacturers_name, ';.

         break;.

       case 'PRODUCT_LIST_QUANTITY':.

         $select_column_list .= 'p.products_quantity, ';.

         break;.

       case 'PRODUCT_LIST_IMAGE':.

         $select_column_list .= 'p.products_image, ';.

         break;.

       case 'PRODUCT_LIST_WEIGHT':.

         $select_column_list .= 'p.products_weight, ';.

         break;.

     }.

   }.

// show the products of a specified manufacturer.

   if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {.

// We are asked to show only a specific category.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_MANUFACTURERS" m, "TABLE_PRODUCTS_TO_CATEGORIES" p2c left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$HTTP_GET_VARS['filter_id']"'";.

     } else {.

// We show them all.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_MANUFACTURERS" m left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '"(int)$languages_id"' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'";.

     }.

   } else {.

// show the products in a given categorie.

     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {.

// We are asked to show only specific catgeory.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_MANUFACTURERS" m, "TABLE_PRODUCTS_TO_CATEGORIES" p2c left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '"(int)$HTTP_GET_VARS['filter_id']"' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$current_category_id"'";.

     } else {.

// We show them all.

       $listing_sql = "select "$select_column_list" p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from "TABLE_PRODUCTS_DESCRIPTION" pd, "TABLE_PRODUCTS" p left join "TABLE_MANUFACTURERS" m on p.manufacturers_id = m.manufacturers_id, "TABLE_PRODUCTS_TO_CATEGORIES" p2c left join "TABLE_SPECIALS" s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '"(int)$languages_id"' and p2c.categories_id = '"(int)$current_category_id"'";.

     }.

   }.

   if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {.

     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {.

       if ($column_list[$i] == 'PRODUCT_LIST_NAME') {.

         $HTTP_GET_VARS['sort'] = $i+1'a';.

         $listing_sql .= " order by pd.products_name";.

         break;.

       }.

     }.

   } else {.

     $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);.

     $sort_order = substr($HTTP_GET_VARS['sort'], 1);.

     $listing_sql .= ' order by ';.

     switch ($column_list[$sort_col-1]) {.

       case 'PRODUCT_LIST_MODEL':.

         $listing_sql .= "p.products_model "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_NAME':.

         $listing_sql .= "pd.products_name "($sort_order == 'd' ? 'desc' : '');.

         break;.

       case 'PRODUCT_LIST_MANUFACTURER':.

         $listing_sql .= "m.manufacturers_name "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_QUANTITY':.

         $listing_sql .= "p.products_quantity "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_IMAGE':.

         $listing_sql .= "pd.products_name";.

         break;.

       case 'PRODUCT_LIST_WEIGHT':.

         $listing_sql .= "p.products_weight "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

       case 'PRODUCT_LIST_PRICE':.

         $listing_sql .= "final_price "($sort_order == 'd' ? 'desc' : '')", pd.products_name";.

         break;.

     }.

   }.

?>.

   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

         <tr>.

           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>.

<?php.

// optional Product List Filter.

   if (PRODUCT_LIST_FILTER > 0) {.

     if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

       $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' and p.manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"' order by cd.categories_name";.

     } else {.

       $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_MANUFACTURERS" m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '"(int)$current_category_id"' order by m.manufacturers_name";.

     }.

     $filterlist_query = tep_db_query($filterlist_sql);.

     if (tep_db_num_rows($filterlist_query) > 1) {.

       echo '            <td align="center" class="main">'tep_draw_form('filter', FILENAME_DEFAULT, 'get')TEXT_SHOW'&nbsp;';.

       if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

         echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);.

         $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));.

       } else {.

         echo tep_draw_hidden_field('cPath', $cPath);.

         $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));.

       }.

       echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);.

       while ($filterlist = tep_db_fetch_array($filterlist_query)) {.

         $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);.

       }.

       echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');.

       echo '</form></td>'"\n";.

     }.

   }.

// Get the right image for the top-right.

   $image = DIR_WS_IMAGES'table_background_list.gif';.

   if (isset($HTTP_GET_VARS['manufacturers_id'])) {.

     $image = tep_db_query("select manufacturers_image from "TABLE_MANUFACTURERS" where manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'");.

     $image = tep_db_fetch_array($image);.

     $image = $image['manufacturers_image'];.

   } elseif ($current_category_id) {.

     $image = tep_db_query("select categories_image from "TABLE_CATEGORIES" where categories_id = '"(int)$current_category_id"'");.

     $image = tep_db_fetch_array($image);.

     $image = $image['categories_image'];.

   }.

?>.

           <td align="right"><?php echo tep_image(DIR_WS_IMAGES$image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><?php include(DIR_WS_MODULESFILENAME_PRODUCT_LISTING); ?></td>.

     </tr>.

   </table></td>.

<?php.

 } else { // default page.

?>.

   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

     <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_image(DIR_WS_IMAGES'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

         <tr>.

           <td class="main"><?php echo tep_customer_greeting(); ?></td>.

         </tr>.

         <tr>.

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

         </tr>.

         <tr>.

           <td class="main"><?php echo TEXT_MAIN; ?></td>.

         </tr>.

   <script language="JavaScript" type="text/javascript">.

Var mfsites = [.

['<?php echo '<a target="_self" href="'tep_href_link(FILENAME_DEFAULT, 'cPath=1_48')'"> <img border="0" src="images/factoryban.jpg"></a>' ?>'],.

['<?php echo '<a target="_self" href="'tep_href_link(FILENAME_DEFAULT, 'cPath2_73')'"> <img border="0" src="images/latexban.jpg"></a>' ?>'],.

['<?php echo '<a target="_self" href="'tep_href_link(FILENAME_DEFAULT, 'cPath=21_99')'"> <img border="0" src="images/crystalban.jpg"></a>' ?>'],.

];.

Var mfIe = false;.

If( document.all) {.

MfIe = true;.

}.

Var mfsitesIndex = 0;.

Function mfsitesChange() {.

Var htmlString = mfsites[mfsitesIndex];.

If( mfIe) {.

Document.all.sites.innerHTML = htmlString;.

}.

Else {.

Document.layers["sites"].document.open();.

Document.layers["sites"].document.write( htmlString);.

Document.layers["sites"].document.close();.

}.

If(mfsitesIndex < mfsites.length - 1).

MfsitesIndex++;.

Else.

MfsitesIndex = 0;.

}.

SetInterval("mfsitesChange()", 5000);.

</script>.

  <tr>.

<td><div id="sites" align="center"></div></td>.

</tr>.

         <tr>.

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

         </tr>.

         <tr>.

           <td><?php include(DIR_WS_MODULESFILENAME_NEW_PRODUCTS); ?></td>.

         </tr>.

<?php.

   include(DIR_WS_MODULESFILENAME_UPCOMING_PRODUCTS);.

?>.

       </table></td>.

     </tr>.

   </table></td>.

<?php.

 }.

?>.

<! body_text_eof //>.

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! right_navigation //>.

<?php require(DIR_WS_INCLUDES'column_right.php'); ?>.

<! right_navigation_eof //>.

   </table></td>.

 </tr>.

</table>.

<! body_eof //>.

<! footer //>.

<?php require(DIR_WS_INCLUDES'footer.php'); ?>.

<! footer_eof //>.

<br>.

</body>.

</html>.

<?php require(DIR_WS_INCLUDES'application_bottom.php'); ?>..

Comment #9

You will still need to sort out your tables in catalog/includes/languages/english/index.php as they are not correct also there is a full stop showing on your index page which is part of the same issue..

Comment #10

Ok steve I will give this a go let you know the outcome!!!!.

Cheers mate..

Comment #11

Yes they are I was just looking at them the code needs a tweak but the images were showing...

Comment #12

I cant see them mate I will refresh and reload..

Comment #13

Hi steve.

Saw them however this isnt what I want I want the images to change like in the whats new box each time you go to the page i.e when you look at a product then return to the page it's a different one if you know what I mean..

Sorry for the mistake.

Clive..

Comment #14

Do you require any assistance in removing the code..

I know what was required to smooth it out, but if it is not what you required, then I will have dawn shot at you later.

You should be able to put together a box based on some of the code in the whats new box or possibly a banner in a box contribution..

I am sorry to have wasted your time..

You still need to sort out your tables in catalog/includes/languages/english/index.php.

This post has been edited by.

241.

: 15 May 2004, 22:17..

Comment #15

Hi steve I'm sorry mate.

What I want is changing image when you go to the page with links I think this is called random images with links..

However if you know what is required to smooth the images out I will be more and happy to see what it looks like you never know I might like the result..

Many thanks for all your help and advice it's appreciated..

Look forward to your reply.

Many thanks clive..

Comment #16

It would look like that which can be seen in the nmanufacturers box on my developement site.

Click Here..

Comment #17

Hi there steve ive managed to sus the code now for what I want it's now showing right on my page,.

However you might be able to help me with this, my whole right hand colum boxes have moved to the left please view my page and you will see what I mean..

Www.sweet16ssexshop.co.uk (click to enter).

Look at the bottom of the page.

You see what I mean any advice or how to put these bock to the right place would help me loads.

Many thanks mate!!!!!.

Clive..

Comment #18

Fatal error: Call to undefined function: tep_get_languages() in /home/httpd/www.sweet16ssexshop.co.uk/html/oscommerce-2.2ms2/catalog/index.php on line 58.

Showing when entering my site.

Please help any advise.

Thanks..

Comment #19

Have you recently installed a contribution as there is no code tep_get_languages in catalog/index.php..

Comment #20


This question was taken from a support group/message board and re-posted here so others can learn from it.