Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PLEASE HELP


The Doctor

Recommended Posts

Hi

 

I recently updated the header of the pag and since then it keeps saying that there is an error on page.

 

Does anyone know what the problem is, Here is the code:

 

<?php

/*

$Id: header.php,v 1.1.1.1 2005/08/16 08:31:31 sstolyarov 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');

}

?>

<div style="text-align: center; background: white; margin: 0;">

<div style="text-align: left; margin: 8px auto; width: 900px;">

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

<tr class="header">

<body onload="FP_preloadImgs(/*url*/src='http://www.wantingitbad.co.uk/Buttons/button51.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button50.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button3D.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button3C.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button27.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button26.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button1C.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button1B.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button40.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button39.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button46.jpg',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button45.jpg')">

 

<table border="0" width="900" id="table96" cellspacing="0" cellpadding="0">

<tr>

<td>

<p style="margin-top: 0; margin-bottom: 0">

<font face="Franklin Gothic Demi" color="#0066FF" style="font-size: 30pt">

WantingItBad</font><font size="4" color="#0066FF" face="Franklin Gothic Demi">

.co.uk</font></td>

<td width="305">

<p style="margin-top: 0; margin-bottom: 0"><b>

<font face="Arial" size="2"><a href="http://www.wantingitbad.co.uk/">

<span style="text-decoration: none"><font color="#000000">Home</font></span></a>

<a href="http://www.wantingitbad.co.uk/search.htm">

<span style="text-decoration: none">

<font color="#000000">Search</font></span></a>

<a href="http://www.wantingitbad.co.uk/contact_us.htm">

<span style="text-decoration: none"><font color="#000000">Contact Us</font></span></a></font></b>

<b><font size="2" face="Arial">

<a href="http://www.wantingitbad.co.uk/help.htm"><font color="#000000">

<span style="text-decoration: none">Help</span></font></a></font></b></td>

</tr>

</table>

<table border="0" width="900" id="table97" cellspacing="0" cellpadding="0">

<tr>

<td>

<p align="left"><font face="Franklin Gothic Demi" color="#99CCFF">What More Could You Want</font></td>

</tr>

<tr>

<td>

<p style="margin-top: 0; margin-bottom: 0"> </td>

</tr>

</table>

<table border="0" width="900" id="table98" cellspacing="0" cellpadding="0">

<tr>

<td width="108" align="center"> </td>

<td width="108" align="center"> </td>

<td width="108" align="center">

<a href="http://www.wantingitbad.co.uk/online_store">

<img border="0" id="img20" src="http://www.wantingitbad.co.uk/Buttons/button52.jpg" height="33" width="100" alt="Store" onmouseover="FP_swapImg(1,0,/*id*/'img20',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button50.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img20',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button52.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img20',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button51.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img20',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button50.jpg')" fp-style="fp-btn: Glow Tab 1; fp-font: Arial; fp-font-style: Bold; fp-orig: 0" fp-title="Store"></a></td>

<td width="108" align="center">

<a href="http://www.wantingitbad.co.uk/online_games/online_games.htm">

<img border="0" id="img21" src="http://www.wantingitbad.co.uk/Buttons/button3B.jpg" height="33" width="100" alt="Games" onmouseover="FP_swapImg(1,0,/*id*/'img21',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button3C.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img21',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button3B.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img21',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button3D.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img21',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button3C.jpg')" fp-style="fp-btn: Glow Tab 1; fp-font: Arial; fp-font-style: Bold; fp-orig: 0" fp-title="Games"></a></td>

<td width="108" align="center">

<a href="http://www.wantingitbad.co.uk/forum/">

<img border="0" id="img16" src="http://www.wantingitbad.co.uk/Buttons/button32.jpg" height="33" width="100" alt="Forum" fp-style="fp-btn: Glow Tab 1; fp-font: Arial; fp-font-style: Bold; fp-orig: 0" fp-title="Forum" onmouseover="FP_swapImg(1,0,/*id*/'img16',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button26.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img16',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button32.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img16',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button27.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img16',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button26.jpg')"></a></td>

<td width="108" align="center">

<a href="http://www.wantingitbad.co.uk/gaming.htm">

<img border="0" id="img3" src="http://www.wantingitbad.co.uk/Buttons/button1A.jpg" height="33" width="100" alt="Gaming" fp-style="fp-btn: Glow Tab 1; fp-font: Arial; fp-font-style: Bold; fp-orig: 0" fp-title="Gaming" onmouseover="FP_swapImg(1,0,/*id*/'img3',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button1B.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img3',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button1A.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img3',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button1C.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img3',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button1B.jpg')"></a></td>

<td width="108" align="center">

<a href="http://www.spreadshirt.net/shop.php?sid=115827">

<img border="0" id="img11" src="http://www.wantingitbad.co.uk/Buttons/button44.jpg" height="33" width="100" alt="Merchandise" onmouseover="FP_swapImg(1,0,/*id*/'img11',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button39.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img11',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button44.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img11',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button40.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img11',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button39.jpg')" fp-style="fp-btn: Glow Tab 1; fp-font: Arial; fp-font-style: Bold; fp-orig: 0" fp-title="Merchandise"></a></td>

<td width="108" align="center">

<a href="http://www.wantingitbad.co.uk/chat">

<img border="0" id="img19" src="http://www.wantingitbad.co.uk/Buttons/button47.jpg" height="33" width="100" alt="Chat" onmouseover="FP_swapImg(1,0,/*id*/'img19',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button45.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img19',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button47.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img19',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button46.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img19',/*url*/src='http://www.wantingitbad.co.uk/Buttons/button45.jpg')" fp-style="fp-btn: Glow Tab 1; fp-font: Arial; fp-font-style: Bold; fp-orig: 0" fp-title="Chat"></a></td>

<td width="108" align="center"> </td>

<td width="108" align="center"> </td>

</table>

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

<tr class="headerNavigation">

<td class="headerNavigation"> <?php echo $breadcrumb->trail(' ? '); ?></td>

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td>

</tr>

</table>

<?php

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

?>

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

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

</tr>

</table>

<?php

}

 

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

?>

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

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

</tr>

</table>

<?php

}

?>

 

Any help is appreciated.

 

View the shop at http://www.wantingitbad.co.uk/online_store

 

Regards

 

SOMEONE SAID THIS COULD BE THE PROBLEM, BUT I DONT KNOW WHAT DO DO:

 

The error you are seeing is in the JavaScript in the <body> statement. Most likely it is caused by the fact that there should not be a <body> statement in the header.php file since the <body> statement is in the code for each page. You will need to add your JavaScript to each page instead of defining it in the header.php file. Secondly, the <body> tag has to be after the </head> tag, it can not just be placed in the middle of a <div> or a <table> for that matter.

 

Also, you may want to double check your JavaScript code. It is hard to tell if it is incorrect or not, but, the /*url*/ part looks like they want you to put in your URL not leave that part of the code. I could be wrong though. Without seeing the backend JavaScript functions, it is hard to tell.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...