inkcartridgedeals Posted September 7, 2005 Share Posted September 7, 2005 i have installed this UK Based osCommerce 2.2 and my website doesnt seem to have changed, but on the my account page where you create a new account i get this message when it loads Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/jame3713/public_html/ink4u/includes/header.php:214) in /home/jame3713/public_html/ink4u/includes/boxes/categories.php on line 13 Quote Link to comment Share on other sites More sharing options...
Sandbag Posted September 7, 2005 Share Posted September 7, 2005 (edited) This is happening because either you have two 'tep_show_category' functions, or you are trying to include the categories.php file twice. 1. Did you install the UK Based osCommerce2.2 as a fresh install? 2. Have you added any contributions or changed any code yourself? 3. Look in 'catalog/includes/header.php' for string 'tep_show_categories'. Is it there? 4. Search for 'include(DIR_WS_BOXES . 'categories.php')' in 'catalog/includes/column_left.php'. Have you put it in twice? I can recreate this error by putting two 'include(DIR_WS_BOXES . 'categories.php')' statements in 'catalog/include/column_left.php'. I can't give you an exact answer as my UK Based osCommerrce2.2 install was fine. Providing answers for the above may shed some light on this issue. Edited September 7, 2005 by Sandbag Quote Leapfrog - Dynamic Visitor Tracking Link to comment Share on other sites More sharing options...
inkcartridgedeals Posted September 7, 2005 Author Share Posted September 7, 2005 1. Did you install the UK Based osCommerce2.2 as a fresh install? 2. Have you added any contributions or changed any code yourself? 3. Look in 'catalog/includes/header.php' for string 'tep_show_categories'. Is it there? 4. Search for 'include(DIR_WS_BOXES . 'categories.php')' in 'catalog/includes/column_left.php'. Have you put it in twice? Q1 = YES Q2 = NO Q3 = YES Q4 = NO Quote Link to comment Share on other sites More sharing options...
Sandbag Posted September 8, 2005 Share Posted September 8, 2005 I'm afraid I am stumped, inkcartridgedeals. The only thing I can suggest (which you have probably tried already) is to re-download the contribution and re-install to see if it happens again. Sorry. Quote Leapfrog - Dynamic Visitor Tracking Link to comment Share on other sites More sharing options...
♥Vger Posted September 8, 2005 Share Posted September 8, 2005 There's something wrong with the includes/header.php file, because this is what your error says: "includes/header.php:214", and there is no line 214 in the header.php, which stops at around line 88 on a default install. Vger Quote Link to comment Share on other sites More sharing options...
inkcartridgedeals Posted September 9, 2005 Author Share Posted September 9, 2005 i'm still getting this error, and really dont know what to do. VGER you said it is in the head of the document. I cant find anything wrong there but then again i dont know PHP. I have pasted the head below this messege and i have made line 214 bold and blue. <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // give the visitors a message that the website will be down at ... time if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) { tep_output_warning(TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE); } // this will let the admin know that the website is DOWN FOR MAINTENANCE to the public if ( (DOWN_FOR_MAINTENANCE == 'true') && (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE == getenv('REMOTE_ADDR')) ) { tep_output_warning(TEXT_ADMIN_DOWN_FOR_MAINTENANCE); } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <!-- ----------------------------------------- <? // ---- MANUFACTURERS $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { echo ' <table cellspacing=0 cellpadding=0 width=187 align=center bgcolor=#ffffff> '. tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') .'<tr><td height=16 bgcolor=#628AB3 class=ch colspan=2> <font color=#ffffff>Select manufacturer</font></td></tr> <tr><td height=8 colspan=2></td></tr> <tr><td align=center> '; $manufacturers_array = array(); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers_name); } echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=go') . tep_hide_session_id(); echo ' </td><td> <input type=image src=images/m16.gif width=27 height=18></td></tr> <tr><td height=10 colspan=2></td></tr> <tr><td height=10 bgcolor=#E9E9E9 colspan=2></td></tr> </form> </table> '; } ?> -------------------------------------- --> <table cellspacing=0 cellpadding=0 width=700 align=center> <tr><td> <table cellspacing=0 cellpadding=0> <tr><td height=34 colspan=3></td></tr> <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m01.gif width=200 height=90 border=0></a></td> <td width=3></td> <td width=497> <table cellspacing=0 cellpadding=0> <tr> <td width=157> <table cellspacing=0 cellpadding=0 width=140 align=center> <tr><td class=ml style="font-size:10px">Choose<br>your language:</a></td></tr> <tr><td height=3></td></tr> <tr><td> <? // LANGUAGES if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } $languages_string = ''; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> '; } echo $languages_string; ?> </td></tr> <tr><td height=4></td></tr> <tr><td><img src=images/m05.gif width=139 height=1></td></tr> <tr><td height=4></td></tr> <tr><td class=ml style="font-size:10px; padding-bottom:3px">Currencies:</a></td></tr> <tr><td> <? // CURRENCIES echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width:130px " ') . $hidden_get_variables . tep_hide_session_id(); echo '</form>'; ?> </td></tr> </table> </td> <td><img src=images/m06.gif width=1 height=90></td> <td width=152> <table cellspacing=0 cellpadding=0 width=110 align=center> <tr><td height=10></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('specials.php')?> class=ml>Specials</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('advanced_search.php')?> class=ml>Search</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('contact_us.php')?> class=ml>Contact Us</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('create_account.php')?> class=ml>Create an account</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('login.php')?> class=ml>Customer Login</a><br><br></td></tr> </table> </td> <td><img src=images/m06.gif width=1 height=90></td> <td width=185> <table cellspacing=0 cellpadding=0 width=137 align=center> <tr><td height=20 colspan=2></td></tr> <tr><td><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m08.gif width=40 height=40 border=0></a></td><td class=sc >Shopping<br>Cart</td></tr> <tr><td height=3 colspan=2></td></tr> <tr><td colspan=2>now in your cart <a href=<?=tep_href_link('shopping_cart.php')?> class=ml1><?=$cart->count_contents()?> items</a></td></tr> <tr><td height=15 colspan=2></td></tr> </table> </td></tr> </table> </td></tr> <tr><td height=3 colspan=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td style="background-repeat:no-repeat" background=images/m15.gif width=200 height=71> <? // SEARCH ?> <table cellspacing=0 cellpadding=0 width=160 align=center> <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?> <tr><td height=13 colspan=2></td></tr> <tr><td class=ml colspan=2><font color=#ffffff>Site search:</a></td></tr> <tr><td width=135><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" class=go') . tep_hide_session_id()?></td><td width=25 align=right><input type=image src=images/m09.gif width=20 height=20></td></tr> <tr><td width=135 align=right> <a href=<?=tep_href_link('advanced_search.php')?> class=ml2>Advanced search</a></td><td width=25></td></tr> <tr><td height=9 colspan=2></td></tr> </form> </table> <? // END SEARCH ?> </td> <td width=3></td> <td><a href=<?=tep_href_link('index.php')?>><img src=images/m10.gif width=102 height=71 border=0></a><a href=<?=tep_href_link('products_new.php')?>><img src=images/m11.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('account.php')?>><img src=images/m12.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m13.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m14.gif width=98 height=71 border=0></a></td></tr> <tr><td height=3 colspan=3></td></tr> <tr><td height=3 width=700 bgcolor=#9B9B9B colspan=3></td></tr> <tr><td height=3 colspan=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td width=200 valign=top> <table cellspacing=0 cellpadding=0> <tr><td><img src=images/m16.gif width=200 height=43></td></tr> <tr><td class=bg> <table cellspacing=0 cellpadding=0 width=154 align=center> <tr><td height=10></td></tr> </tr><tr><td height=3></td></tr> <? // ---- CATEGORIES function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; if(!$tree[$counter]['level']){ $categories_string .= $categories_string ? '<tr><td><img src=images/m19.gif width=154 height=1></td></tr><tr><td height=3></td></tr>' : ''; $categories_string .= '<tr><td><img src=images/m18.gif width=3 height=5 align=absmiddle> <a class=ml3 href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display categry name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></td></tr><tr><td height=3></td></tr>'; }else{ // SUBCATEGORY $categories_string .= '<tr><td> '; for($i=0;$i<$tree[$counter]['le vel'];$i++) $categories_string .= ' '; $categories_string .= ' - <a class=ml3 style="font-weight:normal;" href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display category name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></td></tr><tr><td height=3></td></tr>'; } if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } define(TABLE_CATEGORIES, "categories"); define(TABLE_CATEGORIES_DESCRIPTION, "categories_description"); $categories_string = ''; $tree = array(); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } $categories_string .= ''; tep_show_category($first_element); $categories_string .= ''; echo $categories_string; ?> <tr><td height=6></td></tr> </table> </td></tr> <tr> <td><img src=images/m20.gif width=200 height=15></td> </tr> <tr><td height=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td><a href=<?=tep_href_link('product_info.php','products_id=86')?>><img src=images/m21.jpg width=200 height=98 border=0></a></td></tr> <tr><td height=3></td></tr> <tr><td><a href=<?=tep_href_link('product_info.php','products_id=90')?>><img src=images/m22.jpg width=200 height=98 border=0></a></td></tr> <tr><td height=3></td></tr> <tr><td><a href=<?=tep_href_link('specials.php')?>><img src=images/m30.jpg width=200 height=98 border=0></a></td></tr> </table> </td> <td width=10></td> <td width=490 valign=top> Quote Link to comment Share on other sites More sharing options...
Sandbag Posted September 9, 2005 Share Posted September 9, 2005 That is not what header.php should look like. The default osc one is only around 112 lines long. You have all sorts of other stuff mixed in there. Where did you get the file from? Quote Leapfrog - Dynamic Visitor Tracking Link to comment Share on other sites More sharing options...
inkcartridgedeals Posted September 9, 2005 Author Share Posted September 9, 2005 i have a different template, go to my sit and have a look, Click here and see Quote Link to comment Share on other sites More sharing options...
♥Vger Posted September 9, 2005 Share Posted September 9, 2005 WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true' Definitely not part of osCommerce! Vger Quote Link to comment Share on other sites More sharing options...
inkcartridgedeals Posted September 9, 2005 Author Share Posted September 9, 2005 Definitely not part of osCommerce! Vger <{POST_SNAPBACK}> warn before down is an add on for oscommerce. Quote Link to comment Share on other sites More sharing options...
Sandbag Posted September 9, 2005 Share Posted September 9, 2005 2. Have you added any contributions or changed any code yourself? NO If this is a fresh install with no contributions, how did it get in there? Quote Leapfrog - Dynamic Visitor Tracking Link to comment Share on other sites More sharing options...
inkcartridgedeals Posted September 9, 2005 Author Share Posted September 9, 2005 i dont know. i have just put my backup site back which just has the UK 2.2 change in it. And i get this error Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/jame3713/public_html/ink4u/includes/header.php:214) in /home/jame3713/public_html/ink4u/includes/boxes/categories.php on line 13 i get the error when i click the my ccount button at the top of the page, and then press for a new account. CLICK HERE TO SEE Here is the head. LINE 214 BOLD AND BLUE AGAIN <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <!-- ----------------------------------------- <? // ---- MANUFACTURERS $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { echo ' <table cellspacing=0 cellpadding=0 width=187 align=center bgcolor=#ffffff> '. tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') .'<tr><td height=16 bgcolor=#628AB3 class=ch colspan=2> <font color=#ffffff>Select manufacturer</font></td></tr> <tr><td height=8 colspan=2></td></tr> <tr><td align=center> '; $manufacturers_array = array(); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers_name); } echo tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" class=go') . tep_hide_session_id(); echo ' </td><td> <input type=image src=images/m16.gif width=27 height=18></td></tr> <tr><td height=10 colspan=2></td></tr> <tr><td height=10 bgcolor=#E9E9E9 colspan=2></td></tr> </form> </table> '; } ?> -------------------------------------- --> <table cellspacing=0 cellpadding=0 width=700 align=center> <tr><td> <table cellspacing=0 cellpadding=0> <tr><td height=34 colspan=3></td></tr> <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m01.gif width=200 height=90 border=0></a></td> <td width=3></td> <td width=497> <table cellspacing=0 cellpadding=0> <tr> <td width=157> <table cellspacing=0 cellpadding=0 width=140 align=center> <tr><td class=ml style="font-size:10px">Choose<br>your language:</a></td></tr> <tr><td height=3></td></tr> <tr><td> <? // LANGUAGES if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } $languages_string = ''; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> '; } echo $languages_string; ?> </td></tr> <tr><td height=4></td></tr> <tr><td><img src=images/m05.gif width=139 height=1></td></tr> <tr><td height=4></td></tr> <tr><td class=ml style="font-size:10px; padding-bottom:3px">Currencies:</a></td></tr> <tr><td> <? // CURRENCIES echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width:130px " ') . $hidden_get_variables . tep_hide_session_id(); echo '</form>'; ?> </td></tr> </table> </td> <td><img src=images/m06.gif width=1 height=90></td> <td width=152> <table cellspacing=0 cellpadding=0 width=110 align=center> <tr><td height=10></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('specials.php')?> class=ml>Specials</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('advanced_search.php')?> class=ml>Search</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('contact_us.php')?> class=ml>Contact Us</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('create_account.php')?> class=ml>Create an account</a><br></td></tr> <tr><td><img src=images/m07.gif width=8 height=8 align=absmiddle> <a style="font-size:10px" href=<?=tep_href_link('login.php')?> class=ml>Customer Login</a><br><br></td></tr> </table> </td> <td><img src=images/m06.gif width=1 height=90></td> <td width=185> <table cellspacing=0 cellpadding=0 width=137 align=center> <tr><td height=20 colspan=2></td></tr> <tr><td><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m08.gif width=40 height=40 border=0></a></td><td class=sc >Shopping<br>Cart</td></tr> <tr><td height=3 colspan=2></td></tr> <tr><td colspan=2>now in your cart <a href=<?=tep_href_link('shopping_cart.php')?> class=ml1><?=$cart->count_contents()?> items</a></td></tr> <tr><td height=15 colspan=2></td></tr> </table> </td></tr> </table> </td></tr> <tr><td height=3 colspan=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td style="background-repeat:no-repeat" background=images/m15.gif width=200 height=71> <? // SEARCH ?> <table cellspacing=0 cellpadding=0 width=160 align=center> <?=tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get')?> <tr><td height=13 colspan=2></td></tr> <tr><td class=ml colspan=2><font color=#ffffff>Site search:</a></td></tr> <tr><td width=135><?=tep_draw_input_field('keywords', '', 'size="20" maxlength="30" class=go') . tep_hide_session_id()?></td><td width=25 align=right><input type=image src=images/m09.gif width=20 height=20></td></tr> <tr><td width=135 align=right> <a href=<?=tep_href_link('advanced_search.php')?> class=ml2>Advanced search</a></td><td width=25></td></tr> <tr><td height=9 colspan=2></td></tr> </form> </table> <? // END SEARCH ?> </td> <td width=3></td> <td><a href=<?=tep_href_link('index.php')?>><img src=images/m10.gif width=102 height=71 border=0></a><a href=<?=tep_href_link('products_new.php')?>><img src=images/m11.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('account.php')?>><img src=images/m12.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m13.gif width=99 height=71 border=0></a><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m14.gif width=98 height=71 border=0></a></td></tr> <tr><td height=3 colspan=3></td></tr> <tr><td height=3 width=700 bgcolor=#9B9B9B colspan=3></td></tr> <tr><td height=3 colspan=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td width=200 valign=top> <table cellspacing=0 cellpadding=0> <tr><td><img src=images/m16.gif width=200 height=43></td></tr> <tr><td class=bg> <table cellspacing=0 cellpadding=0 width=154 align=center> <tr><td height=10></td></tr> </tr><tr><td height=3></td></tr> <? // ---- CATEGORIES function tep_show_category($counter) { global $tree, $categories_string, $cPath_array; if(!$tree[$counter]['level']){ $categories_string .= $categories_string ? '<tr><td><img src=images/m19.gif width=154 height=1></td></tr><tr><td height=3></td></tr>' : ''; $categories_string .= '<tr><td><img src=images/m18.gif width=3 height=5 align=absmiddle> <a class=ml3 href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display categry name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></td></tr><tr><td height=3></td></tr>'; }else{ // SUBCATEGORY $categories_string .= '<tr><td> '; for($i=0;$i<$tree[$counter]['le vel'];$i++) $categories_string .= ' '; $categories_string .= ' - <a class=ml3 style="font-weight:normal;" href='; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } $categories_string .= tep_href_link('index.php', $cPath_new) . '>'; // display category name $categories_string .= $tree[$counter]['name']; $categories_string .= '</a></td></tr><tr><td height=3></td></tr>'; } if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } define(TABLE_CATEGORIES, "categories"); define(TABLE_CATEGORIES_DESCRIPTION, "categories_description"); $categories_string = ''; $tree = array(); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $tree[$categories['categories_id']] = array('name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } $categories_string .= ''; tep_show_category($first_element); $categories_string .= ''; echo $categories_string; ?> <tr><td height=6></td></tr> </table> </td></tr> <tr><td><img src=images/m20.gif width=200 height=15></td></tr> <tr><td height=3></td></tr> </table> <table cellspacing=0 cellpadding=0> <tr><td><a href=<?=tep_href_link('product_info.php','products_id=86')?>><img src=images/m21.jpg width=200 height=98 border=0></a></td></tr> <tr><td height=3></td></tr> <tr><td><a href=<?=tep_href_link('product_info.php','products_id=90')?>><img src=images/m22.jpg width=200 height=98 border=0></a></td></tr> <tr><td height=3></td></tr> <tr><td><a href=<?=tep_href_link('specials.php')?>><img src=images/m30.jpg width=200 height=98 border=0></a></td></tr> </table> </td> <td width=10></td> <td width=490 valign=top> Quote Link to comment Share on other sites More sharing options...
Guest Posted September 9, 2005 Share Posted September 9, 2005 (edited) I've tried to have a look but it's not liking my IP address. You need to ask the person that sold you the template, which OS Contribs they are using with the OScommerce on that site, because it's not a fresh install. Once you know which contribs you are using you have a chance, of backtracking through the contrib install info, and finding out which one has bloated your header.php. if you installed the oscommerce, then you need to think back which contribs you have installed. I have learnt that the contribs are far from 'final' and that often (especially! if you are using contribs in conjunction with one another) you will need to make modifications to them. They all assume more or less a clean install, and if things have been changed by another contrib before them then it totally messes things up. I think that is the problem you're having. But i'm a complete novice I hasten to add! gary. Edited September 9, 2005 by gary76 Quote Link to comment Share on other sites More sharing options...
inkcartridgedeals Posted September 9, 2005 Author Share Posted September 9, 2005 ok, i got the template from templatemonster.com there were no contro installed in it, i have installed one and one only. and that is the UK2.2 Quote Link to comment Share on other sites More sharing options...
Sandbag Posted September 9, 2005 Share Posted September 9, 2005 The UK contrib is designed to be installed on a clean installation of oscommerce. The templates provided by sites such as Template Monster add their own contributions. The package you downloaded from them will not be the same as osc MS2. What I am saying is, you cannot simply copy the UK contrib files across as this will interfere with the changes made by Template Monster. Quote Leapfrog - Dynamic Visitor Tracking 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.
Note: Your post will require moderator approval before it will be visible.